author | drw <drw> | 2005-04-14 18:18:40 (UTC) |
---|---|---|
committer | drw <drw> | 2005-04-14 18:18:40 (UTC) |
commit | 5f600ec21480d1d040203407a1d2446781702230 (patch) (unidiff) | |
tree | ec60b63430dd3fb63e1ef98b193467cf9f2c3d3a | |
parent | a7776b930c9f7259a8ea52c90534952d183ad658 (diff) | |
download | opie-5f600ec21480d1d040203407a1d2446781702230.zip opie-5f600ec21480d1d040203407a1d2446781702230.tar.gz opie-5f600ec21480d1d040203407a1d2446781702230.tar.bz2 |
New patch for Qt to allow Opie to control the size of icons on tabbars and popupmenus
-rw-r--r-- | qt/qt-2.3.10.patch/qte-2.3.10-all.patch | 287 | ||||
-rw-r--r-- | qt/qt-2.3.10.patch/qte-iconsize.patch | 99 |
2 files changed, 299 insertions, 87 deletions
diff --git a/qt/qt-2.3.10.patch/qte-2.3.10-all.patch b/qt/qt-2.3.10.patch/qte-2.3.10-all.patch index 24bac51..8fc0cf0 100644 --- a/qt/qt-2.3.10.patch/qte-2.3.10-all.patch +++ b/qt/qt-2.3.10.patch/qte-2.3.10-all.patch | |||
@@ -1,327 +1,440 @@ | |||
1 | All patches (necessary) for x86 builds. Special support for devices | 1 | diff -urN qt-2.3.10-orig/include/qcstring.h qt-2.3.10-new/include/qcstring.h |
2 | like Beagle, iPAQ, SIMpad, Zaurus can be found at the OpenEmbedded | 2 | --- qt-2.3.10-orig/include/qcstring.h2005-02-27 18:07:41.000000000 -0600 |
3 | package database | 3 | +++ qt-2.3.10-new/include/qcstring.h2005-04-14 13:03:02.584481232 -0500 |
4 | 4 | @@ -119,7 +119,7 @@ | |
5 | 5 | // We want to keep source compatibility for 2.x | |
6 | 6 | // ### TODO for 4.0: completely remove these and the cstr* functions | |
7 | Index: qt-2.3.10/src/iconview/qiconview.cpp | 7 | |
8 | =================================================================== | 8 | -#if !defined(QT_GENUINE_STR) |
9 | --- qt-2.3.10.orig/src/iconview/qiconview.cpp2005-02-24 21:09:53.059676113 +0100 | 9 | +#if 0 |
10 | +++ qt-2.3.10/src/iconview/qiconview.cpp2005-02-24 21:10:04.601020103 +0100 | 10 | |
11 | #undefstrlen | ||
12 | #define strlen qstrlen | ||
13 | diff -urN qt-2.3.10-orig/include/qiconview.h qt-2.3.10-new/include/qiconview.h | ||
14 | --- qt-2.3.10-orig/include/qiconview.h2005-02-27 18:07:42.000000000 -0600 | ||
15 | +++ qt-2.3.10-new/include/qiconview.h2005-04-14 13:03:02.576482448 -0500 | ||
16 | @@ -444,6 +444,7 @@ | ||
17 | virtual void contentsDropEvent( QDropEvent *e ); | ||
18 | #endif | ||
19 | |||
20 | + void bufferedPaintEvent( QPaintEvent* ); | ||
21 | virtual void resizeEvent( QResizeEvent* e ); | ||
22 | virtual void keyPressEvent( QKeyEvent *e ); | ||
23 | virtual void focusInEvent( QFocusEvent *e ); | ||
24 | diff -urN qt-2.3.10-orig/include/qwsdecoration_qws.h qt-2.3.10-new/include/qwsdecoration_qws.h | ||
25 | --- qt-2.3.10-orig/include/qwsdecoration_qws.h2005-02-27 18:07:42.000000000 -0600 | ||
26 | +++ qt-2.3.10-new/include/qwsdecoration_qws.h2005-04-14 13:03:02.583481384 -0500 | ||
27 | @@ -50,7 +50,7 @@ | ||
28 | enum Region { None=0, All=1, Title=2, Top=3, Bottom=4, Left=5, Right=6, | ||
29 | TopLeft=7, TopRight=8, BottomLeft=9, BottomRight=10, | ||
30 | Close=11, Minimize=12, Maximize=13, Normalize=14, | ||
31 | - Menu=15, LastRegion=Menu }; | ||
32 | + Menu=15, LastRegion=Menu, UserDefined = 100 }; | ||
33 | |||
34 | virtual QRegion region(const QWidget *, const QRect &rect, Region r=All) = 0; | ||
35 | virtual void close( QWidget * ); | ||
36 | diff -urN qt-2.3.10-orig/src/iconview/qiconview.cpp qt-2.3.10-new/src/iconview/qiconview.cpp | ||
37 | --- qt-2.3.10-orig/src/iconview/qiconview.cpp2005-02-27 18:07:42.000000000 -0600 | ||
38 | +++ qt-2.3.10-new/src/iconview/qiconview.cpp2005-04-14 13:03:02.575482600 -0500 | ||
11 | @@ -225,6 +225,7 @@ | 39 | @@ -225,6 +225,7 @@ |
12 | QIconView::SelectionMode selectionMode; | 40 | QIconView::SelectionMode selectionMode; |
13 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; | 41 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; |
14 | QRect *rubber; | 42 | QRect *rubber; |
15 | + QPixmap *backBuffer; | 43 | + QPixmap *backBuffer; |
16 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, | 44 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, |
17 | *fullRedrawTimer; | 45 | *fullRedrawTimer; |
18 | int rastX, rastY, spacing; | 46 | int rastX, rastY, spacing; |
19 | @@ -2268,6 +2269,7 @@ | 47 | @@ -2268,6 +2269,7 @@ |
20 | d->currentItem = 0; | 48 | d->currentItem = 0; |
21 | d->highlightedItem = 0; | 49 | d->highlightedItem = 0; |
22 | d->rubber = 0; | 50 | d->rubber = 0; |
23 | + d->backBuffer = 0; | 51 | + d->backBuffer = 0; |
24 | d->scrollTimer = 0; | 52 | d->scrollTimer = 0; |
25 | d->startDragItem = 0; | 53 | d->startDragItem = 0; |
26 | d->tmpCurrentItem = 0; | 54 | d->tmpCurrentItem = 0; |
27 | @@ -2416,6 +2418,8 @@ | 55 | @@ -2416,6 +2418,8 @@ |
28 | delete item; | 56 | delete item; |
29 | item = tmp; | 57 | item = tmp; |
30 | } | 58 | } |
31 | + delete d->backBuffer; | 59 | + delete d->backBuffer; |
32 | + d->backBuffer = 0; | 60 | + d->backBuffer = 0; |
33 | delete d->fm; | 61 | delete d->fm; |
34 | d->fm = 0; | 62 | d->fm = 0; |
35 | #ifndef QT_NO_TOOLTIP | 63 | #ifndef QT_NO_TOOLTIP |
36 | @@ -2882,6 +2886,48 @@ | 64 | @@ -2882,6 +2886,48 @@ |
37 | } | 65 | } |
38 | 66 | ||
39 | /*! | 67 | /*! |
40 | + This function grabs all paintevents that otherwise would have been | 68 | + This function grabs all paintevents that otherwise would have been |
41 | + processed by the QScrollView::viewportPaintEvent(). Here we use a | 69 | + processed by the QScrollView::viewportPaintEvent(). Here we use a |
42 | + doublebuffer to reduce 'on-paint' flickering on QIconView | 70 | + doublebuffer to reduce 'on-paint' flickering on QIconView |
43 | + (and of course its childs). | 71 | + (and of course its childs). |
44 | + | 72 | + |
45 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() | 73 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() |
46 | +*/ | 74 | +*/ |
47 | + | 75 | + |
48 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) | 76 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) |
49 | +{ | 77 | +{ |
50 | + QWidget* vp = viewport(); | 78 | + QWidget* vp = viewport(); |
51 | + QRect r = pe->rect() & vp->rect(); | 79 | + QRect r = pe->rect() & vp->rect(); |
52 | + int ex = r.x() + contentsX(); | 80 | + int ex = r.x() + contentsX(); |
53 | + int ey = r.y() + contentsY(); | 81 | + int ey = r.y() + contentsY(); |
54 | + int ew = r.width(); | 82 | + int ew = r.width(); |
55 | + int eh = r.height(); | 83 | + int eh = r.height(); |
56 | + | 84 | + |
57 | + if ( !d->backBuffer ) | 85 | + if ( !d->backBuffer ) |
58 | +d->backBuffer = new QPixmap(vp->size()); | 86 | +d->backBuffer = new QPixmap(vp->size()); |
59 | + if ( d->backBuffer->size() != vp->size() ) { | 87 | + if ( d->backBuffer->size() != vp->size() ) { |
60 | +//Resize function (with hysteesis). Uses a good compromise between memory | 88 | +//Resize function (with hysteesis). Uses a good compromise between memory |
61 | +//consumption and speed (number) of resizes. | 89 | +//consumption and speed (number) of resizes. |
62 | + float newWidth = (float)vp->width(); | 90 | + float newWidth = (float)vp->width(); |
63 | +float newHeight = (float)vp->height(); | 91 | +float newHeight = (float)vp->height(); |
64 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) | 92 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) |
65 | +{ | 93 | +{ |
66 | + newWidth *= 1.1892; | 94 | + newWidth *= 1.1892; |
67 | + newHeight *= 1.1892; | 95 | + newHeight *= 1.1892; |
68 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 96 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
69 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) | 97 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) |
70 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 98 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
71 | + } | 99 | + } |
72 | + | 100 | + |
73 | + QPainter p; | 101 | + QPainter p; |
74 | + p.begin(d->backBuffer, vp); | 102 | + p.begin(d->backBuffer, vp); |
75 | + drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh); | 103 | + drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh); |
76 | + p.end(); | 104 | + p.end(); |
77 | + bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh); | 105 | + bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh); |
78 | +} | 106 | +} |
79 | + | 107 | + |
80 | +/*! | 108 | +/*! |
81 | + | 109 | + |
82 | \reimp | 110 | \reimp |
83 | */ | 111 | */ |
84 | 112 | ||
85 | @@ -4939,7 +4985,7 @@ | 113 | @@ -4939,7 +4985,7 @@ |
86 | if ( !d->rubber ) | 114 | if ( !d->rubber ) |
87 | drawDragShapes( d->oldDragPos ); | 115 | drawDragShapes( d->oldDragPos ); |
88 | } | 116 | } |
89 | - viewportPaintEvent( (QPaintEvent*)e ); | 117 | - viewportPaintEvent( (QPaintEvent*)e ); |
90 | + bufferedPaintEvent ((QPaintEvent*)e ); | 118 | + bufferedPaintEvent ((QPaintEvent*)e ); |
91 | if ( d->dragging ) { | 119 | if ( d->dragging ) { |
92 | if ( !d->rubber ) | 120 | if ( !d->rubber ) |
93 | drawDragShapes( d->oldDragPos ); | 121 | drawDragShapes( d->oldDragPos ); |
94 | @@ -5377,11 +5423,19 @@ | 122 | @@ -5377,11 +5423,19 @@ |
95 | return; | 123 | return; |
96 | 124 | ||
97 | if ( item->d->container1 && d->firstContainer ) { | 125 | if ( item->d->container1 && d->firstContainer ) { |
98 | -item->d->container1->items.removeRef( item ); | 126 | -item->d->container1->items.removeRef( item ); |
99 | + //Special-case checking of the last item, since this may be | 127 | + //Special-case checking of the last item, since this may be |
100 | + //called a few times for the same item. | 128 | + //called a few times for the same item. |
101 | + if (item->d->container1->items.last() == item) | 129 | + if (item->d->container1->items.last() == item) |
102 | + item->d->container1->items.removeLast(); | 130 | + item->d->container1->items.removeLast(); |
103 | + else | 131 | + else |
104 | + item->d->container1->items.removeRef( item ); | 132 | + item->d->container1->items.removeRef( item ); |
105 | } | 133 | } |
106 | item->d->container1 = 0; | 134 | item->d->container1 = 0; |
107 | if ( item->d->container2 && d->firstContainer ) { | 135 | if ( item->d->container2 && d->firstContainer ) { |
108 | -item->d->container2->items.removeRef( item ); | 136 | -item->d->container2->items.removeRef( item ); |
109 | + if (item->d->container2->items.last() == item) | 137 | + if (item->d->container2->items.last() == item) |
110 | + item->d->container2->items.removeLast(); | 138 | + item->d->container2->items.removeLast(); |
111 | + else | 139 | + else |
112 | + item->d->container2->items.removeRef( item ); | 140 | + item->d->container2->items.removeRef( item ); |
113 | } | 141 | } |
114 | item->d->container2 = 0; | 142 | item->d->container2 = 0; |
115 | 143 | ||
116 | Index: qt-2.3.10/src/iconview/qiconview.h | 144 | diff -urN qt-2.3.10-orig/src/iconview/qiconview.h qt-2.3.10-new/src/iconview/qiconview.h |
117 | =================================================================== | 145 | --- qt-2.3.10-orig/src/iconview/qiconview.h2005-02-27 18:07:42.000000000 -0600 |
118 | --- qt-2.3.10.orig/src/iconview/qiconview.h2005-02-24 21:09:53.060675971 +0100 | 146 | +++ qt-2.3.10-new/src/iconview/qiconview.h2005-04-14 13:03:02.576482448 -0500 |
119 | +++ qt-2.3.10/src/iconview/qiconview.h2005-02-24 21:10:04.602019959 +0100 | ||
120 | @@ -444,6 +444,7 @@ | 147 | @@ -444,6 +444,7 @@ |
121 | virtual void contentsDropEvent( QDropEvent *e ); | 148 | virtual void contentsDropEvent( QDropEvent *e ); |
122 | #endif | 149 | #endif |
123 | 150 | ||
124 | + void bufferedPaintEvent( QPaintEvent* ); | 151 | + void bufferedPaintEvent( QPaintEvent* ); |
125 | virtual void resizeEvent( QResizeEvent* e ); | 152 | virtual void resizeEvent( QResizeEvent* e ); |
126 | virtual void keyPressEvent( QKeyEvent *e ); | 153 | virtual void keyPressEvent( QKeyEvent *e ); |
127 | virtual void focusInEvent( QFocusEvent *e ); | 154 | virtual void focusInEvent( QFocusEvent *e ); |
128 | Index: qt-2.3.10/src/kernel/qgfxraster_qws.cpp | 155 | diff -urN qt-2.3.10-orig/src/kernel/qgfxraster_qws.cpp qt-2.3.10-new/src/kernel/qgfxraster_qws.cpp |
129 | =================================================================== | 156 | --- qt-2.3.10-orig/src/kernel/qgfxraster_qws.cpp2005-02-27 18:07:42.000000000 -0600 |
130 | --- qt-2.3.10.orig/src/kernel/qgfxraster_qws.cpp2005-02-24 21:09:54.817425663 +0100 | 157 | +++ qt-2.3.10-new/src/kernel/qgfxraster_qws.cpp2005-04-14 13:03:02.580481840 -0500 |
131 | +++ qt-2.3.10/src/kernel/qgfxraster_qws.cpp2005-02-24 21:10:02.521320506 +0100 | ||
132 | @@ -4037,13 +4037,14 @@ | 158 | @@ -4037,13 +4037,14 @@ |
133 | for( loopc2=0;loopc2<frontadd;loopc2++ ) | 159 | for( loopc2=0;loopc2<frontadd;loopc2++ ) |
134 | *(alphaptr++)=get_value_32(16,(unsigned char **)&temppos); | 160 | *(alphaptr++)=get_value_32(16,(unsigned char **)&temppos); |
135 | 161 | ||
136 | -PackType temp2; | 162 | -PackType temp2; |
137 | -unsigned char * cp; | 163 | -unsigned char * cp; |
138 | +volatile PackType temp2; | 164 | +volatile PackType temp2; |
139 | +volatile unsigned short int * cp; | 165 | +volatile unsigned short int * cp; |
140 | for( loopc2=0;loopc2<count;loopc2++ ) { | 166 | for( loopc2=0;loopc2<count;loopc2++ ) { |
141 | - temp2=*((PackType *)temppos); | 167 | - temp2=*((PackType *)temppos); |
142 | - cp=(unsigned char *)&temp2; | 168 | - cp=(unsigned char *)&temp2; |
143 | - *(alphaptr++)=get_value_32(16,&cp); | 169 | - *(alphaptr++)=get_value_32(16,&cp); |
144 | - *(alphaptr++)=get_value_32(16,&cp); | 170 | - *(alphaptr++)=get_value_32(16,&cp); |
145 | + temp2=*reinterpret_cast<PackType *>(temppos); | 171 | + temp2=*reinterpret_cast<PackType *>(temppos); |
146 | + cp=reinterpret_cast<volatile unsigned short int *>(&temp2); | 172 | + cp=reinterpret_cast<volatile unsigned short int *>(&temp2); |
147 | + *(alphaptr++)=qt_conv16ToRgb(*cp); | 173 | + *(alphaptr++)=qt_conv16ToRgb(*cp); |
148 | + cp++; | 174 | + cp++; |
149 | + *(alphaptr++)=qt_conv16ToRgb(*cp); | 175 | + *(alphaptr++)=qt_conv16ToRgb(*cp); |
150 | temppos += 2; | 176 | temppos += 2; |
151 | } | 177 | } |
152 | 178 | ||
153 | Index: qt-2.3.10/src/kernel/qwindowsystem_qws.cpp | 179 | diff -urN qt-2.3.10-orig/src/kernel/qwindowsystem_qws.cpp qt-2.3.10-new/src/kernel/qwindowsystem_qws.cpp |
154 | =================================================================== | 180 | --- qt-2.3.10-orig/src/kernel/qwindowsystem_qws.cpp2005-02-27 18:07:42.000000000 -0600 |
155 | --- qt-2.3.10.orig/src/kernel/qwindowsystem_qws.cpp2005-02-24 21:09:53.891557664 +0100 | 181 | +++ qt-2.3.10-new/src/kernel/qwindowsystem_qws.cpp2005-04-14 13:03:02.582481536 -0500 |
156 | +++ qt-2.3.10/src/kernel/qwindowsystem_qws.cpp2005-02-24 21:10:03.511177634 +0100 | ||
157 | @@ -918,6 +918,18 @@ | 182 | @@ -918,6 +918,18 @@ |
158 | { | 183 | { |
159 | } | 184 | } |
160 | 185 | ||
161 | +static void catchSegvSignal( int ) | 186 | +static void catchSegvSignal( int ) |
162 | +{ | 187 | +{ |
163 | +#ifndef QT_NO_QWS_KEYBOARD | 188 | +#ifndef QT_NO_QWS_KEYBOARD |
164 | + if ( qwsServer ) | 189 | + if ( qwsServer ) |
165 | +qwsServer->closeKeyboard(); | 190 | +qwsServer->closeKeyboard(); |
166 | +#endif | 191 | +#endif |
167 | + QWSServer::closedown(); | 192 | + QWSServer::closedown(); |
168 | + fprintf(stderr, "Segmentation fault.\n"); | 193 | + fprintf(stderr, "Segmentation fault.\n"); |
169 | + exit(1); | 194 | + exit(1); |
170 | +} | 195 | +} |
171 | + | 196 | + |
172 | + | 197 | + |
173 | /*! | 198 | /*! |
174 | \class QWSServer qwindowsystem_qws.h | 199 | \class QWSServer qwindowsystem_qws.h |
175 | \brief Server-specific functionality in Qt/Embedded | 200 | \brief Server-specific functionality in Qt/Embedded |
176 | @@ -1043,6 +1055,7 @@ | 201 | @@ -1043,6 +1055,7 @@ |
177 | } | 202 | } |
178 | 203 | ||
179 | signal(SIGPIPE, ignoreSignal); //we get it when we read | 204 | signal(SIGPIPE, ignoreSignal); //we get it when we read |
180 | + signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash | 205 | + signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash |
181 | #endif | 206 | #endif |
182 | focusw = 0; | 207 | focusw = 0; |
183 | mouseGrabber = 0; | 208 | mouseGrabber = 0; |
184 | Index: qt-2.3.10/src/kernel/qwsdecoration_qws.h | 209 | diff -urN qt-2.3.10-orig/src/kernel/qwsdecoration_qws.h qt-2.3.10-new/src/kernel/qwsdecoration_qws.h |
185 | =================================================================== | 210 | --- qt-2.3.10-orig/src/kernel/qwsdecoration_qws.h2005-02-27 18:07:42.000000000 -0600 |
186 | --- qt-2.3.10.orig/src/kernel/qwsdecoration_qws.h2005-02-24 21:09:54.355491532 +0100 | 211 | +++ qt-2.3.10-new/src/kernel/qwsdecoration_qws.h2005-04-14 13:03:02.583481384 -0500 |
187 | +++ qt-2.3.10/src/kernel/qwsdecoration_qws.h2005-02-24 21:10:03.040245652 +0100 | ||
188 | @@ -50,7 +50,7 @@ | 212 | @@ -50,7 +50,7 @@ |
189 | enum Region { None=0, All=1, Title=2, Top=3, Bottom=4, Left=5, Right=6, | 213 | enum Region { None=0, All=1, Title=2, Top=3, Bottom=4, Left=5, Right=6, |
190 | TopLeft=7, TopRight=8, BottomLeft=9, BottomRight=10, | 214 | TopLeft=7, TopRight=8, BottomLeft=9, BottomRight=10, |
191 | Close=11, Minimize=12, Maximize=13, Normalize=14, | 215 | Close=11, Minimize=12, Maximize=13, Normalize=14, |
192 | - Menu=15, LastRegion=Menu }; | 216 | - Menu=15, LastRegion=Menu }; |
193 | + Menu=15, LastRegion=Menu, UserDefined = 100 }; | 217 | + Menu=15, LastRegion=Menu, UserDefined = 100 }; |
194 | 218 | ||
195 | virtual QRegion region(const QWidget *, const QRect &rect, Region r=All) = 0; | 219 | virtual QRegion region(const QWidget *, const QRect &rect, Region r=All) = 0; |
196 | virtual void close( QWidget * ); | 220 | virtual void close( QWidget * ); |
197 | Index: qt-2.3.10/src/tools/qcstring.h | 221 | diff -urN qt-2.3.10-orig/src/tools/qcstring.h qt-2.3.10-new/src/tools/qcstring.h |
198 | =================================================================== | 222 | --- qt-2.3.10-orig/src/tools/qcstring.h2005-02-27 18:07:41.000000000 -0600 |
199 | --- qt-2.3.10.orig/src/tools/qcstring.h2005-02-24 21:09:54.354491675 +0100 | 223 | +++ qt-2.3.10-new/src/tools/qcstring.h2005-04-14 13:03:02.584481232 -0500 |
200 | +++ qt-2.3.10/src/tools/qcstring.h2005-02-24 21:10:03.026247674 +0100 | ||
201 | @@ -119,7 +119,7 @@ | 224 | @@ -119,7 +119,7 @@ |
202 | // We want to keep source compatibility for 2.x | 225 | // We want to keep source compatibility for 2.x |
203 | // ### TODO for 4.0: completely remove these and the cstr* functions | 226 | // ### TODO for 4.0: completely remove these and the cstr* functions |
204 | 227 | ||
205 | -#if !defined(QT_GENUINE_STR) | 228 | -#if !defined(QT_GENUINE_STR) |
206 | +#if 0 | 229 | +#if 0 |
207 | 230 | ||
208 | #undefstrlen | 231 | #undefstrlen |
209 | #define strlen qstrlen | 232 | #define strlen qstrlen |
210 | Index: qt-2.3.10/src/tools/qstring.cpp | 233 | diff -urN qt-2.3.10-orig/src/tools/qstring.cpp qt-2.3.10-new/src/tools/qstring.cpp |
211 | =================================================================== | 234 | --- qt-2.3.10-orig/src/tools/qstring.cpp2005-02-27 18:07:42.000000000 -0600 |
212 | --- qt-2.3.10.orig/src/tools/qstring.cpp2005-02-24 21:09:55.291358022 +0100 | 235 | +++ qt-2.3.10-new/src/tools/qstring.cpp2005-04-14 13:03:02.593479864 -0500 |
213 | +++ qt-2.3.10/src/tools/qstring.cpp2005-02-24 21:10:01.748431931 +0100 | ||
214 | @@ -14469,7 +14469,11 @@ | 236 | @@ -14469,7 +14469,11 @@ |
215 | return qt_winQString2MB( *this ); | 237 | return qt_winQString2MB( *this ); |
216 | #endif | 238 | #endif |
217 | #ifdef _WS_QWS_ | 239 | #ifdef _WS_QWS_ |
218 | - return utf8(); // ##### if there is ANY 8 bit format supported? | 240 | - return utf8(); // ##### if there is ANY 8 bit format supported? |
219 | + QTextCodec* codec = QTextCodec::codecForLocale(); | 241 | + QTextCodec* codec = QTextCodec::codecForLocale(); |
220 | + return codec | 242 | + return codec |
221 | + ? codec->fromUnicode(*this) | 243 | + ? codec->fromUnicode(*this) |
222 | + : utf8(); | 244 | + : utf8(); |
223 | + //return latin1(); // ##### if there is ANY 8 bit format supported? | 245 | + //return latin1(); // ##### if there is ANY 8 bit format supported? |
224 | #endif | 246 | #endif |
225 | #endif | 247 | #endif |
226 | } | 248 | } |
227 | @@ -14515,7 +14519,12 @@ | 249 | @@ -14515,7 +14519,12 @@ |
228 | return qt_winMB2QString( local8Bit ); | 250 | return qt_winMB2QString( local8Bit ); |
229 | #endif | 251 | #endif |
230 | #ifdef _WS_QWS_ | 252 | #ifdef _WS_QWS_ |
231 | - return fromUtf8(local8Bit,len); | 253 | - return fromUtf8(local8Bit,len); |
232 | + QTextCodec* codec = QTextCodec::codecForLocale(); | 254 | + QTextCodec* codec = QTextCodec::codecForLocale(); |
233 | + if( len < 0) len = qstrlen(local8Bit); | 255 | + if( len < 0) len = qstrlen(local8Bit); |
234 | + return codec | 256 | + return codec |
235 | + ? codec->toUnicode(local8Bit, len) | 257 | + ? codec->toUnicode(local8Bit, len) |
236 | + : QString::fromUtf8(local8Bit,len); | 258 | + : QString::fromUtf8(local8Bit,len); |
237 | +// return fromLatin1(local8Bit,len); | 259 | +// return fromLatin1(local8Bit,len); |
238 | #endif | 260 | #endif |
239 | #endif // QT_NO_TEXTCODEC | 261 | #endif // QT_NO_TEXTCODEC |
240 | } | 262 | } |
241 | Index: qt-2.3.10/src/widgets/qcommonstyle.cpp | 263 | diff -urN qt-2.3.10-orig/src/widgets/qcommonstyle.cpp qt-2.3.10-new/src/widgets/qcommonstyle.cpp |
242 | =================================================================== | 264 | --- qt-2.3.10-orig/src/widgets/qcommonstyle.cpp2005-02-27 18:07:41.000000000 -0600 |
243 | --- qt-2.3.10.orig/src/widgets/qcommonstyle.cpp2005-02-24 21:09:53.864561508 +0100 | 265 | +++ qt-2.3.10-new/src/widgets/qcommonstyle.cpp2005-04-14 13:03:02.595479560 -0500 |
244 | +++ qt-2.3.10/src/widgets/qcommonstyle.cpp2005-02-24 21:10:03.484181533 +0100 | ||
245 | @@ -572,7 +572,7 @@ | 266 | @@ -572,7 +572,7 @@ |
246 | bool enabled, bool active ) | 267 | bool enabled, bool active ) |
247 | { | 268 | { |
248 | #ifndef QT_NO_MENUBAR | 269 | #ifndef QT_NO_MENUBAR |
249 | -#ifndef QT_NO_STYLE_SGI | 270 | -#ifndef QT_NO_STYLE_SGI |
250 | +#if 1 // #ifndef QT_NO_STYLE_SGI | 271 | +#if 1 // #ifndef QT_NO_STYLE_SGI |
251 | if (draw_menu_bar_impl != 0) { | 272 | if (draw_menu_bar_impl != 0) { |
252 | QDrawMenuBarItemImpl impl = draw_menu_bar_impl; | 273 | QDrawMenuBarItemImpl impl = draw_menu_bar_impl; |
253 | (this->*impl)(p, x, y, w, h, mi, g, enabled, active); | 274 | (this->*impl)(p, x, y, w, h, mi, g, enabled, active); |
254 | Index: qt-2.3.10/src/widgets/qlistview.cpp | 275 | diff -urN qt-2.3.10-orig/src/widgets/qlistview.cpp qt-2.3.10-new/src/widgets/qlistview.cpp |
255 | =================================================================== | 276 | --- qt-2.3.10-orig/src/widgets/qlistview.cpp2005-02-27 18:07:41.000000000 -0600 |
256 | --- qt-2.3.10.orig/src/widgets/qlistview.cpp2005-02-24 21:09:53.868560939 +0100 | 277 | +++ qt-2.3.10-new/src/widgets/qlistview.cpp2005-04-14 13:03:02.599478952 -0500 |
257 | +++ qt-2.3.10/src/widgets/qlistview.cpp2005-02-24 21:10:03.500179222 +0100 | ||
258 | @@ -5051,9 +5051,9 @@ | 278 | @@ -5051,9 +5051,9 @@ |
259 | l = l->childItem ? l->childItem : l->siblingItem; | 279 | l = l->childItem ? l->childItem : l->siblingItem; |
260 | 280 | ||
261 | if ( l && l->height() ) | 281 | if ( l && l->height() ) |
262 | -s.setHeight( s.height() + 10 * l->height() ); | 282 | -s.setHeight( s.height() + 10 * l->height() ); |
263 | - else | 283 | - else |
264 | -s.setHeight( s.height() + 140 ); | 284 | -s.setHeight( s.height() + 140 ); |
265 | +s.setHeight( s.height() + 4 /*10*/ * l->height() ); | 285 | +s.setHeight( s.height() + 4 /*10*/ * l->height() ); |
266 | + else // ^v much too big for handhelds | 286 | + else // ^v much too big for handhelds |
267 | +s.setHeight( s.height() + 30 /*140*/ ); | 287 | +s.setHeight( s.height() + 30 /*140*/ ); |
268 | 288 | ||
269 | if ( s.width() > s.height() * 3 ) | 289 | if ( s.width() > s.height() * 3 ) |
270 | s.setHeight( s.width() / 3 ); | 290 | s.setHeight( s.width() / 3 ); |
271 | Index: qt-2.3.10/src/widgets/qtoolbutton.cpp | 291 | diff -urN qt-2.3.10-orig/src/widgets/qpopupmenu.cpp qt-2.3.10-new/src/widgets/qpopupmenu.cpp |
272 | =================================================================== | 292 | --- qt-2.3.10-orig/src/widgets/qpopupmenu.cpp2005-02-27 18:07:41.000000000 -0600 |
273 | --- qt-2.3.10.orig/src/widgets/qtoolbutton.cpp2005-02-24 21:09:53.868560939 +0100 | 293 | +++ qt-2.3.10-new/src/widgets/qpopupmenu.cpp2005-04-14 13:02:10.440408336 -0500 |
274 | +++ qt-2.3.10/src/widgets/qtoolbutton.cpp2005-02-24 21:10:03.524175756 +0100 | 294 | @@ -820,7 +820,7 @@ |
275 | @@ -332,12 +332,12 @@ | 295 | mi->custom()->setFont( font() ); |
276 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal); | 296 | if ( mi->iconSet() != 0) |
277 | w = pm.width(); | 297 | maxPMWidth = QMAX( maxPMWidth, |
278 | h = pm.height(); | 298 | - mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4 ); |
279 | -if ( w < 32 ) | 299 | + mi->iconSet()->pixmap().width() + 4 ); |
280 | - w = 32; | 300 | } |
281 | -if ( h < 32 ) | 301 | |
282 | - h = 32; | 302 | int dh = QApplication::desktop()->height(); |
283 | +if ( w < 24 ) | 303 | diff -urN qt-2.3.10-orig/src/widgets/qtabbar.cpp qt-2.3.10-new/src/widgets/qtabbar.cpp |
284 | + w = 24; | 304 | --- qt-2.3.10-orig/src/widgets/qtabbar.cpp2005-02-27 18:07:41.000000000 -0600 |
285 | +if ( h < 24 ) | 305 | +++ qt-2.3.10-new/src/widgets/qtabbar.cpp2005-04-14 13:03:02.601478648 -0500 |
286 | + h = 24; | ||
287 | } else { | ||
288 | -w = h = 16; | ||
289 | +w = h = 14; | ||
290 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal); | ||
291 | w = pm.width(); | ||
292 | h = pm.height(); | ||
293 | Index: qt-2.3.10/src/widgets/qtabbar.cpp | ||
294 | =================================================================== | ||
295 | --- qt-2.3.10.orig/src/widgets/qtabbar.cpp2005-02-27 18:07:41.000000000 -0600 | ||
296 | +++ qt-2.3.10/src/widgets/qtabbar.cpp2005-02-28 11:16:56.444377440 -0600 | ||
297 | @@ -260,7 +260,6 @@ | 306 | @@ -260,7 +260,6 @@ |
298 | lstatic->insert( index, newTab ); | 307 | lstatic->insert( index, newTab ); |
299 | 308 | ||
300 | layoutTabs(); | 309 | layoutTabs(); |
301 | - updateArrowButtons(); | 310 | - updateArrowButtons(); |
302 | makeVisible( tab( currentTab() ) ); | 311 | makeVisible( tab( currentTab() ) ); |
303 | 312 | ||
304 | #ifndef QT_NO_ACCEL | 313 | #ifndef QT_NO_ACCEL |
305 | @@ -282,7 +281,6 @@ | 314 | @@ -282,7 +281,6 @@ |
306 | l->remove( t ); | 315 | l->remove( t ); |
307 | lstatic->remove( t ); | 316 | lstatic->remove( t ); |
308 | layoutTabs(); | 317 | layoutTabs(); |
309 | - updateArrowButtons(); | 318 | - updateArrowButtons(); |
310 | makeVisible( tab( currentTab() ) ); | 319 | makeVisible( tab( currentTab() ) ); |
311 | update(); | 320 | update(); |
312 | } | 321 | } |
313 | @@ -887,6 +885,7 @@ | 322 | @@ -414,8 +412,8 @@ |
323 | int iw = 0; | ||
324 | int ih = 0; | ||
325 | if ( t->iconset != 0 ) { | ||
326 | -iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width(); | ||
327 | -ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height(); | ||
328 | +iw = t->iconset->pixmap().width(); | ||
329 | +ih = t->iconset->pixmap().height(); | ||
330 | if (!t->label.isEmpty()) | ||
331 | iw +=2; | ||
332 | } | ||
333 | @@ -442,7 +440,11 @@ | ||
334 | ? QIconSet::Normal : QIconSet::Disabled; | ||
335 | if ( mode == QIconSet::Normal && has_focus ) | ||
336 | mode = QIconSet::Active; | ||
337 | -QPixmap pixmap = t->iconset->pixmap( QIconSet::Small, mode ); | ||
338 | +QPixmap pixmap; | ||
339 | +if ( mode == QIconSet::Disabled ) | ||
340 | + pixmap = t->iconset->pixmap( QIconSet::Automatic, QIconSet::Disabled ); | ||
341 | +else | ||
342 | + pixmap = t->iconset->pixmap(); | ||
343 | int pixw = pixmap.width(); | ||
344 | int pixh = pixmap.height(); | ||
345 | r.setLeft( r.left() + pixw + 2 ); | ||
346 | @@ -871,8 +873,8 @@ | ||
347 | int iw = 0; | ||
348 | int ih = 0; | ||
349 | if ( t->iconset != 0 ) { | ||
350 | - iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width(); | ||
351 | - ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height(); | ||
352 | + iw = t->iconset->pixmap().width(); | ||
353 | + ih = t->iconset->pixmap().height(); | ||
354 | if (!t->label.isNull()) | ||
355 | iw +=2; | ||
356 | } | ||
357 | @@ -887,6 +889,7 @@ | ||
314 | } | 358 | } |
315 | for ( t = lstatic->first(); t; t = lstatic->next() ) | 359 | for ( t = lstatic->first(); t; t = lstatic->next() ) |
316 | t->r.setHeight( r.height() ); | 360 | t->r.setHeight( r.height() ); |
317 | + updateArrowButtons(); | 361 | + updateArrowButtons(); |
318 | } | 362 | } |
319 | 363 | ||
320 | /*! | 364 | /*! |
321 | @@ -977,7 +976,6 @@ | 365 | @@ -915,8 +918,8 @@ |
366 | int iw = 0; | ||
367 | int ih = 0; | ||
368 | if ( t->iconset != 0 ) { | ||
369 | - iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width(); | ||
370 | - ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height(); | ||
371 | + iw = t->iconset->pixmap().width(); | ||
372 | + ih = t->iconset->pixmap().height(); | ||
373 | if (!t->label.isEmpty()) | ||
374 | iw +=2; | ||
375 | } | ||
376 | @@ -947,8 +950,8 @@ | ||
377 | int iw = 0; | ||
378 | int ih = 0; | ||
379 | if ( t->iconset != 0 ) { | ||
380 | - iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width(); | ||
381 | - ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height(); | ||
382 | + iw = t->iconset->pixmap().width(); | ||
383 | + ih = t->iconset->pixmap().height(); | ||
384 | if (!t->label.isEmpty()) | ||
385 | iw +=2; | ||
386 | } | ||
387 | @@ -977,7 +980,6 @@ | ||
322 | d->leftB->setGeometry( width() - 2*arrowWidth, 0, arrowWidth, height() ); | 388 | d->leftB->setGeometry( width() - 2*arrowWidth, 0, arrowWidth, height() ); |
323 | #endif | 389 | #endif |
324 | layoutTabs(); | 390 | layoutTabs(); |
325 | - updateArrowButtons(); | 391 | - updateArrowButtons(); |
326 | makeVisible( tab( currentTab() )); | 392 | makeVisible( tab( currentTab() )); |
327 | } | 393 | } |
394 | |||
395 | diff -urN qt-2.3.10-orig/src/widgets/qtoolbutton.cpp qt-2.3.10-new/src/widgets/qtoolbutton.cpp | ||
396 | --- qt-2.3.10-orig/src/widgets/qtoolbutton.cpp2005-02-27 18:07:41.000000000 -0600 | ||
397 | +++ qt-2.3.10-new/src/widgets/qtoolbutton.cpp2005-04-14 13:03:02.600478800 -0500 | ||
398 | @@ -332,12 +332,12 @@ | ||
399 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal); | ||
400 | w = pm.width(); | ||
401 | h = pm.height(); | ||
402 | -if ( w < 32 ) | ||
403 | - w = 32; | ||
404 | -if ( h < 32 ) | ||
405 | - h = 32; | ||
406 | +if ( w < 24 ) | ||
407 | + w = 24; | ||
408 | +if ( h < 24 ) | ||
409 | + h = 24; | ||
410 | } else { | ||
411 | -w = h = 16; | ||
412 | +w = h = 14; | ||
413 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal); | ||
414 | w = pm.width(); | ||
415 | h = pm.height(); | ||
416 | diff -urN qt-2.3.10-orig/src/widgets/qwindowsstyle.cpp qt-2.3.10-new/src/widgets/qwindowsstyle.cpp | ||
417 | --- qt-2.3.10-orig/src/widgets/qwindowsstyle.cpp2005-02-27 18:07:41.000000000 -0600 | ||
418 | +++ qt-2.3.10-new/src/widgets/qwindowsstyle.cpp2005-04-14 13:02:10.442408032 -0500 | ||
419 | @@ -1182,7 +1182,7 @@ | ||
420 | h = fm.height() + 2*motifItemVMargin + 2*motifItemFrame; | ||
421 | |||
422 | if ( !mi->isSeparator() && mi->iconSet() != 0 ) { | ||
423 | -h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame ); | ||
424 | +h = QMAX( h, mi->iconSet()->pixmap().height() + 2*motifItemFrame ); | ||
425 | } | ||
426 | if ( mi->custom() ) | ||
427 | h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame ); | ||
428 | @@ -1246,7 +1246,11 @@ | ||
429 | QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal; | ||
430 | if (act && !dis ) | ||
431 | mode = QIconSet::Active; | ||
432 | -QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode ); | ||
433 | +QPixmap pixmap; | ||
434 | +if ( mode == QIconSet::Disabled ) | ||
435 | + pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, QIconSet::Disabled ); | ||
436 | +else | ||
437 | + pixmap = mi->iconSet()->pixmap(); | ||
438 | int pixw = pixmap.width(); | ||
439 | int pixh = pixmap.height(); | ||
440 | if ( act && !dis ) { | ||
diff --git a/qt/qt-2.3.10.patch/qte-iconsize.patch b/qt/qt-2.3.10.patch/qte-iconsize.patch new file mode 100644 index 0000000..cc14315 --- a/dev/null +++ b/qt/qt-2.3.10.patch/qte-iconsize.patch | |||
@@ -0,0 +1,99 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- qt-2.3.10/src/widgets/qpopupmenu.cpp~qte-iconsize | ||
7 | +++ qt-2.3.10/src/widgets/qpopupmenu.cpp | ||
8 | @@ -820,7 +820,7 @@ | ||
9 | mi->custom()->setFont( font() ); | ||
10 | if ( mi->iconSet() != 0) | ||
11 | maxPMWidth = QMAX( maxPMWidth, | ||
12 | - mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4 ); | ||
13 | + mi->iconSet()->pixmap().width() + 4 ); | ||
14 | } | ||
15 | |||
16 | int dh = QApplication::desktop()->height(); | ||
17 | --- qt-2.3.10/src/widgets/qtabbar.cpp~qte-iconsize | ||
18 | +++ qt-2.3.10/src/widgets/qtabbar.cpp | ||
19 | @@ -414,8 +414,8 @@ | ||
20 | int iw = 0; | ||
21 | int ih = 0; | ||
22 | if ( t->iconset != 0 ) { | ||
23 | -iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width(); | ||
24 | -ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height(); | ||
25 | +iw = t->iconset->pixmap().width(); | ||
26 | +ih = t->iconset->pixmap().height(); | ||
27 | if (!t->label.isEmpty()) | ||
28 | iw +=2; | ||
29 | } | ||
30 | @@ -442,7 +442,11 @@ | ||
31 | ? QIconSet::Normal : QIconSet::Disabled; | ||
32 | if ( mode == QIconSet::Normal && has_focus ) | ||
33 | mode = QIconSet::Active; | ||
34 | -QPixmap pixmap = t->iconset->pixmap( QIconSet::Small, mode ); | ||
35 | +QPixmap pixmap; | ||
36 | +if ( mode == QIconSet::Disabled ) | ||
37 | + pixmap = t->iconset->pixmap( QIconSet::Automatic, QIconSet::Disabled ); | ||
38 | +else | ||
39 | + pixmap = t->iconset->pixmap(); | ||
40 | int pixw = pixmap.width(); | ||
41 | int pixh = pixmap.height(); | ||
42 | r.setLeft( r.left() + pixw + 2 ); | ||
43 | @@ -871,8 +875,8 @@ | ||
44 | int iw = 0; | ||
45 | int ih = 0; | ||
46 | if ( t->iconset != 0 ) { | ||
47 | - iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width(); | ||
48 | - ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height(); | ||
49 | + iw = t->iconset->pixmap().width(); | ||
50 | + ih = t->iconset->pixmap().height(); | ||
51 | if (!t->label.isNull()) | ||
52 | iw +=2; | ||
53 | } | ||
54 | @@ -915,8 +919,8 @@ | ||
55 | int iw = 0; | ||
56 | int ih = 0; | ||
57 | if ( t->iconset != 0 ) { | ||
58 | - iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width(); | ||
59 | - ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height(); | ||
60 | + iw = t->iconset->pixmap().width(); | ||
61 | + ih = t->iconset->pixmap().height(); | ||
62 | if (!t->label.isEmpty()) | ||
63 | iw +=2; | ||
64 | } | ||
65 | @@ -947,8 +951,8 @@ | ||
66 | int iw = 0; | ||
67 | int ih = 0; | ||
68 | if ( t->iconset != 0 ) { | ||
69 | - iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width(); | ||
70 | - ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height(); | ||
71 | + iw = t->iconset->pixmap().width(); | ||
72 | + ih = t->iconset->pixmap().height(); | ||
73 | if (!t->label.isEmpty()) | ||
74 | iw +=2; | ||
75 | } | ||
76 | --- qt-2.3.10/src/widgets/qwindowsstyle.cpp~qte-iconsize | ||
77 | +++ qt-2.3.10/src/widgets/qwindowsstyle.cpp | ||
78 | @@ -1182,7 +1182,7 @@ | ||
79 | h = fm.height() + 2*motifItemVMargin + 2*motifItemFrame; | ||
80 | |||
81 | if ( !mi->isSeparator() && mi->iconSet() != 0 ) { | ||
82 | -h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame ); | ||
83 | +h = QMAX( h, mi->iconSet()->pixmap().height() + 2*motifItemFrame ); | ||
84 | } | ||
85 | if ( mi->custom() ) | ||
86 | h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame ); | ||
87 | @@ -1246,7 +1246,11 @@ | ||
88 | QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal; | ||
89 | if (act && !dis ) | ||
90 | mode = QIconSet::Active; | ||
91 | -QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode ); | ||
92 | +QPixmap pixmap; | ||
93 | +if ( mode == QIconSet::Disabled ) | ||
94 | + pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, QIconSet::Disabled ); | ||
95 | +else | ||
96 | + pixmap = mi->iconSet()->pixmap(); | ||
97 | int pixw = pixmap.width(); | ||
98 | int pixh = pixmap.height(); | ||
99 | if ( act && !dis ) { | ||