diff --git a/Makefile.pl b/Makefile.pl
index b006c7b..fe5349c 100755
--- a/Makefile.pl
+++ b/Makefile.pl
@@ -210,7 +210,7 @@ if (param_get("static")) {
}
foreach my $l (@library_targets) {
- my $warn = "-Wall -Wextra -Wno-sign-compare";
+ my $warn = "-Wall -Wextra -Wno-sign-compare -Wno-unused-value";
my $s = $l;
my $o = $object_suffix;
$o =~ s/\./\\\./g;
diff --git a/include/Mw/Core.h b/include/Mw/Core.h
index c51398c..e873b41 100644
--- a/include/Mw/Core.h
+++ b/include/Mw/Core.h
@@ -315,6 +315,13 @@ MWDECL void MwReparent(MwWidget handle, MwWidget new_parent);
*/
MWDECL MwClass MwGetClass(MwWidget handle);
+/*!
+ * @brief Gets name of widget
+ * @param handle Widget
+ * @return Name
+ */
+MWDECL const char* MwGetName(MwWidget handle);
+
/*!
* @brief Gets children of widget
* @param handle Widget
diff --git a/include/Mw/LowLevel/GDI.h b/include/Mw/LowLevel/GDI.h
index dc35ffe..9fee9ac 100644
--- a/include/Mw/LowLevel/GDI.h
+++ b/include/Mw/LowLevel/GDI.h
@@ -20,6 +20,7 @@ struct _MwLLGDI {
HICON icon;
int grabbed;
+ int force_render;
};
struct _MwLLGDIColor {
@@ -37,6 +38,7 @@ struct _MwLLGDIPixmap {
HBITMAP hMask2;
};
-MWDECL int MwLLGDICallInit(void);
+MWDECL int MwLLGDICallInit(void);
+MWDECL HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask);
#endif
diff --git a/include/Mw/LowLevel/X11.h b/include/Mw/LowLevel/X11.h
index 6e4c8fb..ab9c43d 100644
--- a/include/Mw/LowLevel/X11.h
+++ b/include/Mw/LowLevel/X11.h
@@ -68,6 +68,7 @@ struct _MwLLX11Pixmap {
XImage* mask;
};
-MWDECL int MwLLX11CallInit(void);
+MWDECL int MwLLX11CallInit(void);
+MWDECL Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask);
#endif
diff --git a/include/Mw/StringDefs.h b/include/Mw/StringDefs.h
index 0834865..a51f981 100644
--- a/include/Mw/StringDefs.h
+++ b/include/Mw/StringDefs.h
@@ -30,6 +30,7 @@
#define MwNflat "Iflat"
#define MwNshowArrows "IshowArrows"
#define MwNpadding "Ipadding"
+#define MwNborderWidth "IborderWidth"
#define MwNtitle "Stitle"
#define MwNtext "Stext"
diff --git a/milsko.xml b/milsko.xml
index 9c2a5cc..45f7c28 100644
--- a/milsko.xml
+++ b/milsko.xml
@@ -21,6 +21,12 @@
+
+
+
+
+
+
@@ -41,6 +47,7 @@
- MwNy
- MwNwidth
- MwNheight
+ - MwNborderWidth
Integer properties must be prefixed with I.
String properties must be prefixed with S.
@@ -73,6 +80,7 @@
+
@@ -353,6 +361,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resource/font/7x14.bdf b/resource/font/7x14.bdf
index 7f3a2f9..6e6c13e 100644
--- a/resource/font/7x14.bdf
+++ b/resource/font/7x14.bdf
@@ -603,18 +603,18 @@ BBX 7 14 0 -2
BITMAP
00
00
+00
08
2A
1C
08
+08
1C
2A
08
00
00
00
-00
-00
ENDCHAR
STARTCHAR 002b
ENCODING 43
diff --git a/resource/font/7x14B.bdf b/resource/font/7x14B.bdf
index 4572771..a99d925 100644
--- a/resource/font/7x14B.bdf
+++ b/resource/font/7x14B.bdf
@@ -603,18 +603,18 @@ BBX 7 14 0 -2
BITMAP
00
00
+00
5a
5a
3c
18
+18
3c
5a
5a
00
00
00
-00
-00
ENDCHAR
STARTCHAR 002b
ENCODING 43
diff --git a/resource/rgb.txt b/resource/rgb.txt
index c5f7be8..7096643 100644
--- a/resource/rgb.txt
+++ b/resource/rgb.txt
@@ -57,6 +57,14 @@
119 136 153 LightSlateGrey
190 190 190 gray
190 190 190 grey
+190 190 190 x11 gray
+190 190 190 X11Gray
+190 190 190 x11 grey
+190 190 190 X11Grey
+128 128 128 web gray
+128 128 128 WebGray
+128 128 128 web grey
+128 128 128 WebGrey
211 211 211 light grey
211 211 211 LightGrey
211 211 211 light gray
@@ -105,6 +113,7 @@
72 209 204 MediumTurquoise
64 224 208 turquoise
0 255 255 cyan
+ 0 255 255 aqua
224 255 255 light cyan
224 255 255 LightCyan
95 158 160 cadet blue
@@ -131,6 +140,11 @@
124 252 0 lawn green
124 252 0 LawnGreen
0 255 0 green
+ 0 255 0 lime
+ 0 255 0 x11 green
+ 0 255 0 X11Green
+ 0 128 0 web green
+ 0 128 0 WebGreen
127 255 0 chartreuse
0 250 154 medium spring green
0 250 154 MediumSpringGreen
@@ -154,7 +168,7 @@
255 255 224 light yellow
255 255 224 LightYellow
255 255 0 yellow
-255 215 0 gold
+255 215 0 gold
238 221 130 light goldenrod
238 221 130 LightGoldenrod
218 165 32 goldenrod
@@ -202,11 +216,16 @@
219 112 147 pale violet red
219 112 147 PaleVioletRed
176 48 96 maroon
+176 48 96 x11 maroon
+176 48 96 X11Maroon
+128 0 0 web maroon
+128 0 0 WebMaroon
199 21 133 medium violet red
199 21 133 MediumVioletRed
208 32 144 violet red
208 32 144 VioletRed
255 0 255 magenta
+255 0 255 fuchsia
238 130 238 violet
221 160 221 plum
218 112 214 orchid
@@ -219,6 +238,10 @@
138 43 226 blue violet
138 43 226 BlueViolet
160 32 240 purple
+160 32 240 x11 purple
+160 32 240 X11Purple
+128 0 128 web purple
+128 0 128 WebPurple
147 112 219 medium purple
147 112 219 MediumPurple
216 191 216 thistle
@@ -245,7 +268,7 @@
255 222 173 NavajoWhite1
238 207 161 NavajoWhite2
205 179 139 NavajoWhite3
-139 121 94 NavajoWhite4
+139 121 94 NavajoWhite4
255 250 205 LemonChiffon1
238 233 191 LemonChiffon2
205 201 165 LemonChiffon3
@@ -353,131 +376,131 @@
84 255 159 SeaGreen1
78 238 148 SeaGreen2
67 205 128 SeaGreen3
- 46 139 87 SeaGreen4
+ 46 139 87 SeaGreen4
154 255 154 PaleGreen1
144 238 144 PaleGreen2
124 205 124 PaleGreen3
- 84 139 84 PaleGreen4
+ 84 139 84 PaleGreen4
0 255 127 SpringGreen1
0 238 118 SpringGreen2
0 205 102 SpringGreen3
- 0 139 69 SpringGreen4
- 0 255 0 green1
- 0 238 0 green2
- 0 205 0 green3
- 0 139 0 green4
-127 255 0 chartreuse1
-118 238 0 chartreuse2
-102 205 0 chartreuse3
- 69 139 0 chartreuse4
-192 255 62 OliveDrab1
-179 238 58 OliveDrab2
-154 205 50 OliveDrab3
-105 139 34 OliveDrab4
+ 0 139 69 SpringGreen4
+ 0 255 0 green1
+ 0 238 0 green2
+ 0 205 0 green3
+ 0 139 0 green4
+127 255 0 chartreuse1
+118 238 0 chartreuse2
+102 205 0 chartreuse3
+ 69 139 0 chartreuse4
+192 255 62 OliveDrab1
+179 238 58 OliveDrab2
+154 205 50 OliveDrab3
+105 139 34 OliveDrab4
202 255 112 DarkOliveGreen1
188 238 104 DarkOliveGreen2
-162 205 90 DarkOliveGreen3
-110 139 61 DarkOliveGreen4
+162 205 90 DarkOliveGreen3
+110 139 61 DarkOliveGreen4
255 246 143 khaki1
238 230 133 khaki2
205 198 115 khaki3
-139 134 78 khaki4
+139 134 78 khaki4
255 236 139 LightGoldenrod1
238 220 130 LightGoldenrod2
205 190 112 LightGoldenrod3
-139 129 76 LightGoldenrod4
+139 129 76 LightGoldenrod4
255 255 224 LightYellow1
238 238 209 LightYellow2
205 205 180 LightYellow3
139 139 122 LightYellow4
-255 255 0 yellow1
-238 238 0 yellow2
-205 205 0 yellow3
-139 139 0 yellow4
-255 215 0 gold1
-238 201 0 gold2
-205 173 0 gold3
-139 117 0 gold4
-255 193 37 goldenrod1
-238 180 34 goldenrod2
-205 155 29 goldenrod3
-139 105 20 goldenrod4
-255 185 15 DarkGoldenrod1
-238 173 14 DarkGoldenrod2
-205 149 12 DarkGoldenrod3
-139 101 8 DarkGoldenrod4
+255 255 0 yellow1
+238 238 0 yellow2
+205 205 0 yellow3
+139 139 0 yellow4
+255 215 0 gold1
+238 201 0 gold2
+205 173 0 gold3
+139 117 0 gold4
+255 193 37 goldenrod1
+238 180 34 goldenrod2
+205 155 29 goldenrod3
+139 105 20 goldenrod4
+255 185 15 DarkGoldenrod1
+238 173 14 DarkGoldenrod2
+205 149 12 DarkGoldenrod3
+139 101 8 DarkGoldenrod4
255 193 193 RosyBrown1
238 180 180 RosyBrown2
205 155 155 RosyBrown3
139 105 105 RosyBrown4
255 106 106 IndianRed1
-238 99 99 IndianRed2
-205 85 85 IndianRed3
-139 58 58 IndianRed4
-255 130 71 sienna1
-238 121 66 sienna2
-205 104 57 sienna3
-139 71 38 sienna4
+238 99 99 IndianRed2
+205 85 85 IndianRed3
+139 58 58 IndianRed4
+255 130 71 sienna1
+238 121 66 sienna2
+205 104 57 sienna3
+139 71 38 sienna4
255 211 155 burlywood1
238 197 145 burlywood2
205 170 125 burlywood3
-139 115 85 burlywood4
+139 115 85 burlywood4
255 231 186 wheat1
238 216 174 wheat2
205 186 150 wheat3
139 126 102 wheat4
-255 165 79 tan1
-238 154 73 tan2
-205 133 63 tan3
-139 90 43 tan4
-255 127 36 chocolate1
-238 118 33 chocolate2
-205 102 29 chocolate3
-139 69 19 chocolate4
-255 48 48 firebrick1
-238 44 44 firebrick2
-205 38 38 firebrick3
-139 26 26 firebrick4
-255 64 64 brown1
-238 59 59 brown2
-205 51 51 brown3
-139 35 35 brown4
+255 165 79 tan1
+238 154 73 tan2
+205 133 63 tan3
+139 90 43 tan4
+255 127 36 chocolate1
+238 118 33 chocolate2
+205 102 29 chocolate3
+139 69 19 chocolate4
+255 48 48 firebrick1
+238 44 44 firebrick2
+205 38 38 firebrick3
+139 26 26 firebrick4
+255 64 64 brown1
+238 59 59 brown2
+205 51 51 brown3
+139 35 35 brown4
255 140 105 salmon1
-238 130 98 salmon2
-205 112 84 salmon3
-139 76 57 salmon4
+238 130 98 salmon2
+205 112 84 salmon3
+139 76 57 salmon4
255 160 122 LightSalmon1
238 149 114 LightSalmon2
-205 129 98 LightSalmon3
-139 87 66 LightSalmon4
-255 165 0 orange1
-238 154 0 orange2
-205 133 0 orange3
-139 90 0 orange4
-255 127 0 DarkOrange1
-238 118 0 DarkOrange2
-205 102 0 DarkOrange3
-139 69 0 DarkOrange4
-255 114 86 coral1
-238 106 80 coral2
-205 91 69 coral3
-139 62 47 coral4
-255 99 71 tomato1
-238 92 66 tomato2
-205 79 57 tomato3
-139 54 38 tomato4
-255 69 0 OrangeRed1
-238 64 0 OrangeRed2
-205 55 0 OrangeRed3
-139 37 0 OrangeRed4
-255 0 0 red1
-238 0 0 red2
-205 0 0 red3
-139 0 0 red4
+205 129 98 LightSalmon3
+139 87 66 LightSalmon4
+255 165 0 orange1
+238 154 0 orange2
+205 133 0 orange3
+139 90 0 orange4
+255 127 0 DarkOrange1
+238 118 0 DarkOrange2
+205 102 0 DarkOrange3
+139 69 0 DarkOrange4
+255 114 86 coral1
+238 106 80 coral2
+205 91 69 coral3
+139 62 47 coral4
+255 99 71 tomato1
+238 92 66 tomato2
+205 79 57 tomato3
+139 54 38 tomato4
+255 69 0 OrangeRed1
+238 64 0 OrangeRed2
+205 55 0 OrangeRed3
+139 37 0 OrangeRed4
+255 0 0 red1
+238 0 0 red2
+205 0 0 red3
+139 0 0 red4
255 20 147 DeepPink1
238 18 137 DeepPink2
205 16 118 DeepPink3
-139 10 80 DeepPink4
+139 10 80 DeepPink4
255 110 180 HotPink1
238 106 167 HotPink2
205 96 144 HotPink3
@@ -493,15 +516,15 @@
255 130 171 PaleVioletRed1
238 121 159 PaleVioletRed2
205 104 137 PaleVioletRed3
-139 71 93 PaleVioletRed4
+139 71 93 PaleVioletRed4
255 52 179 maroon1
238 48 167 maroon2
205 41 144 maroon3
-139 28 98 maroon4
+139 28 98 maroon4
255 62 150 VioletRed1
238 58 140 VioletRed2
205 50 120 VioletRed3
-139 34 82 VioletRed4
+139 34 82 VioletRed4
255 0 255 magenta1
238 0 238 magenta2
205 0 205 magenta3
@@ -542,197 +565,218 @@
5 5 5 grey2
8 8 8 gray3
8 8 8 grey3
- 10 10 10 gray4
- 10 10 10 grey4
- 13 13 13 gray5
- 13 13 13 grey5
- 15 15 15 gray6
- 15 15 15 grey6
- 18 18 18 gray7
- 18 18 18 grey7
- 20 20 20 gray8
- 20 20 20 grey8
- 23 23 23 gray9
- 23 23 23 grey9
- 26 26 26 gray10
- 26 26 26 grey10
- 28 28 28 gray11
- 28 28 28 grey11
- 31 31 31 gray12
- 31 31 31 grey12
- 33 33 33 gray13
- 33 33 33 grey13
- 36 36 36 gray14
- 36 36 36 grey14
- 38 38 38 gray15
- 38 38 38 grey15
- 41 41 41 gray16
- 41 41 41 grey16
- 43 43 43 gray17
- 43 43 43 grey17
- 46 46 46 gray18
- 46 46 46 grey18
- 48 48 48 gray19
- 48 48 48 grey19
- 51 51 51 gray20
- 51 51 51 grey20
- 54 54 54 gray21
- 54 54 54 grey21
- 56 56 56 gray22
- 56 56 56 grey22
- 59 59 59 gray23
- 59 59 59 grey23
- 61 61 61 gray24
- 61 61 61 grey24
- 64 64 64 gray25
- 64 64 64 grey25
- 66 66 66 gray26
- 66 66 66 grey26
- 69 69 69 gray27
- 69 69 69 grey27
- 71 71 71 gray28
- 71 71 71 grey28
- 74 74 74 gray29
- 74 74 74 grey29
- 77 77 77 gray30
- 77 77 77 grey30
- 79 79 79 gray31
- 79 79 79 grey31
- 82 82 82 gray32
- 82 82 82 grey32
- 84 84 84 gray33
- 84 84 84 grey33
- 87 87 87 gray34
- 87 87 87 grey34
- 89 89 89 gray35
- 89 89 89 grey35
- 92 92 92 gray36
- 92 92 92 grey36
- 94 94 94 gray37
- 94 94 94 grey37
- 97 97 97 gray38
- 97 97 97 grey38
- 99 99 99 gray39
- 99 99 99 grey39
-102 102 102 gray40
-102 102 102 grey40
-105 105 105 gray41
-105 105 105 grey41
-107 107 107 gray42
-107 107 107 grey42
-110 110 110 gray43
-110 110 110 grey43
-112 112 112 gray44
-112 112 112 grey44
-115 115 115 gray45
-115 115 115 grey45
-117 117 117 gray46
-117 117 117 grey46
-120 120 120 gray47
-120 120 120 grey47
-122 122 122 gray48
-122 122 122 grey48
-125 125 125 gray49
-125 125 125 grey49
-127 127 127 gray50
-127 127 127 grey50
-130 130 130 gray51
-130 130 130 grey51
-133 133 133 gray52
-133 133 133 grey52
-135 135 135 gray53
-135 135 135 grey53
-138 138 138 gray54
-138 138 138 grey54
-140 140 140 gray55
-140 140 140 grey55
-143 143 143 gray56
-143 143 143 grey56
-145 145 145 gray57
-145 145 145 grey57
-148 148 148 gray58
-148 148 148 grey58
-150 150 150 gray59
-150 150 150 grey59
-153 153 153 gray60
-153 153 153 grey60
-156 156 156 gray61
-156 156 156 grey61
-158 158 158 gray62
-158 158 158 grey62
-161 161 161 gray63
-161 161 161 grey63
-163 163 163 gray64
-163 163 163 grey64
-166 166 166 gray65
-166 166 166 grey65
-168 168 168 gray66
-168 168 168 grey66
-171 171 171 gray67
-171 171 171 grey67
-173 173 173 gray68
-173 173 173 grey68
-176 176 176 gray69
-176 176 176 grey69
-179 179 179 gray70
-179 179 179 grey70
-181 181 181 gray71
-181 181 181 grey71
-184 184 184 gray72
-184 184 184 grey72
-186 186 186 gray73
-186 186 186 grey73
-189 189 189 gray74
-189 189 189 grey74
-191 191 191 gray75
-191 191 191 grey75
-194 194 194 gray76
-194 194 194 grey76
-196 196 196 gray77
-196 196 196 grey77
-199 199 199 gray78
-199 199 199 grey78
-201 201 201 gray79
-201 201 201 grey79
-204 204 204 gray80
-204 204 204 grey80
-207 207 207 gray81
-207 207 207 grey81
-209 209 209 gray82
-209 209 209 grey82
-212 212 212 gray83
-212 212 212 grey83
-214 214 214 gray84
-214 214 214 grey84
-217 217 217 gray85
-217 217 217 grey85
-219 219 219 gray86
-219 219 219 grey86
-222 222 222 gray87
-222 222 222 grey87
-224 224 224 gray88
-224 224 224 grey88
-227 227 227 gray89
-227 227 227 grey89
-229 229 229 gray90
-229 229 229 grey90
-232 232 232 gray91
-232 232 232 grey91
-235 235 235 gray92
-235 235 235 grey92
-237 237 237 gray93
-237 237 237 grey93
-240 240 240 gray94
-240 240 240 grey94
-242 242 242 gray95
-242 242 242 grey95
-245 245 245 gray96
-245 245 245 grey96
-247 247 247 gray97
-247 247 247 grey97
-250 250 250 gray98
-250 250 250 grey98
-252 252 252 gray99
-252 252 252 grey99
-255 255 255 gray100
-255 255 255 grey100
+ 10 10 10 gray4
+ 10 10 10 grey4
+ 13 13 13 gray5
+ 13 13 13 grey5
+ 15 15 15 gray6
+ 15 15 15 grey6
+ 18 18 18 gray7
+ 18 18 18 grey7
+ 20 20 20 gray8
+ 20 20 20 grey8
+ 23 23 23 gray9
+ 23 23 23 grey9
+ 26 26 26 gray10
+ 26 26 26 grey10
+ 28 28 28 gray11
+ 28 28 28 grey11
+ 31 31 31 gray12
+ 31 31 31 grey12
+ 33 33 33 gray13
+ 33 33 33 grey13
+ 36 36 36 gray14
+ 36 36 36 grey14
+ 38 38 38 gray15
+ 38 38 38 grey15
+ 41 41 41 gray16
+ 41 41 41 grey16
+ 43 43 43 gray17
+ 43 43 43 grey17
+ 46 46 46 gray18
+ 46 46 46 grey18
+ 48 48 48 gray19
+ 48 48 48 grey19
+ 51 51 51 gray20
+ 51 51 51 grey20
+ 54 54 54 gray21
+ 54 54 54 grey21
+ 56 56 56 gray22
+ 56 56 56 grey22
+ 59 59 59 gray23
+ 59 59 59 grey23
+ 61 61 61 gray24
+ 61 61 61 grey24
+ 64 64 64 gray25
+ 64 64 64 grey25
+ 66 66 66 gray26
+ 66 66 66 grey26
+ 69 69 69 gray27
+ 69 69 69 grey27
+ 71 71 71 gray28
+ 71 71 71 grey28
+ 74 74 74 gray29
+ 74 74 74 grey29
+ 77 77 77 gray30
+ 77 77 77 grey30
+ 79 79 79 gray31
+ 79 79 79 grey31
+ 82 82 82 gray32
+ 82 82 82 grey32
+ 84 84 84 gray33
+ 84 84 84 grey33
+ 87 87 87 gray34
+ 87 87 87 grey34
+ 89 89 89 gray35
+ 89 89 89 grey35
+ 92 92 92 gray36
+ 92 92 92 grey36
+ 94 94 94 gray37
+ 94 94 94 grey37
+ 97 97 97 gray38
+ 97 97 97 grey38
+ 99 99 99 gray39
+ 99 99 99 grey39
+102 102 102 gray40
+102 102 102 grey40
+105 105 105 gray41
+105 105 105 grey41
+107 107 107 gray42
+107 107 107 grey42
+110 110 110 gray43
+110 110 110 grey43
+112 112 112 gray44
+112 112 112 grey44
+115 115 115 gray45
+115 115 115 grey45
+117 117 117 gray46
+117 117 117 grey46
+120 120 120 gray47
+120 120 120 grey47
+122 122 122 gray48
+122 122 122 grey48
+125 125 125 gray49
+125 125 125 grey49
+127 127 127 gray50
+127 127 127 grey50
+130 130 130 gray51
+130 130 130 grey51
+133 133 133 gray52
+133 133 133 grey52
+135 135 135 gray53
+135 135 135 grey53
+138 138 138 gray54
+138 138 138 grey54
+140 140 140 gray55
+140 140 140 grey55
+143 143 143 gray56
+143 143 143 grey56
+145 145 145 gray57
+145 145 145 grey57
+148 148 148 gray58
+148 148 148 grey58
+150 150 150 gray59
+150 150 150 grey59
+153 153 153 gray60
+153 153 153 grey60
+156 156 156 gray61
+156 156 156 grey61
+158 158 158 gray62
+158 158 158 grey62
+161 161 161 gray63
+161 161 161 grey63
+163 163 163 gray64
+163 163 163 grey64
+166 166 166 gray65
+166 166 166 grey65
+168 168 168 gray66
+168 168 168 grey66
+171 171 171 gray67
+171 171 171 grey67
+173 173 173 gray68
+173 173 173 grey68
+176 176 176 gray69
+176 176 176 grey69
+179 179 179 gray70
+179 179 179 grey70
+181 181 181 gray71
+181 181 181 grey71
+184 184 184 gray72
+184 184 184 grey72
+186 186 186 gray73
+186 186 186 grey73
+189 189 189 gray74
+189 189 189 grey74
+191 191 191 gray75
+191 191 191 grey75
+194 194 194 gray76
+194 194 194 grey76
+196 196 196 gray77
+196 196 196 grey77
+199 199 199 gray78
+199 199 199 grey78
+201 201 201 gray79
+201 201 201 grey79
+204 204 204 gray80
+204 204 204 grey80
+207 207 207 gray81
+207 207 207 grey81
+209 209 209 gray82
+209 209 209 grey82
+212 212 212 gray83
+212 212 212 grey83
+214 214 214 gray84
+214 214 214 grey84
+217 217 217 gray85
+217 217 217 grey85
+219 219 219 gray86
+219 219 219 grey86
+222 222 222 gray87
+222 222 222 grey87
+224 224 224 gray88
+224 224 224 grey88
+227 227 227 gray89
+227 227 227 grey89
+229 229 229 gray90
+229 229 229 grey90
+232 232 232 gray91
+232 232 232 grey91
+235 235 235 gray92
+235 235 235 grey92
+237 237 237 gray93
+237 237 237 grey93
+240 240 240 gray94
+240 240 240 grey94
+242 242 242 gray95
+242 242 242 grey95
+245 245 245 gray96
+245 245 245 grey96
+247 247 247 gray97
+247 247 247 grey97
+250 250 250 gray98
+250 250 250 grey98
+252 252 252 gray99
+252 252 252 grey99
+255 255 255 gray100
+255 255 255 grey100
+169 169 169 dark grey
+169 169 169 DarkGrey
+169 169 169 dark gray
+169 169 169 DarkGray
+ 0 0 139 dark blue
+ 0 0 139 DarkBlue
+ 0 139 139 dark cyan
+ 0 139 139 DarkCyan
+139 0 139 dark magenta
+139 0 139 DarkMagenta
+139 0 0 dark red
+139 0 0 DarkRed
+144 238 144 light green
+144 238 144 LightGreen
+220 20 60 crimson
+ 75 0 130 indigo
+128 128 0 olive
+102 51 153 rebecca purple
+102 51 153 RebeccaPurple
+192 192 192 silver
+ 0 128 128 teal
diff --git a/src/backend/gdi.c b/src/backend/gdi.c
index ad6d338..85f8fcb 100644
--- a/src/backend/gdi.c
+++ b/src/backend/gdi.c
@@ -19,6 +19,8 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
HBITMAP hbmp;
HDC dc, hbdc;
+ u->ll->gdi.force_render = 0;
+
if(u->ll->common.copy_buffer) {
GetClientRect(hWnd, &rc);
@@ -235,11 +237,12 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
r->common.copy_buffer = 1;
r->common.type = MwLLBackendGDI;
- r->gdi.grabbed = 0;
- r->gdi.hWnd = CreateWindow("milsko", "Milsko", parent == NULL ? (WS_OVERLAPPEDWINDOW) : (WS_CHILD | WS_VISIBLE), x == MwDEFAULT ? CW_USEDEFAULT : x, y == MwDEFAULT ? CW_USEDEFAULT : y, width, height, parent == NULL ? NULL : parent->gdi.hWnd, 0, wc.hInstance, NULL);
- r->gdi.hInstance = wc.hInstance;
- r->gdi.cursor = NULL;
- r->gdi.icon = NULL;
+ r->gdi.force_render = 0;
+ r->gdi.grabbed = 0;
+ r->gdi.hWnd = CreateWindow("milsko", "Milsko", parent == NULL ? (WS_OVERLAPPEDWINDOW) : (WS_CHILD | WS_VISIBLE), x == MwDEFAULT ? CW_USEDEFAULT : x, y == MwDEFAULT ? CW_USEDEFAULT : y, width, height, parent == NULL ? NULL : parent->gdi.hWnd, 0, wc.hInstance, NULL);
+ r->gdi.hInstance = wc.hInstance;
+ r->gdi.cursor = NULL;
+ r->gdi.icon = NULL;
u->ll = r;
u->min_set = 0;
@@ -518,10 +521,14 @@ static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) {
}
static void MwLLForceRenderImpl(MwLL handle) {
- PostMessage(handle->gdi.hWnd, WM_USER, 0, 0);
+ if(!handle->gdi.force_render) {
+ PostMessage(handle->gdi.hWnd, WM_USER, 0, 0);
+
+ handle->gdi.force_render = 1;
+ }
}
-static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
+HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) {
HCURSOR cursor;
BYTE* dmask = malloc((MwCursorDataHeight / 8) * MwCursorDataHeight);
BYTE* dimage = malloc((MwCursorDataHeight / 8) * MwCursorDataHeight);
@@ -562,12 +569,18 @@ static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
cursor = CreateCursor(GetModuleHandle(NULL), xs, ys, MwCursorDataHeight, MwCursorDataHeight, dmask, dimage);
+ free(dimage);
+ free(dmask);
+
+ return cursor;
+}
+
+static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
+ HCURSOR cursor = MwLLGDICreateCursor(image, mask);
+
if(handle->gdi.cursor != NULL) DestroyCursor(handle->gdi.cursor);
if(handle->gdi.icon != NULL) DestroyIcon(handle->gdi.icon);
handle->gdi.cursor = cursor;
-
- free(dimage);
- free(dmask);
}
static void MwLLDetachImpl(MwLL handle, MwPoint* point) {
diff --git a/src/backend/x11.c b/src/backend/x11.c
index dcecf11..c21c5a1 100644
--- a/src/backend/x11.c
+++ b/src/backend/x11.c
@@ -394,8 +394,11 @@ static void MwLLSetWHImpl(MwLL handle, int w, int h) {
destroy_pixmap(handle);
create_pixmap(handle);
+ /* we want events */
+#if 0
handle->x11.width = w;
handle->x11.height = h;
+#endif
XSync(handle->x11.display, False);
@@ -777,10 +780,10 @@ static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) {
}
static void MwLLForceRenderImpl(MwLL handle) {
- XEvent ev;
- memset(&ev, 0, sizeof(ev));
-
if(!handle->x11.force_render) {
+ XEvent ev;
+ memset(&ev, 0, sizeof(ev));
+
ev.type = Expose;
ev.xexpose.window = handle->x11.window;
XSendEvent(handle->x11.display, handle->x11.window, False, ExposureMask, &ev);
@@ -789,17 +792,17 @@ static void MwLLForceRenderImpl(MwLL handle) {
}
}
-static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
+Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask) {
Cursor cur;
int y, x, ys, xs;
char* di = malloc(MwCursorDataHeight * MwCursorDataHeight * 4);
char* dm = malloc(MwCursorDataHeight * MwCursorDataHeight * 4);
- XImage* cimage = XCreateImage(handle->x11.display, DefaultVisual(handle->x11.display, DefaultScreen(handle->x11.display)), 1, ZPixmap, 0, di, MwCursorDataHeight, MwCursorDataHeight, 32, MwCursorDataHeight * 4);
- XImage* cmask = XCreateImage(handle->x11.display, DefaultVisual(handle->x11.display, DefaultScreen(handle->x11.display)), 1, ZPixmap, 0, dm, MwCursorDataHeight, MwCursorDataHeight, 32, MwCursorDataHeight * 4);
- Pixmap pimage = XCreatePixmap(handle->x11.display, handle->x11.window, MwCursorDataHeight, MwCursorDataHeight, 1);
- Pixmap pmask = XCreatePixmap(handle->x11.display, handle->x11.window, MwCursorDataHeight, MwCursorDataHeight, 1);
- GC imagegc = XCreateGC(handle->x11.display, pimage, 0, NULL);
- GC maskgc = XCreateGC(handle->x11.display, pmask, 0, NULL);
+ XImage* cimage = XCreateImage(display, DefaultVisual(display, DefaultScreen(display)), 1, ZPixmap, 0, di, MwCursorDataHeight, MwCursorDataHeight, 32, MwCursorDataHeight * 4);
+ XImage* cmask = XCreateImage(display, DefaultVisual(display, DefaultScreen(display)), 1, ZPixmap, 0, dm, MwCursorDataHeight, MwCursorDataHeight, 32, MwCursorDataHeight * 4);
+ Pixmap pimage = XCreatePixmap(display, DefaultRootWindow(display), MwCursorDataHeight, MwCursorDataHeight, 1);
+ Pixmap pmask = XCreatePixmap(display, DefaultRootWindow(display), MwCursorDataHeight, MwCursorDataHeight, 1);
+ GC imagegc = XCreateGC(display, pimage, 0, NULL);
+ GC maskgc = XCreateGC(display, pmask, 0, NULL);
XColor cfg, cbg;
xs = -mask->x + image->x;
@@ -831,25 +834,32 @@ static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
cfg.red = 65535;
cfg.green = 65535;
cfg.blue = 65535;
- XAllocColor(handle->x11.display, handle->x11.colormap, &cfg);
+ XAllocColor(display, DefaultColormap(display, DefaultScreen(display)), &cfg);
cbg.red = 0;
cbg.green = 0;
cbg.blue = 0;
- XAllocColor(handle->x11.display, handle->x11.colormap, &cbg);
+ XAllocColor(display, DefaultColormap(display, DefaultScreen(display)), &cbg);
- XPutImage(handle->x11.display, pimage, imagegc, cimage, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
- XPutImage(handle->x11.display, pmask, maskgc, cmask, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
+ XPutImage(display, pimage, imagegc, cimage, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
+ XPutImage(display, pmask, maskgc, cmask, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
- cur = XCreatePixmapCursor(handle->x11.display, pimage, pmask, &cfg, &cbg, xs, ys);
- XDefineCursor(handle->x11.display, handle->x11.window, cur);
- XFreeCursor(handle->x11.display, cur);
+ cur = XCreatePixmapCursor(display, pimage, pmask, &cfg, &cbg, xs, ys);
- XFreePixmap(handle->x11.display, pimage);
- XFreePixmap(handle->x11.display, pmask);
+ XFreePixmap(display, pimage);
+ XFreePixmap(display, pmask);
XDestroyImage(cimage);
XDestroyImage(cmask);
+
+ return cur;
+}
+
+static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
+ Cursor cur = MwLLX11CreateCursor(handle->x11.display, image, mask);
+
+ XDefineCursor(handle->x11.display, handle->x11.window, cur);
+ XFreeCursor(handle->x11.display, cur);
}
static void MwLLDetachImpl(MwLL handle, MwPoint* point) {
diff --git a/src/color.c b/src/color.c
index 6e1ba10..0232792 100644
--- a/src/color.c
+++ b/src/color.c
@@ -60,6 +60,14 @@ MwLLColor MwParseColorName(MwWidget handle, const char* color) {
if(strcmp(color, "LightSlateGrey") == 0) return MwLLAllocColor(handle->lowlevel, 119, 136, 153);
if(strcmp(color, "gray") == 0) return MwLLAllocColor(handle->lowlevel, 190, 190, 190);
if(strcmp(color, "grey") == 0) return MwLLAllocColor(handle->lowlevel, 190, 190, 190);
+ if(strcmp(color, "x11 gray") == 0) return MwLLAllocColor(handle->lowlevel, 190, 190, 190);
+ if(strcmp(color, "X11Gray") == 0) return MwLLAllocColor(handle->lowlevel, 190, 190, 190);
+ if(strcmp(color, "x11 grey") == 0) return MwLLAllocColor(handle->lowlevel, 190, 190, 190);
+ if(strcmp(color, "X11Grey") == 0) return MwLLAllocColor(handle->lowlevel, 190, 190, 190);
+ if(strcmp(color, "web gray") == 0) return MwLLAllocColor(handle->lowlevel, 128, 128, 128);
+ if(strcmp(color, "WebGray") == 0) return MwLLAllocColor(handle->lowlevel, 128, 128, 128);
+ if(strcmp(color, "web grey") == 0) return MwLLAllocColor(handle->lowlevel, 128, 128, 128);
+ if(strcmp(color, "WebGrey") == 0) return MwLLAllocColor(handle->lowlevel, 128, 128, 128);
if(strcmp(color, "light grey") == 0) return MwLLAllocColor(handle->lowlevel, 211, 211, 211);
if(strcmp(color, "LightGrey") == 0) return MwLLAllocColor(handle->lowlevel, 211, 211, 211);
if(strcmp(color, "light gray") == 0) return MwLLAllocColor(handle->lowlevel, 211, 211, 211);
@@ -108,6 +116,7 @@ MwLLColor MwParseColorName(MwWidget handle, const char* color) {
if(strcmp(color, "MediumTurquoise") == 0) return MwLLAllocColor(handle->lowlevel, 72, 209, 204);
if(strcmp(color, "turquoise") == 0) return MwLLAllocColor(handle->lowlevel, 64, 224, 208);
if(strcmp(color, "cyan") == 0) return MwLLAllocColor(handle->lowlevel, 0, 255, 255);
+ if(strcmp(color, "aqua") == 0) return MwLLAllocColor(handle->lowlevel, 0, 255, 255);
if(strcmp(color, "light cyan") == 0) return MwLLAllocColor(handle->lowlevel, 224, 255, 255);
if(strcmp(color, "LightCyan") == 0) return MwLLAllocColor(handle->lowlevel, 224, 255, 255);
if(strcmp(color, "cadet blue") == 0) return MwLLAllocColor(handle->lowlevel, 95, 158, 160);
@@ -134,6 +143,11 @@ MwLLColor MwParseColorName(MwWidget handle, const char* color) {
if(strcmp(color, "lawn green") == 0) return MwLLAllocColor(handle->lowlevel, 124, 252, 0);
if(strcmp(color, "LawnGreen") == 0) return MwLLAllocColor(handle->lowlevel, 124, 252, 0);
if(strcmp(color, "green") == 0) return MwLLAllocColor(handle->lowlevel, 0, 255, 0);
+ if(strcmp(color, "lime") == 0) return MwLLAllocColor(handle->lowlevel, 0, 255, 0);
+ if(strcmp(color, "x11 green") == 0) return MwLLAllocColor(handle->lowlevel, 0, 255, 0);
+ if(strcmp(color, "X11Green") == 0) return MwLLAllocColor(handle->lowlevel, 0, 255, 0);
+ if(strcmp(color, "web green") == 0) return MwLLAllocColor(handle->lowlevel, 0, 128, 0);
+ if(strcmp(color, "WebGreen") == 0) return MwLLAllocColor(handle->lowlevel, 0, 128, 0);
if(strcmp(color, "chartreuse") == 0) return MwLLAllocColor(handle->lowlevel, 127, 255, 0);
if(strcmp(color, "medium spring green") == 0) return MwLLAllocColor(handle->lowlevel, 0, 250, 154);
if(strcmp(color, "MediumSpringGreen") == 0) return MwLLAllocColor(handle->lowlevel, 0, 250, 154);
@@ -205,11 +219,16 @@ MwLLColor MwParseColorName(MwWidget handle, const char* color) {
if(strcmp(color, "pale violet red") == 0) return MwLLAllocColor(handle->lowlevel, 219, 112, 147);
if(strcmp(color, "PaleVioletRed") == 0) return MwLLAllocColor(handle->lowlevel, 219, 112, 147);
if(strcmp(color, "maroon") == 0) return MwLLAllocColor(handle->lowlevel, 176, 48, 96);
+ if(strcmp(color, "x11 maroon") == 0) return MwLLAllocColor(handle->lowlevel, 176, 48, 96);
+ if(strcmp(color, "X11Maroon") == 0) return MwLLAllocColor(handle->lowlevel, 176, 48, 96);
+ if(strcmp(color, "web maroon") == 0) return MwLLAllocColor(handle->lowlevel, 128, 0, 0);
+ if(strcmp(color, "WebMaroon") == 0) return MwLLAllocColor(handle->lowlevel, 128, 0, 0);
if(strcmp(color, "medium violet red") == 0) return MwLLAllocColor(handle->lowlevel, 199, 21, 133);
if(strcmp(color, "MediumVioletRed") == 0) return MwLLAllocColor(handle->lowlevel, 199, 21, 133);
if(strcmp(color, "violet red") == 0) return MwLLAllocColor(handle->lowlevel, 208, 32, 144);
if(strcmp(color, "VioletRed") == 0) return MwLLAllocColor(handle->lowlevel, 208, 32, 144);
if(strcmp(color, "magenta") == 0) return MwLLAllocColor(handle->lowlevel, 255, 0, 255);
+ if(strcmp(color, "fuchsia") == 0) return MwLLAllocColor(handle->lowlevel, 255, 0, 255);
if(strcmp(color, "violet") == 0) return MwLLAllocColor(handle->lowlevel, 238, 130, 238);
if(strcmp(color, "plum") == 0) return MwLLAllocColor(handle->lowlevel, 221, 160, 221);
if(strcmp(color, "orchid") == 0) return MwLLAllocColor(handle->lowlevel, 218, 112, 214);
@@ -222,6 +241,10 @@ MwLLColor MwParseColorName(MwWidget handle, const char* color) {
if(strcmp(color, "blue violet") == 0) return MwLLAllocColor(handle->lowlevel, 138, 43, 226);
if(strcmp(color, "BlueViolet") == 0) return MwLLAllocColor(handle->lowlevel, 138, 43, 226);
if(strcmp(color, "purple") == 0) return MwLLAllocColor(handle->lowlevel, 160, 32, 240);
+ if(strcmp(color, "x11 purple") == 0) return MwLLAllocColor(handle->lowlevel, 160, 32, 240);
+ if(strcmp(color, "X11Purple") == 0) return MwLLAllocColor(handle->lowlevel, 160, 32, 240);
+ if(strcmp(color, "web purple") == 0) return MwLLAllocColor(handle->lowlevel, 128, 0, 128);
+ if(strcmp(color, "WebPurple") == 0) return MwLLAllocColor(handle->lowlevel, 128, 0, 128);
if(strcmp(color, "medium purple") == 0) return MwLLAllocColor(handle->lowlevel, 147, 112, 219);
if(strcmp(color, "MediumPurple") == 0) return MwLLAllocColor(handle->lowlevel, 147, 112, 219);
if(strcmp(color, "thistle") == 0) return MwLLAllocColor(handle->lowlevel, 216, 191, 216);
@@ -739,5 +762,26 @@ MwLLColor MwParseColorName(MwWidget handle, const char* color) {
if(strcmp(color, "grey99") == 0) return MwLLAllocColor(handle->lowlevel, 252, 252, 252);
if(strcmp(color, "gray100") == 0) return MwLLAllocColor(handle->lowlevel, 255, 255, 255);
if(strcmp(color, "grey100") == 0) return MwLLAllocColor(handle->lowlevel, 255, 255, 255);
+ if(strcmp(color, "dark grey") == 0) return MwLLAllocColor(handle->lowlevel, 169, 169, 169);
+ if(strcmp(color, "DarkGrey") == 0) return MwLLAllocColor(handle->lowlevel, 169, 169, 169);
+ if(strcmp(color, "dark gray") == 0) return MwLLAllocColor(handle->lowlevel, 169, 169, 169);
+ if(strcmp(color, "DarkGray") == 0) return MwLLAllocColor(handle->lowlevel, 169, 169, 169);
+ if(strcmp(color, "dark blue") == 0) return MwLLAllocColor(handle->lowlevel, 0, 0, 139);
+ if(strcmp(color, "DarkBlue") == 0) return MwLLAllocColor(handle->lowlevel, 0, 0, 139);
+ if(strcmp(color, "dark cyan") == 0) return MwLLAllocColor(handle->lowlevel, 0, 139, 139);
+ if(strcmp(color, "DarkCyan") == 0) return MwLLAllocColor(handle->lowlevel, 0, 139, 139);
+ if(strcmp(color, "dark magenta") == 0) return MwLLAllocColor(handle->lowlevel, 139, 0, 139);
+ if(strcmp(color, "DarkMagenta") == 0) return MwLLAllocColor(handle->lowlevel, 139, 0, 139);
+ if(strcmp(color, "dark red") == 0) return MwLLAllocColor(handle->lowlevel, 139, 0, 0);
+ if(strcmp(color, "DarkRed") == 0) return MwLLAllocColor(handle->lowlevel, 139, 0, 0);
+ if(strcmp(color, "light green") == 0) return MwLLAllocColor(handle->lowlevel, 144, 238, 144);
+ if(strcmp(color, "LightGreen") == 0) return MwLLAllocColor(handle->lowlevel, 144, 238, 144);
+ if(strcmp(color, "crimson") == 0) return MwLLAllocColor(handle->lowlevel, 220, 20, 60);
+ if(strcmp(color, "indigo") == 0) return MwLLAllocColor(handle->lowlevel, 75, 0, 130);
+ if(strcmp(color, "olive") == 0) return MwLLAllocColor(handle->lowlevel, 128, 128, 0);
+ if(strcmp(color, "rebecca purple") == 0) return MwLLAllocColor(handle->lowlevel, 102, 51, 153);
+ if(strcmp(color, "RebeccaPurple") == 0) return MwLLAllocColor(handle->lowlevel, 102, 51, 153);
+ if(strcmp(color, "silver") == 0) return MwLLAllocColor(handle->lowlevel, 192, 192, 192);
+ if(strcmp(color, "teal") == 0) return MwLLAllocColor(handle->lowlevel, 0, 128, 128);
return MwLLAllocColor(handle->lowlevel, 0, 0, 0);
}
diff --git a/src/core.c b/src/core.c
index 792dd30..9a5fd14 100644
--- a/src/core.c
+++ b/src/core.c
@@ -242,6 +242,14 @@ static void MwFreeWidget(MwWidget handle) {
free(handle);
}
+static void destroy_children(MwWidget handle) {
+ int i;
+ for(i = 0; i < arrlen(handle->children); i++) {
+ destroy_children(handle->children[i]);
+ }
+ handle->destroyed = 1;
+}
+
void MwDestroyWidget(MwWidget handle) {
if(handle->parent != NULL) {
int i;
@@ -252,6 +260,7 @@ void MwDestroyWidget(MwWidget handle) {
arrput(handle->parent->destroy_queue, handle);
}
}
+ destroy_children(handle);
handle->destroyed = 1;
}
@@ -377,14 +386,17 @@ void MwSetText(MwWidget handle, const char* key, const char* value) {
if(strcmp(key, MwNtitle) == 0) {
MwLLSetTitle(handle->lowlevel, value);
} else {
- char* v = MwStringDuplicate(value);
+ char* v = value == NULL ? NULL : MwStringDuplicate(value);
if(shgeti(handle->text, key) != -1) free(shget(handle->text, key));
- shput(handle->text, key, v);
+ if(value != NULL) {
+ shput(handle->text, key, v);
+ } else {
+ shdel(handle->text, key);
+ }
}
if(handle->prop_event) MwDispatch3(handle, prop_change, key);
-
if(strcmp(key, MwNbackground) == 0 || strcmp(key, MwNforeground) == 0 || strcmp(key, MwNsubBackground) == 0 || strcmp(key, MwNsubForeground) == 0) {
MwForceRender(handle);
}
@@ -731,6 +743,10 @@ MwClass MwGetClass(MwWidget handle) {
return handle->widget_class;
}
+const char* MwGetName(MwWidget handle) {
+ return handle->name;
+}
+
MwWidget* MwGetChildren(MwWidget handle) {
MwWidget* c = malloc(sizeof(*c) * (arrlen(handle->children) + 1));
int i;
diff --git a/src/default.c b/src/default.c
index 1207ae8..4a7d52c 100644
--- a/src/default.c
+++ b/src/default.c
@@ -11,6 +11,10 @@ const char* MwDefaultDarkSubBackground = "#333";
const char* MwDefaultDarkSubForeground = "#ddd";
int MwDefaultBorderWidth(MwWidget handle) {
+ int bw = MwGetInteger(handle, MwNborderWidth);
+
+ if(bw != MwDEFAULT) return bw;
+
if(MwGetInteger(handle, MwNmodernLook)) {
return 1;
} else {
diff --git a/src/draw.c b/src/draw.c
index 7be59be..32b6d75 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -131,8 +131,16 @@ void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert) {
} else {
int diff = get_color_diff(handle) / 3 * 2;
- MwDrawFrameEx(handle, rect, color, invert, MwDefaultBorderWidth(handle) / 2, -diff, (handle->parent == NULL || handle->parent->lowlevel == NULL) ? 1 : 0);
- MwDrawFrameEx(handle, rect, color, invert, MwDefaultBorderWidth(handle) / 2, diff, 0);
+ if(MwDefaultBorderWidth(handle) >= 2) {
+ int i;
+ int st = invert ? 1 : 0;
+ for(i = st; i < st + 2; i++) {
+ if((i % 2) == 0) MwDrawFrameEx(handle, rect, color, invert, MwDefaultBorderWidth(handle) - 1, -diff, (handle->parent == NULL || handle->parent->lowlevel == NULL) ? 1 : 0);
+ if((i % 2) == 1) MwDrawFrameEx(handle, rect, color, invert, 1, diff, 0);
+ }
+ } else {
+ MwDrawFrameEx(handle, rect, color, invert, 1, 0, 0);
+ }
}
}
diff --git a/src/font/boldfont.c b/src/font/boldfont.c
index e2b2a19..c63be2c 100644
--- a/src/font/boldfont.c
+++ b/src/font/boldfont.c
@@ -47,7 +47,7 @@ MwFont MwBoldFontData[] = {
{0, 12, {28, 12, 12, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 39 */
{0, 12, {0, 3, 6, 12, 12, 24, 24, 24, 24, 24, 12, 12, 6, 3}}, /* 40 */
{0, 12, {0, 48, 24, 12, 12, 6, 6, 6, 6, 6, 12, 12, 24, 48}}, /* 41 */
- {0, 12, {0, 0, 45, 45, 30, 12, 30, 45, 45, 0, 0, 0, 0, 0}}, /* 42 */
+ {0, 12, {0, 0, 0, 45, 45, 30, 12, 12, 30, 45, 45, 0, 0, 0}}, /* 42 */
{0, 12, {0, 0, 0, 0, 12, 12, 12, 63, 12, 12, 12, 0, 0, 0}}, /* 43 */
{0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 12, 12, 24}}, /* 44 */
{0, 12, {0, 0, 0, 0, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0}}, /* 45 */
diff --git a/src/font/font.c b/src/font/font.c
index 2777e0f..e1c5d89 100644
--- a/src/font/font.c
+++ b/src/font/font.c
@@ -47,7 +47,7 @@ MwFont MwFontData[] = {
{0, 12, {24, 8, 8, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 39 */
{0, 12, {0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 4, 4, 2, 1}}, /* 40 */
{0, 12, {0, 32, 16, 8, 8, 4, 4, 4, 4, 4, 8, 8, 16, 32}}, /* 41 */
- {0, 12, {0, 0, 4, 21, 14, 4, 14, 21, 4, 0, 0, 0, 0, 0}}, /* 42 */
+ {0, 12, {0, 0, 0, 4, 21, 14, 4, 4, 14, 21, 4, 0, 0, 0}}, /* 42 */
{0, 12, {0, 0, 0, 0, 8, 8, 8, 62, 8, 8, 8, 0, 0, 0}}, /* 43 */
{0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 8, 8, 16}}, /* 44 */
{0, 12, {0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0}}, /* 45 */