From 8f7df275fba511c3f78e3523707e8895b2f0e6a2 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Fri, 27 Mar 2026 10:40:35 +0900 Subject: [PATCH] better --- src/draw.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/draw.c b/src/draw.c index 51e79ff..dfaf90c 100644 --- a/src/draw.c +++ b/src/draw.c @@ -210,6 +210,15 @@ void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert MwBool rounded = MwGetInteger(handle, MwNroundness) != MwDEFAULT && MwGetInteger(handle, MwNisRounded) != 0; if(border) { + if(!handle->lowlevel->common.supports_transparency) { + MwLLColor c = handle->parent == NULL ? NULL : MwParseColor(handle->parent, MwGetText(handle->parent, MwNbackground)); + + if(c != NULL) { + MwDrawRect(handle, rect, c); + MwLLFreeColor(c); + } + } + MwDrawFrame(handle, rect, color, invert, rounded); } col = invert ? MwLightenColor(handle, color, -8, -8, -8) : color; @@ -300,15 +309,6 @@ void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, i (lighter->common.blue * darker->common.blue) / 255); int roundness = MwGetInteger(handle, MwNroundness); - if(!handle->lowlevel->common.supports_transparency) { - MwLLColor c = handle->parent == NULL ? NULL : MwParseColor(handle->parent, MwGetText(handle->parent, MwNbackground)); - - if(c != NULL) { - MwDrawRect(handle, rect, c); - MwLLFreeColor(c); - } - } - if(roundness == MwDEFAULT) roundness = DEFAULT_ROUNDNESS; if(roundness >= MAX_ROUNDNESS) roundness = MAX_ROUNDNESS; if(rounded && rect->height >= (roundness * 2) && rect->width >= (roundness * 2) && roundness > 0) {