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 | 247 | ||||
-rw-r--r-- | qt/qt-2.3.10.patch/qte-iconsize.patch | 99 |
2 files changed, 279 insertions, 67 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,12 +1,40 @@ | |||
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 | @@ -119,7 +119,7 @@ | ||
5 | // We want to keep source compatibility for 2.x | ||
6 | // ### TODO for 4.0: completely remove these and the cstr* functions | ||
4 | 7 | ||
8 | -#if !defined(QT_GENUINE_STR) | ||
9 | +#if 0 | ||
5 | 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 | ||
6 | 19 | ||
7 | Index: qt-2.3.10/src/iconview/qiconview.cpp | 20 | + void bufferedPaintEvent( QPaintEvent* ); |
8 | =================================================================== | 21 | virtual void resizeEvent( QResizeEvent* e ); |
9 | --- qt-2.3.10.orig/src/iconview/qiconview.cpp2005-02-24 21:09:53.059676113 +0100 | 22 | virtual void keyPressEvent( QKeyEvent *e ); |
10 | +++ qt-2.3.10/src/iconview/qiconview.cpp2005-02-24 21:10:04.601020103 +0100 | 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; |
@@ -114,8 +142,7 @@ Index: qt-2.3.10/src/iconview/qiconview.cpp | |||
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 ); |
@@ -126,8 +153,7 @@ Index: qt-2.3.10/src/iconview/qiconview.h | |||
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++ ) |
@@ -151,8 +177,7 @@ Index: qt-2.3.10/src/kernel/qgfxraster_qws.cpp | |||
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 | { |
@@ -182,8 +207,7 @@ Index: qt-2.3.10/src/kernel/qwindowsystem_qws.cpp | |||
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, |
@@ -195,8 +219,7 @@ Index: qt-2.3.10/src/kernel/qwsdecoration_qws.h | |||
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 |
@@ -208,8 +231,7 @@ Index: qt-2.3.10/src/tools/qcstring.h | |||
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 ); |
@@ -239,8 +261,7 @@ Index: qt-2.3.10/src/tools/qstring.cpp | |||
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 ) |
@@ -252,8 +273,7 @@ Index: qt-2.3.10/src/widgets/qcommonstyle.cpp | |||
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; |
@@ -269,30 +289,19 @@ Index: qt-2.3.10/src/widgets/qlistview.cpp | |||
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 ); |
@@ -311,5 +320,40 @@ Index: qt-2.3.10/src/widgets/qtabbar.cpp | |||
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() ) |
@@ -319,5 +363,27 @@ Index: qt-2.3.10/src/widgets/qtabbar.cpp | |||
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 |
@@ -326,2 +392,49 @@ Index: qt-2.3.10/src/widgets/qtabbar.cpp | |||
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 ) { | ||