summaryrefslogtreecommitdiff
path: root/qt/left-handed-qt236.patch
authorzecke <zecke>2003-08-29 14:12:57 (UTC)
committer zecke <zecke>2003-08-29 14:12:57 (UTC)
commited6da2303a8fabec50991365914f0e4d20a21ea6 (patch) (unidiff)
treebaa3375e902891150d66572306dd94ae7454ed71 /qt/left-handed-qt236.patch
parentd8fadaf4f510803983d0b8b99994fd70e770ccab (diff)
downloadopie-ed6da2303a8fabec50991365914f0e4d20a21ea6.zip
opie-ed6da2303a8fabec50991365914f0e4d20a21ea6.tar.gz
opie-ed6da2303a8fabec50991365914f0e4d20a21ea6.tar.bz2
Usability for our left handed users ( me! )
Diffstat (limited to 'qt/left-handed-qt236.patch') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/left-handed-qt236.patch169
1 files changed, 169 insertions, 0 deletions
diff --git a/qt/left-handed-qt236.patch b/qt/left-handed-qt236.patch
new file mode 100644
index 0000000..45353c7
--- a/dev/null
+++ b/qt/left-handed-qt236.patch
@@ -0,0 +1,169 @@
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 );