Diffstat (limited to 'qt/qt-2.3.10.patch/qte-iconsize.patch') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qt/qt-2.3.10.patch/qte-iconsize.patch | 99 |
1 files changed, 99 insertions, 0 deletions
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 ) { | ||