DrawWidgetBack fix
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit

This commit is contained in:
Nishi 2026-05-07 19:40:06 +09:00
commit 19416d7451
Signed by: nishi
GPG key ID: 27EF69B208EB9343
17 changed files with 88 additions and 34 deletions

View file

@ -31,12 +31,12 @@ static void draw(MwWidget handle) {
if(MwGetInteger(handle, MwNflat)) {
if(handle->pressed || ((inv = MwGetInteger(handle, MwNforceInverted)) != MwDEFAULT && inv)) {
MwDrawWidgetBack(handle, &r, base, handle->pressed, 1);
MwDrawWidgetBack(handle, &r, base, handle->pressed, MwDEFAULT);
} else {
MwDrawRect(handle, &r, base);
}
} else {
MwDrawWidgetBack(handle, &r, base, handle->pressed, 1);
MwDrawWidgetBack(handle, &r, base, handle->pressed, MwDEFAULT);
}
if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx);
if(MwGetInteger(handle, MwNflat) && !(handle->pressed || ((inv = MwGetInteger(handle, MwNforceInverted)) != MwDEFAULT && inv))) {

View file

@ -27,7 +27,7 @@ static void draw(MwWidget handle) {
r.x = (MwGetInteger(handle, MwNwidth) - r.width) / 2;
r.y = (MwGetInteger(handle, MwNheight) - r.height) / 2;
MwDrawWidgetBack(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0, MwTRUE);
MwDrawWidgetBack(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0, MwDEFAULT);
if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx);
if(handle->pressed || MwGetInteger(handle, MwNchecked)) {
/* TODO: write check mark */

View file

@ -40,7 +40,7 @@ static void draw(MwWidget handle) {
r.width = MwGetInteger(handle, MwNwidth);
r.height = MwGetInteger(handle, MwNheight);
MwDrawWidgetBack(handle, &r, base, 0, 1);
MwDrawWidgetBack(handle, &r, base, 0, MwDEFAULT);
rc = r;

View file

@ -34,7 +34,7 @@ static void draw(MwWidget handle) {
r.width = MwGetInteger(handle, MwNwidth) - t->right;
r.height = MwGetInteger(handle, MwNheight);
MwDrawWidgetBack(handle, &r, base, 1, 1);
MwDrawWidgetBack(handle, &r, base, 1, MwDEFAULT);
if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx);
if(str != NULL) {
int w = MwTextWidth(handle, font, "M");

View file

@ -107,12 +107,12 @@ static void draw(MwWidget handle) {
MENU_LOOP_INIT;
MwDrawWidgetBack(handle, &r, base, 0, MwTRUE);
MwDrawWidgetBack(handle, &r, base, 0, MwDEFAULT);
BEGIN_MENU_LOOP;
if(m->sub[i]->wsub != NULL || (in_area && handle->pressed)) {
MwDrawFrame(handle, &r, base, MwFALSE);
MwDrawWidgetBack(handle, &r, base, 0, MwFALSE);
MwDrawWidgetBack(handle, &r, base, 0, 0);
}
MwDrawText(handle, MwFLBuildFont((m->sub[i]->wsub != NULL || (in_area && handle->pressed)) ? MwFLFlagBold : 0), &p, m->sub[i]->name + incr, MwALIGNMENT_CENTER, text);

View file

@ -33,7 +33,7 @@ static void draw(MwWidget handle) {
r.y = 0;
r.width = e->right;
r.height = h / 2;
MwDrawWidgetBack(handle, &r, base, pr, MwTRUE);
MwDrawWidgetBack(handle, &r, base, pr, MwDEFAULT);
if(r.width > r.height) {
r.width = r.height;
@ -49,7 +49,7 @@ static void draw(MwWidget handle) {
r.y = h / 2;
r.width = e->right;
r.height = h / 2;
MwDrawWidgetBack(handle, &r, base, pr, MwTRUE);
MwDrawWidgetBack(handle, &r, base, pr, MwDEFAULT);
if(r.width > r.height) {
r.width = r.height;

View file

@ -26,7 +26,7 @@ static void draw(MwWidget handle) {
w = MwGetInteger(handle, MwNvalue) - MwGetInteger(handle, MwNminValue);
w = w / (MwGetInteger(handle, MwNmaxValue) - MwGetInteger(handle, MwNminValue));
MwDrawWidgetBack(handle, &r, base, 1, MwTRUE);
MwDrawWidgetBack(handle, &r, base, 1, MwDEFAULT);
if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx);
r.x += MwDefaultBorderWidth(handle);

View file

@ -73,7 +73,7 @@ static void draw(MwWidget handle) {
ux = r.height;
dx = r.width - r.height;
MwDrawWidgetBack(handle, &r, dark, 1, MwTRUE);
MwDrawWidgetBack(handle, &r, dark, 1, MwDEFAULT);
if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx);
rt = r;
@ -131,7 +131,7 @@ static void draw(MwWidget handle) {
}
}
if(rbar.height >= 0) MwDrawWidgetBack(handle, &rbar, base, 0, MwTRUE);
if(rbar.height >= 0) MwDrawWidgetBack(handle, &rbar, base, 0, MwDEFAULT);
MwLLFreeColor(dark);
MwLLFreeColor(base);

View file

@ -25,7 +25,7 @@ static void draw(MwWidget handle) {
r.y = (r.height - 2) / 2;
r.height = 2;
}
MwDrawFrameEx(handle, &r, base, 1, 1, 0, 0);
MwDrawFrameEx(handle, &r, base, 1, MwDEFAULT, 0, 0);
MwLLFreeColor(base);
}

View file

@ -39,7 +39,7 @@ static void draw(MwWidget handle) {
r.width = MwGetInteger(handle, MwNwidth);
r.height = MwGetInteger(handle, MwNheight);
MwDrawWidgetBack(handle, &r, base, 0, MwTRUE);
MwDrawWidgetBack(handle, &r, base, 0, MwDEFAULT);
if(menu != NULL) {
MwPoint p;
@ -73,7 +73,7 @@ static void draw(MwWidget handle) {
r.y = p.y - 3;
r.width = MwGetInteger(handle, MwNwidth) - MwGetInteger(handle, MwNleftPadding);
r.height = th + 3 * 2;
MwDrawWidgetBack(handle, &r, base, 0, MwTRUE);
MwDrawWidgetBack(handle, &r, base, 0, MwDEFAULT);
}
p.x = 5 + tw / 2 + MwGetInteger(handle, MwNleftPadding);

View file

@ -156,10 +156,10 @@ static void show_frame(MwWidget handle) {
if(i != n) MwLLShow(t->frames[i]->lowlevel, 0);
}
MwLLShow(t->frames[n]->lowlevel, 1);
resize(handle);
MwLLShow(t->frames[n]->lowlevel, 1);
MwForceRender(handle);
MwDispatchUserHandler(handle, MwNchangedHandler, NULL);