move the extra border in the size hint
svn path=/trunk/KDE/kdelibs/; revision=1041792
This commit is contained in:
parent
d53654784a
commit
dd581265cf
@ -90,7 +90,7 @@ public:
|
||||
bool canScroll(Direction direction, bool hasOvershoot = false) const
|
||||
{
|
||||
QPointF scrollPosition = -parent->property("scrollPosition").value<QPointF>();
|
||||
int offset = (hasOvershoot?overshoot*2:-4);
|
||||
int offset = (hasOvershoot?overshoot*2:0);
|
||||
|
||||
switch (direction) {
|
||||
case Up:
|
||||
@ -203,7 +203,7 @@ void KineticScrolling::wheelReleaseEvent(QGraphicsSceneWheelEvent *event)
|
||||
mousePressEvent(0);
|
||||
duration();
|
||||
|
||||
int temp = -event->delta();
|
||||
int temp = -event->delta()/2;
|
||||
|
||||
if ((event->delta() < 0 && d->canScroll(KineticScrollingPrivate::Down)) ||
|
||||
(event->delta() > 0 && d->canScroll(KineticScrollingPrivate::Up))){
|
||||
|
@ -480,7 +480,7 @@ QSizeF ScrollWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) con
|
||||
QSizeF hint = QGraphicsWidget::sizeHint(which, constraint);
|
||||
|
||||
if (which == Qt::PreferredSize && d->widget) {
|
||||
return d->widget->size().expandedTo(d->widget->effectiveSizeHint(Qt::PreferredSize));
|
||||
return (d->widget->size()+QSize(4,4)).expandedTo(d->widget->effectiveSizeHint(Qt::PreferredSize));
|
||||
}
|
||||
|
||||
return hint;
|
||||
|
Loading…
Reference in New Issue
Block a user