summaryrefslogtreecommitdiff
path: root/desktop/icewm/patches/icewm-1.3.7-menuiconsize.patch
blob: d051d5bc5f193bc5fec16d774859ae0275d09d2e (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
diff -Naur icewm-1.3.7.bak/src/yicon.cc icewm-1.3.7/src/yicon.cc
--- icewm-1.3.7.bak/src/yicon.cc	2010-10-31 15:09:36.000000000 +0100
+++ icewm-1.3.7/src/yicon.cc	2011-11-07 19:41:52.841910531 +0100
@@ -270,6 +270,10 @@
         iconCache.getItem(0)->removeFromCache();
 }
 
+int YIcon::menuSize() {
+    return menuIconSize;
+}
+
 int YIcon::smallSize() {
     return smallIconSize;
 }
diff -Naur icewm-1.3.7.bak/src/yicon.h icewm-1.3.7/src/yicon.h
--- icewm-1.3.7.bak/src/yicon.h	2010-10-31 15:09:36.000000000 +0100
+++ icewm-1.3.7/src/yicon.h	2011-11-07 19:41:28.555296033 +0100
@@ -25,6 +25,7 @@
     bool isCached() { return fCached; }
     void setCached(bool cached) { fCached = cached; }
 
+    static int menuSize();
     static int smallSize();
     static int largeSize();
     static int hugeSize();
diff -Naur icewm-1.3.7.bak/src/ymenu.cc icewm-1.3.7/src/ymenu.cc
--- icewm-1.3.7.bak/src/ymenu.cc	2010-10-31 15:09:36.000000000 +0100
+++ icewm-1.3.7/src/ymenu.cc	2011-11-07 19:42:40.498474049 +0100
@@ -153,8 +153,8 @@
 
 #ifndef LITE
         if (getItem(selItem)->getIcon() != null &&
-            YIcon::smallSize() > h)
-            h = YIcon::smallSize();
+            YIcon::menuSize() > h)
+            h = YIcon::menuSize();
 #endif
 
         if (x <= int(width() - h - 4))
@@ -1023,8 +1023,8 @@
                     mitem->getIcon()->draw(g,
                                l + 1 + delta, t + delta + top + pad +
                                (eh - top - pad * 2 - bottom -
-                                YIcon::smallSize()) / 2,
-                                YIcon::smallSize());
+                                YIcon::menuSize()) / 2,
+                                YIcon::menuSize());
 #endif
                 }
 
diff -Naur icewm-1.3.7.bak/src/ymenuitem.cc icewm-1.3.7/src/ymenuitem.cc
--- icewm-1.3.7.bak/src/ymenuitem.cc	2010-10-31 15:09:36.000000000 +0100
+++ icewm-1.3.7/src/ymenuitem.cc	2011-11-07 19:50:04.458316916 +0100
@@ -86,8 +86,8 @@
         int ih = fontHeight;
 
 #ifndef LITE
-        if (YIcon::smallSize() > ih)
-            ih = YIcon::smallSize();
+        if (YIcon::menuSize() > ih)
+            ih = YIcon::menuSize();
 #endif
 
         if (wmLook == lookWarp4 || wmLook == lookWin95) {
@@ -123,7 +123,7 @@
     return 0;
 #else
     ref<YIcon> icon = getIcon();
-    return icon != null ? YIcon::smallSize(): 0;
+    return icon != null ? YIcon::menuSize(): 0;
 #endif
 }