mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-09 19:03:29 +00:00
add MwNborderWidth
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
#define MwNflat "Iflat"
|
#define MwNflat "Iflat"
|
||||||
#define MwNshowArrows "IshowArrows"
|
#define MwNshowArrows "IshowArrows"
|
||||||
#define MwNpadding "Ipadding"
|
#define MwNpadding "Ipadding"
|
||||||
|
#define MwNborderWidth "IborderWidth"
|
||||||
|
|
||||||
#define MwNtitle "Stitle"
|
#define MwNtitle "Stitle"
|
||||||
#define MwNtext "Stext"
|
#define MwNtext "Stext"
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
- MwNy
|
- MwNy
|
||||||
- MwNwidth
|
- MwNwidth
|
||||||
- MwNheight
|
- MwNheight
|
||||||
|
- MwNborderWidth
|
||||||
|
|
||||||
Integer properties must be prefixed with I.
|
Integer properties must be prefixed with I.
|
||||||
String properties must be prefixed with S.
|
String properties must be prefixed with S.
|
||||||
@@ -79,6 +80,7 @@
|
|||||||
<integer name="flat" />
|
<integer name="flat" />
|
||||||
<integer name="showArrows" />
|
<integer name="showArrows" />
|
||||||
<integer name="padding" />
|
<integer name="padding" />
|
||||||
|
<integer name="borderWidth" />
|
||||||
|
|
||||||
<string name="title" />
|
<string name="title" />
|
||||||
<string name="text" />
|
<string name="text" />
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ const char* MwDefaultDarkSubBackground = "#333";
|
|||||||
const char* MwDefaultDarkSubForeground = "#ddd";
|
const char* MwDefaultDarkSubForeground = "#ddd";
|
||||||
|
|
||||||
int MwDefaultBorderWidth(MwWidget handle) {
|
int MwDefaultBorderWidth(MwWidget handle) {
|
||||||
|
int bw = MwGetInteger(handle, MwNborderWidth);
|
||||||
|
|
||||||
|
if(bw != MwDEFAULT) return bw;
|
||||||
|
|
||||||
if(MwGetInteger(handle, MwNmodernLook)) {
|
if(MwGetInteger(handle, MwNmodernLook)) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -131,8 +131,12 @@ void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert) {
|
|||||||
} else {
|
} else {
|
||||||
int diff = get_color_diff(handle) / 3 * 2;
|
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);
|
if(MwDefaultBorderWidth(handle) >= 2) {
|
||||||
MwDrawFrameEx(handle, rect, color, invert, MwDefaultBorderWidth(handle) / 2, diff, 0);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user