Diffstat (limited to 'qt/qt-2.3.7.patch/qte237-lefthand.patch') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qt/qt-2.3.7.patch/qte237-lefthand.patch | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qt/qt-2.3.7.patch/qte237-lefthand.patch b/qt/qt-2.3.7.patch/qte237-lefthand.patch index 0a0cccf..1287430 100644 --- a/qt/qt-2.3.7.patch/qte237-lefthand.patch +++ b/qt/qt-2.3.7.patch/qte237-lefthand.patch @@ -1,64 +1,71 @@ +Backport of the LeftHand patch from Qt2.3.8 + +Puts Scrollbar on the left for people using the right hand +to hold the devices + + + diff -u qt-2.3.7_orig/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp --- qt-2.3.7_orig/src/widgets/qscrollview.cpp 2004-06-13 20:42:54.000000000 +0200 +++ qt-2.3.7/src/widgets/qscrollview.cpp 2004-06-13 20:45:16.000000000 +0200 @@ -526,15 +526,16 @@ this, SLOT( doDragAutoScroll() ) ); #endif - connect( &d->hbar, SIGNAL( valueChanged( int ) ), - this, SLOT( hslide( int ) ) ); - connect( &d->vbar, SIGNAL( valueChanged( int ) ), - this, SLOT( vslide( int ) ) ); + connect( &d->hbar, SIGNAL( valueChanged(int) ), + this, SLOT( hslide(int) ) ); + connect( &d->vbar, SIGNAL( valueChanged(int) ), + this, SLOT( vslide(int) ) ); d->viewport.installEventFilter( this ); setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); setLineWidth( style().defaultFrameWidth() ); setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); + } @@ -683,6 +684,11 @@ h-tmarg-bmarg - (showh ? hsbExt : 0) ); } +/* + The surrounding environment (or application, if there is no + environment, may set this. Requires Qt >= 2.3.8. +*/ +bool qt_left_hand_scrollbars = FALSE; /*! Updates scrollbars - all possibilities considered. You should never @@ -786,45 +792,50 @@ // Position the scrollbars, viewport, and corner widget. int bottom; + int xoffset = ( qt_left_hand_scrollbars && ( showv || cornerWidget() ) ) ? vsbExt : 0; + int xpos = qt_left_hand_scrollbars ? 0 : w-vsbExt; + xpos = (style() == WindowsStyle) && qt_left_hand_scrollbars ? xpos + fw : xpos - fw; + int ypos = tmarg; + ypos = (style() == WindowsStyle) ? ypos +fw : 0; if ( showh ) { int right = ( showv || cornerWidget() ) ? w-vsbExt : w; if ( style() == WindowsStyle ) - setHBarGeometry(d->hbar, fw, h-hsbExt-fw, + setHBarGeometry(d->hbar, fw + xoffset , h-hsbExt-fw, right-fw-fw, hsbExt ); else - setHBarGeometry(d->hbar, 0, h-hsbExt, right, + setHBarGeometry(d->hbar, 0+ xoffset, h-hsbExt, right, hsbExt ); bottom=h-hsbExt; } else { bottom=h; } if ( showv ) { - clipper()->setGeometry( lmarg, tmarg, + clipper()->setGeometry( lmarg + xoffset, tmarg, w-vsbExt-lmarg-rmarg, bottom-tmarg-bmarg ); |