rounded corners on select widgets #12

Merged
IoI_xD merged 15 commits from rounded into master 2026-03-27 11:08:43 +09:00
Showing only changes of commit 8dfa34e555 - Show all commits

only do backing box draw if backend doesn't do transparency

IoI_xD 2026-03-26 18:34:08 -07:00 committed by Nishi

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 && MwGetInteger(handle, MwNisRounded) != 0;
MwBool rounded = MwGetInteger(handle, MwNroundness) != MwDEFAULT && MwGetInteger(handle, MwNisRounded) != 0;
if(border) {
MwDrawFrame(handle, rect, color, invert, rounded);
@ -299,11 +299,14 @@ void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, i
(lighter->common.green * darker->common.green) / 255,
(lighter->common.blue * darker->common.blue) / 255);
int roundness = MwGetInteger(handle, MwNroundness);
MwLLColor c = handle->parent == NULL ? NULL : MwParseColor(handle->parent, MwGetText(handle->parent, MwNbackground));
if(c != NULL){
MwDrawRect(handle, rect, c);
MwLLFreeColor(c);
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;