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 71986a8..45f7c28 100644
--- a/milsko.xml
+++ b/milsko.xml
@@ -47,6 +47,7 @@
- MwNy
- MwNwidth
- MwNheight
+ - MwNborderWidth
Integer properties must be prefixed with I.
String properties must be prefixed with S.
@@ -79,6 +80,7 @@
+
diff --git a/src/core.c b/src/core.c
index a9c7c21..00479ff 100644
--- a/src/core.c
+++ b/src/core.c
@@ -374,9 +374,9 @@ void MwSetText(MwWidget handle, const char* key, const char* value) {
if(shgeti(handle->text, key) != -1) free(shget(handle->text, key));
- if(value != NULL){
+ if(value != NULL) {
shput(handle->text, key, v);
- }else{
+ } else {
shdel(handle->text, key);
}
}
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 4ee190d..fdf8d80 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -131,8 +131,12 @@ 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) {
+ MwDrawFrameEx(handle, rect, color, invert, MwDefaultBorderWidth(handle) - 1, -diff, (handle->parent == NULL || handle->parent->lowlevel == NULL) ? 1 : 0);
+ MwDrawFrameEx(handle, rect, color, invert, 1, diff, 0);
+ } else {
+ MwDrawFrameEx(handle, rect, color, invert, 1, 0, 0);
+ }
}
}