summaryrefslogtreecommitdiff
path: root/packages/qte/qte-2.3.10/qte-fix-iconsize.patch
blob: cc14315bd080065cdd996b0f7870579e0b87f3be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- qt-2.3.10/src/widgets/qpopupmenu.cpp~qte-iconsize
+++ qt-2.3.10/src/widgets/qpopupmenu.cpp
@@ -820,7 +820,7 @@
 	    mi->custom()->setFont( font() );
 	if ( mi->iconSet() != 0)
 	    maxPMWidth = QMAX( maxPMWidth,
-			       mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4 );
+			       mi->iconSet()->pixmap().width() + 4 );
     }
 
     int dh = QApplication::desktop()->height();
--- qt-2.3.10/src/widgets/qtabbar.cpp~qte-iconsize
+++ qt-2.3.10/src/widgets/qtabbar.cpp
@@ -414,8 +414,8 @@
     int iw = 0;
     int ih = 0;
     if ( t->iconset != 0 ) {
-	iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width();
-	ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+	iw = t->iconset->pixmap().width();
+	ih = t->iconset->pixmap().height();
 	if (!t->label.isEmpty())
 	   iw +=2; 
     }
@@ -442,7 +442,11 @@
 	    ? QIconSet::Normal : QIconSet::Disabled;
 	if ( mode == QIconSet::Normal && has_focus )
 	    mode = QIconSet::Active;
-	QPixmap pixmap = t->iconset->pixmap( QIconSet::Small, mode );
+	QPixmap pixmap;
+	if ( mode == QIconSet::Disabled )
+		pixmap = t->iconset->pixmap( QIconSet::Automatic, QIconSet::Disabled );
+	else
+		pixmap = t->iconset->pixmap();
 	int pixw = pixmap.width();
 	int pixh = pixmap.height();
 	r.setLeft( r.left() + pixw + 2 );
@@ -871,8 +875,8 @@
 	int iw = 0;
 	int ih = 0;
 	if ( t->iconset != 0 ) {
-	    iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width();
-	    ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+	    iw = t->iconset->pixmap().width();
+	    ih = t->iconset->pixmap().height();
 	    if (!t->label.isNull())
 		iw +=2;
 	}
@@ -915,8 +919,8 @@
 	    int iw = 0;
 	    int ih = 0;
 	    if ( t->iconset != 0 ) {
-		iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width();
-		ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+		iw = t->iconset->pixmap().width();
+		ih = t->iconset->pixmap().height();
 		if (!t->label.isEmpty())
 		    iw +=2; 
 	    }
@@ -947,8 +951,8 @@
 	    int iw = 0;
 	    int ih = 0;
 	    if ( t->iconset != 0 ) {
-		iw = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).width();
-		ih = t->iconset->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+		iw = t->iconset->pixmap().width();
+		ih = t->iconset->pixmap().height();
 		if (!t->label.isEmpty())
 		    iw +=2; 
 	    }
--- qt-2.3.10/src/widgets/qwindowsstyle.cpp~qte-iconsize
+++ qt-2.3.10/src/widgets/qwindowsstyle.cpp
@@ -1182,7 +1182,7 @@
 	h = fm.height() + 2*motifItemVMargin + 2*motifItemFrame;
 
     if ( !mi->isSeparator() && mi->iconSet() != 0 ) {
-	h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame );
+	h = QMAX( h, mi->iconSet()->pixmap().height() + 2*motifItemFrame );
     }
     if ( mi->custom() )
 	h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame );
@@ -1246,7 +1246,11 @@
 	QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal;
 	if (act && !dis )
 	    mode = QIconSet::Active;
-	QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
+	QPixmap pixmap;
+	if ( mode == QIconSet::Disabled )
+		pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, QIconSet::Disabled );
+	else
+		pixmap = mi->iconSet()->pixmap();
 	int pixw = pixmap.width();
 	int pixh = pixmap.height();
 	if ( act && !dis ) {