summaryrefslogtreecommitdiff
path: root/qt
authorzecke <zecke>2004-06-13 18:54:52 (UTC)
committer zecke <zecke>2004-06-13 18:54:52 (UTC)
commitf74ad6f0e20cb803321cec629cd8d37abc966571 (patch) (unidiff)
treea29a11e41f53d4ea763d68b4dd77082796e43e28 /qt
parent139a1f3273e8691b39029e8fbc455ec97a700018 (diff)
downloadopie-f74ad6f0e20cb803321cec629cd8d37abc966571.zip
opie-f74ad6f0e20cb803321cec629cd8d37abc966571.tar.gz
opie-f74ad6f0e20cb803321cec629cd8d37abc966571.tar.bz2
Lefthand Patch rediffed and applies now to QtE 2.3.7
It is the one from Qt2.3.8
Diffstat (limited to 'qt') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/left-handed-qt236.patch169
-rw-r--r--qt/qt-2.3.7.patch/qte237-lefthand.patch126
2 files changed, 63 insertions, 232 deletions
diff --git a/qt/left-handed-qt236.patch b/qt/left-handed-qt236.patch
deleted file mode 100644
index 45353c7..0000000
--- a/qt/left-handed-qt236.patch
+++ b/dev/null
@@ -1,169 +0,0 @@
1Index: table/qtable.cpp
2===================================================================
3RCS file: /home/ich/cvs/TT/qt/src/table/qtable.cpp,v
4retrieving revision 1.1.1.1
5diff -u -r1.1.1.1 qtable.cpp
6 --- table/qtable.cpp 17 Aug 2003 14:22:32 -00001.1.1.1
7 +++ table/qtable.cpp29 Aug 2003 13:59:56 -0000
8@@ -500,7 +500,7 @@
9
10 if ( rw == -1 || cl == -1 )
11 return;
12 -
13+
14 int rrow = rw;
15 int rcol = cl;
16 if ( rowspan > 1 || colspan > 1 ) {
17@@ -1190,7 +1190,7 @@
18
19 if ( rowh == 0 )
20 continue;
21 -
22+
23 // Go through the columns in row r
24 // if we know from where to where, go through [colfirst, collast],
25 // else go through all of them
26@@ -1204,7 +1204,7 @@
27
28 if ( colw == 0 )
29 continue;
30 -
31+
32 QTableItem *itm = item( r, c );
33 if ( itm &&
34 ( itm->colSpan() > 1 || itm->rowSpan() > 1 ) ) {
35@@ -2345,6 +2345,7 @@
36 {
37 if ( inUpdateGeometries )
38 return;
39+
40 inUpdateGeometries = TRUE;
41 QSize ts = tableSize();
42 if ( topHeader->offset() &&
43@@ -2354,9 +2355,13 @@
44 ts.height() < leftHeader->offset() + leftHeader->height() )
45 verticalScrollBar()->setValue( ts.height() - leftHeader->height() );
46
47- leftHeader->setGeometry( frameWidth(), topMargin() + frameWidth(),
48+ /*
49+ * for the scrollbar on the left side simply using framewidth is
50+ * not enough cause this would overdraw the scrollbar
51+ */
52+ leftHeader->setGeometry( frameWidth()+ frameRect().left(), topMargin() + frameWidth(),
53 leftMargin(), visibleHeight() );
54- topHeader->setGeometry( leftMargin() + frameWidth(), frameWidth(),
55+ topHeader->setGeometry( leftMargin() + frameWidth() + frameRect().left(), frameWidth(),
56 visibleWidth(), topMargin() );
57 inUpdateGeometries = FALSE;
58 }
59Index: widgets/qscrollview.cpp
60===================================================================
61RCS file: /home/ich/cvs/TT/qt/src/widgets/qscrollview.cpp,v
62retrieving revision 1.1.1.2
63diff -u -r1.1.1.2 qscrollview.cpp
64 --- widgets/qscrollview.cpp 17 Aug 2003 14:24:04 -00001.1.1.2
65 +++ widgets/qscrollview.cpp29 Aug 2003 14:03:13 -0000
66@@ -786,45 +786,56 @@
67
68 // Position the scrollbars, viewport, and corner widget.
69 int bottom;
70+#ifdef QT_FOR_LEFT_HAND
71+ static bool left = true;
72+#else
73+ static bool left = false;
74+#endif
75+ int xoffset = ( left && ( showv || cornerWidget() ) ) ? vsbExt : 0;
76+ int xpos = left ? 0 : w-vsbExt;
77+ xpos = (style() == WindowsStyle) && left ? xpos + fw : xpos - fw;
78+ int ypos = tmarg;
79+ ypos = (style() == WindowsStyle) ? ypos +fw : 0;
80 if ( showh ) {
81 int right = ( showv || cornerWidget() ) ? w-vsbExt : w;
82 if ( style() == WindowsStyle )
83- setHBarGeometry(d->hbar, fw, h-hsbExt-fw,
84+ setHBarGeometry(d->hbar, fw + xoffset , h-hsbExt-fw,
85 right-fw-fw, hsbExt );
86 else
87- setHBarGeometry(d->hbar, 0, h-hsbExt, right,
88+ setHBarGeometry(d->hbar, 0+ xoffset, h-hsbExt, right,
89 hsbExt );
90 bottom=h-hsbExt;
91 } else {
92 bottom=h;
93 }
94 if ( showv ) {
95 -clipper()->setGeometry( lmarg, tmarg,
96 +clipper()->setGeometry( lmarg + xoffset, tmarg,
97 w-vsbExt-lmarg-rmarg,
98 bottom-tmarg-bmarg );
99 d->viewportResized( w-vsbExt-lmarg-rmarg, bottom-tmarg-bmarg );
100 -if ( style() == WindowsStyle )
101 - changeFrameRect(QRect(0, 0, w, h) );
102 -else
103 - changeFrameRect(QRect(0, 0, w-vsbExt, bottom));
104 +if ( style() == WindowsStyle ) {
105 + changeFrameRect(QRect(xoffset, 0, w, h) );
106 +}else{
107 + changeFrameRect(QRect(xoffset, 0, w-vsbExt, bottom));
108+ }
109 if (cornerWidget()) {
110 if ( style() == WindowsStyle )
111- setVBarGeometry( d->vbar, w-vsbExt-fw,
112- fw, vsbExt,
113- h-hsbExt-fw-fw );
114+ setVBarGeometry( d->vbar, xpos,
115+ ypos, vsbExt,
116+ bottom-fw-ypos );
117 else
118- setVBarGeometry( d->vbar, w-vsbExt, 0,
119+ setVBarGeometry( d->vbar, xpos, ypos,
120 vsbExt,
121- h-hsbExt );
122+ bottom-ypos );
123 }
124 else {
125 if ( style() == WindowsStyle )
126- setVBarGeometry( d->vbar, w-vsbExt-fw,
127- fw, vsbExt,
128- bottom-fw-fw );
129+ setVBarGeometry( d->vbar, xpos,
130+ ypos, vsbExt,
131+ bottom-fw-ypos );
132 else
133- setVBarGeometry( d->vbar, w-vsbExt, 0,
134- vsbExt, bottom );
135+ setVBarGeometry( d->vbar, xpos, ypos,
136+ vsbExt, bottom-ypos );
137 }
138 } else {
139 if ( style() == WindowsStyle )
140@@ -837,12 +848,12 @@
141 }
142 if ( d->corner ) {
143 if ( style() == WindowsStyle )
144- d->corner->setGeometry( w-vsbExt-fw,
145+ d->corner->setGeometry( xpos,
146 h-hsbExt-fw,
147 vsbExt,
148 hsbExt );
149 else
150- d->corner->setGeometry( w-vsbExt,
151+ d->corner->setGeometry( xpos,
152 h-hsbExt,
153 vsbExt,
154 hsbExt );
155@@ -2058,12 +2069,12 @@
156 void QScrollView::changeFrameRect(const QRect& r)
157 {
158 QRect oldr = frameRect();
159- if (oldr != r) {
160+ if (oldr != r) {
161 QRect cr = contentsRect();
162 QRegion fr( frameRect() );
163 fr = fr.subtract( contentsRect() );
164 setFrameRect( r );
165 -if ( isVisible() ) {
166+ if ( isVisible() ) {
167 cr = cr.intersect( contentsRect() );
168 fr = fr.unite( frameRect() );
169 fr = fr.subtract( cr );
diff --git a/qt/qt-2.3.7.patch/qte237-lefthand.patch b/qt/qt-2.3.7.patch/qte237-lefthand.patch
index 1cddd29..0a0cccf 100644
--- a/qt/qt-2.3.7.patch/qte237-lefthand.patch
+++ b/qt/qt-2.3.7.patch/qte237-lefthand.patch
@@ -1,5 +1,5 @@
1diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollview.cpp 1diff -u qt-2.3.7_orig/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp
2 --- qt-2.3.7/src/widgets/qscrollview.cpp2004-06-13 20:45:16.000000000 +0200 2 --- qt-2.3.7_orig/src/widgets/qscrollview.cpp2004-06-13 20:42:54.000000000 +0200
3 +++ 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
4@@ -526,16 +526,15 @@ 4@@ -526,15 +526,16 @@
5 this, SLOT( doDragAutoScroll() ) ); 5 this, SLOT( doDragAutoScroll() ) );
@@ -7,10 +7,10 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
7 7
8- connect( &d->hbar, SIGNAL( valueChanged(int) ), 8- connect( &d->hbar, SIGNAL( valueChanged( int ) ),
9 -this, SLOT( hslide(int) ) ); 9 -this, SLOT( hslide( int ) ) );
10- connect( &d->vbar, SIGNAL( valueChanged(int) ), 10- connect( &d->vbar, SIGNAL( valueChanged( int ) ),
11 -this, SLOT( vslide(int) ) ); 11 -this, SLOT( vslide( int ) ) );
12+ connect( &d->hbar, SIGNAL( valueChanged( int ) ), 12+ connect( &d->hbar, SIGNAL( valueChanged(int) ),
13 +this, SLOT( hslide( int ) ) ); 13 +this, SLOT( hslide(int) ) );
14+ connect( &d->vbar, SIGNAL( valueChanged( int ) ), 14+ connect( &d->vbar, SIGNAL( valueChanged(int) ),
15 +this, SLOT( vslide( int ) ) ); 15 +this, SLOT( vslide(int) ) );
16 d->viewport.installEventFilter( this ); 16 d->viewport.installEventFilter( this );
@@ -20,3 +20,3 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
20 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); 20 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
21- 21+
22 } 22 }
@@ -24,3 +24,3 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
24 24
25@@ -684,11 +683,6 @@ 25@@ -683,6 +684,11 @@
26 h-tmarg-bmarg - (showh ? hsbExt : 0) ); 26 h-tmarg-bmarg - (showh ? hsbExt : 0) );
@@ -28,7 +28,7 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
28 28
29-/* 29+/*
30- The surrounding environment (or application, if there is no 30+ The surrounding environment (or application, if there is no
31- environment, may set this. Requires Qt >= 2.3.8. 31+ environment, may set this. Requires Qt >= 2.3.8.
32-*/ 32+*/
33-bool qt_left_hand_scrollbars = FALSE; 33+bool qt_left_hand_scrollbars = FALSE;
34 34
@@ -36,3 +36,3 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
36 Updates scrollbars - all possibilities considered. You should never 36 Updates scrollbars - all possibilities considered. You should never
37@@ -792,50 +786,45 @@ 37@@ -786,45 +792,50 @@
38 38
@@ -40,7 +40,7 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
40 int bottom; 40 int bottom;
41- int xoffset = ( qt_left_hand_scrollbars && ( showv || cornerWidget() ) ) ? vsbExt : 0; 41+ int xoffset = ( qt_left_hand_scrollbars && ( showv || cornerWidget() ) ) ? vsbExt : 0;
42- int xpos = qt_left_hand_scrollbars ? 0 : w-vsbExt; 42+ int xpos = qt_left_hand_scrollbars ? 0 : w-vsbExt;
43- xpos = (style() == WindowsStyle) && qt_left_hand_scrollbars ? xpos + fw : xpos - fw; 43+ xpos = (style() == WindowsStyle) && qt_left_hand_scrollbars ? xpos + fw : xpos - fw;
44- int ypos = tmarg; 44+ int ypos = tmarg;
45- ypos = (style() == WindowsStyle) ? ypos +fw : 0; 45+ ypos = (style() == WindowsStyle) ? ypos +fw : 0;
46 if ( showh ) { 46 if ( showh ) {
@@ -48,8 +48,8 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
48 if ( style() == WindowsStyle ) 48 if ( style() == WindowsStyle )
49- setHBarGeometry(d->hbar, fw + xoffset , h-hsbExt-fw, 49- setHBarGeometry(d->hbar, fw, h-hsbExt-fw,
50+ setHBarGeometry(d->hbar, fw, h-hsbExt-fw, 50+ setHBarGeometry(d->hbar, fw + xoffset , h-hsbExt-fw,
51 right-fw-fw, hsbExt ); 51 right-fw-fw, hsbExt );
52 else 52 else
53- setHBarGeometry(d->hbar, 0+ xoffset, h-hsbExt, right, 53- setHBarGeometry(d->hbar, 0, h-hsbExt, right,
54+ setHBarGeometry(d->hbar, 0, h-hsbExt, right, 54+ setHBarGeometry(d->hbar, 0+ xoffset, h-hsbExt, right,
55 hsbExt ); 55 hsbExt );
@@ -60,4 +60,4 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
60 if ( showv ) { 60 if ( showv ) {
61 -clipper()->setGeometry( lmarg + xoffset, tmarg, 61 -clipper()->setGeometry( lmarg, tmarg,
62 +clipper()->setGeometry( lmarg, tmarg, 62 +clipper()->setGeometry( lmarg + xoffset, tmarg,
63 w-vsbExt-lmarg-rmarg, 63 w-vsbExt-lmarg-rmarg,
@@ -66,21 +66,21 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
66 if ( style() == WindowsStyle ) 66 if ( style() == WindowsStyle )
67 - changeFrameRect(QRect(xoffset, 0, w, h) ); 67 - changeFrameRect(QRect(0, 0, w, h) );
68 + changeFrameRect(QRect(0, 0, w, h) ); 68 + changeFrameRect(QRect(xoffset, 0, w, h) );
69 else 69 else
70 - changeFrameRect(QRect(xoffset, 0, w-vsbExt, bottom)); 70 - changeFrameRect(QRect(0, 0, w-vsbExt, bottom));
71 + changeFrameRect(QRect(0, 0, w-vsbExt, bottom)); 71 + changeFrameRect(QRect(xoffset, 0, w-vsbExt, bottom));
72 if (cornerWidget()) { 72 if (cornerWidget()) {
73 if ( style() == WindowsStyle ) 73 if ( style() == WindowsStyle )
74- setVBarGeometry( d->vbar, xpos, 74- setVBarGeometry( d->vbar, w-vsbExt-fw,
75- ypos, vsbExt, 75- fw, vsbExt,
76- bottom-fw-ypos ); 76- h-hsbExt-fw-fw );
77+ setVBarGeometry( d->vbar, w-vsbExt-fw, 77+ setVBarGeometry( d->vbar, xpos,
78+ fw, vsbExt, 78+ ypos, vsbExt,
79+ h-hsbExt-fw-fw ); 79+ bottom-fw-ypos );
80 else 80 else
81- setVBarGeometry( d->vbar, xpos, ypos, 81- setVBarGeometry( d->vbar, w-vsbExt, 0,
82+ setVBarGeometry( d->vbar, w-vsbExt, 0, 82+ setVBarGeometry( d->vbar, xpos, ypos,
83 vsbExt, 83 vsbExt,
84- bottom-ypos ); 84- h-hsbExt );
85+ h-hsbExt ); 85+ bottom-ypos );
86 } 86 }
@@ -88,13 +88,13 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
88 if ( style() == WindowsStyle ) 88 if ( style() == WindowsStyle )
89- setVBarGeometry( d->vbar, xpos, 89- setVBarGeometry( d->vbar, w-vsbExt-fw,
90- ypos, vsbExt, 90- fw, vsbExt,
91- bottom-fw-ypos ); 91- bottom-fw-fw );
92+ setVBarGeometry( d->vbar, w-vsbExt-fw, 92+ setVBarGeometry( d->vbar, xpos,
93+ fw, vsbExt, 93+ ypos, vsbExt,
94+ bottom-fw-fw ); 94+ bottom-fw-ypos );
95 else 95 else
96- setVBarGeometry( d->vbar, xpos, ypos, 96- setVBarGeometry( d->vbar, w-vsbExt, 0,
97- vsbExt, bottom-ypos ); 97- vsbExt, bottom );
98+ setVBarGeometry( d->vbar, w-vsbExt, 0, 98+ setVBarGeometry( d->vbar, xpos, ypos,
99+ vsbExt, bottom ); 99+ vsbExt, bottom-ypos );
100 } 100 }
@@ -102,3 +102,3 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
102 if ( style() == WindowsStyle ) 102 if ( style() == WindowsStyle )
103@@ -848,12 +837,12 @@ 103@@ -837,12 +848,12 @@
104 } 104 }
@@ -106,4 +106,4 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
106 if ( style() == WindowsStyle ) 106 if ( style() == WindowsStyle )
107- d->corner->setGeometry( xpos, 107- d->corner->setGeometry( w-vsbExt-fw,
108+ d->corner->setGeometry( w-vsbExt-fw, 108+ d->corner->setGeometry( xpos,
109 h-hsbExt-fw, 109 h-hsbExt-fw,
@@ -112,4 +112,4 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
112 else 112 else
113- d->corner->setGeometry( xpos, 113- d->corner->setGeometry( w-vsbExt,
114+ d->corner->setGeometry( w-vsbExt, 114+ d->corner->setGeometry( xpos,
115 h-hsbExt, 115 h-hsbExt,
@@ -117,3 +117,3 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
117 hsbExt ); 117 hsbExt );
118@@ -1686,7 +1675,7 @@ 118@@ -1675,7 +1686,7 @@
119 } 119 }
@@ -121,4 +121,4 @@ diff -u qt-2.3.7/src/widgets/qscrollview.cpp qt-2.3.7_orig/src/widgets/qscrollvi
121 /*! 121 /*!
122- Scrolls the content by \a dx to the left and \a dy upwards. 122- Scrolls the content by \a x to the left and \a y upwards.
123+ Scrolls the content by \a x to the left and \a y upwards. 123+ Scrolls the content by \a dx to the left and \a dy upwards.
124 */ 124 */