MwNisRounded

This commit is contained in:
IoI_xD 2026-03-26 18:02:48 -07:00 committed by Nishi
commit 00e44bec32
3 changed files with 4 additions and 1 deletions

View file

@ -40,6 +40,7 @@
#define MwNlength "Ilength"
#define MwNforceInverted "IforceInverted"
#define MwNroundness "Iroundness"
#define MwNisRounded "IisRounded"
#define MwNtitle "Stitle"
#define MwNtext "Stext"

View file

@ -516,6 +516,7 @@ int MwGetInteger(MwWidget handle, const char* key) {
#else
if(strcmp(key, MwNmodernLook) == 0) return inherit_integer(handle, key, 1);
#endif
if(strcmp(key, MwNisRounded) == 0) return inherit_integer(handle, key, 1);
}
return shget(handle->integer, key);
}

View file

@ -207,7 +207,7 @@ void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int
void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border) {
MwLLColor col;
MwBool rounded = handle->lowlevel->common.supports_transparency && MwGetInteger(handle, MwNroundness) != MwDEFAULT;
MwBool rounded = handle->lowlevel->common.supports_transparency && MwGetInteger(handle, MwNroundness) != MwDEFAULT && MwGetInteger(handle, MwNisRounded) != 0;
if(border) {
MwDrawFrame(handle, rect, color, invert, rounded);
@ -333,6 +333,7 @@ void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, i
p[5].x = rect->x + roundness;
p[5].y = rect->y + rect->height - roundness;
MwLLPolygon(handle->lowlevel, p, 6, invert ? darker : lighter);
/* top right edge */
for(i = 0; i < BORDER_SMOOTHNESS; i += 2) {