summaryrefslogtreecommitdiff
path: root/qt/qt-2.3.7.patch/qte237-lefthand.patch
Unidiff
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.patch7
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,48 +1,55 @@
1Backport of the LeftHand patch from Qt2.3.8
2
3Puts Scrollbar on the left for people using the right hand
4to hold the devices
5
6
7
1diff -u qt-2.3.7_orig/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp 8diff -u qt-2.3.7_orig/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp
2 --- qt-2.3.7_orig/src/widgets/qscrollview.cpp2004-06-13 20:42:54.000000000 +0200 9 --- qt-2.3.7_orig/src/widgets/qscrollview.cpp2004-06-13 20:42:54.000000000 +0200
3 +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-06-13 20:45:16.000000000 +0200 10 +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-06-13 20:45:16.000000000 +0200
4@@ -526,15 +526,16 @@ 11@@ -526,15 +526,16 @@
5 this, SLOT( doDragAutoScroll() ) ); 12 this, SLOT( doDragAutoScroll() ) );
6 #endif 13 #endif
7 14
8- connect( &d->hbar, SIGNAL( valueChanged( int ) ), 15- connect( &d->hbar, SIGNAL( valueChanged( int ) ),
9 -this, SLOT( hslide( int ) ) ); 16 -this, SLOT( hslide( int ) ) );
10- connect( &d->vbar, SIGNAL( valueChanged( int ) ), 17- connect( &d->vbar, SIGNAL( valueChanged( int ) ),
11 -this, SLOT( vslide( int ) ) ); 18 -this, SLOT( vslide( int ) ) );
12+ connect( &d->hbar, SIGNAL( valueChanged(int) ), 19+ connect( &d->hbar, SIGNAL( valueChanged(int) ),
13 +this, SLOT( hslide(int) ) ); 20 +this, SLOT( hslide(int) ) );
14+ connect( &d->vbar, SIGNAL( valueChanged(int) ), 21+ connect( &d->vbar, SIGNAL( valueChanged(int) ),
15 +this, SLOT( vslide(int) ) ); 22 +this, SLOT( vslide(int) ) );
16 d->viewport.installEventFilter( this ); 23 d->viewport.installEventFilter( this );
17 24
18 setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); 25 setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
19 setLineWidth( style().defaultFrameWidth() ); 26 setLineWidth( style().defaultFrameWidth() );
20 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); 27 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
21+ 28+
22 } 29 }
23 30
24 31
25@@ -683,6 +684,11 @@ 32@@ -683,6 +684,11 @@
26 h-tmarg-bmarg - (showh ? hsbExt : 0) ); 33 h-tmarg-bmarg - (showh ? hsbExt : 0) );
27 } 34 }
28 35
29+/* 36+/*
30+ The surrounding environment (or application, if there is no 37+ The surrounding environment (or application, if there is no
31+ environment, may set this. Requires Qt >= 2.3.8. 38+ environment, may set this. Requires Qt >= 2.3.8.
32+*/ 39+*/
33+bool qt_left_hand_scrollbars = FALSE; 40+bool qt_left_hand_scrollbars = FALSE;
34 41
35 /*! 42 /*!
36 Updates scrollbars - all possibilities considered. You should never 43 Updates scrollbars - all possibilities considered. You should never
37@@ -786,45 +792,50 @@ 44@@ -786,45 +792,50 @@
38 45
39 // Position the scrollbars, viewport, and corner widget. 46 // Position the scrollbars, viewport, and corner widget.
40 int bottom; 47 int bottom;
41+ int xoffset = ( qt_left_hand_scrollbars && ( showv || cornerWidget() ) ) ? vsbExt : 0; 48+ int xoffset = ( qt_left_hand_scrollbars && ( showv || cornerWidget() ) ) ? vsbExt : 0;
42+ int xpos = qt_left_hand_scrollbars ? 0 : w-vsbExt; 49+ int xpos = qt_left_hand_scrollbars ? 0 : w-vsbExt;
43+ xpos = (style() == WindowsStyle) && qt_left_hand_scrollbars ? xpos + fw : xpos - fw; 50+ xpos = (style() == WindowsStyle) && qt_left_hand_scrollbars ? xpos + fw : xpos - fw;
44+ int ypos = tmarg; 51+ int ypos = tmarg;
45+ ypos = (style() == WindowsStyle) ? ypos +fw : 0; 52+ ypos = (style() == WindowsStyle) ? ypos +fw : 0;
46 if ( showh ) { 53 if ( showh ) {
47 int right = ( showv || cornerWidget() ) ? w-vsbExt : w; 54 int right = ( showv || cornerWidget() ) ? w-vsbExt : w;
48 if ( style() == WindowsStyle ) 55 if ( style() == WindowsStyle )