Compare commits

...

2 Commits

Author SHA1 Message Date
NishiOwO
a23016bc05 yes 2025-12-23 18:14:00 +09:00
NishiOwO
df99e66d87 tiny fix 2025-12-23 18:10:50 +09:00

View File

@@ -66,7 +66,7 @@ static void draw(MwWidget handle) {
if(menu->sub[i]->wsub != NULL) { if(menu->sub[i]->wsub != NULL) {
r.x = 0; r.x = 0;
r.y = p.y - 3; r.y = p.y - 3;
r.width = tw + 15 + 5 * 2; r.width = MwGetInteger(handle, MwNwidth);
r.height = th + 3 * 2; r.height = th + 3 * 2;
MwDrawWidgetBack(handle, &r, base, 0, MwTRUE); MwDrawWidgetBack(handle, &r, base, 0, MwTRUE);
} }
@@ -79,7 +79,7 @@ static void draw(MwWidget handle) {
if(arrlen(menu->sub[i]->sub) > 0) { if(arrlen(menu->sub[i]->sub) > 0) {
MwRect tr; MwRect tr;
tr.x = p.x + tw / 2 + 5; tr.x = MwGetInteger(handle, MwNwidth) - MwDefaultBorderWidth(handle) - 11 - 2;
tr.y = p.y - th / 2 + 2; tr.y = p.y - th / 2 + 2;
tr.width = tr.height = 11; tr.width = tr.height = 11;
@@ -126,7 +126,7 @@ static void click(MwWidget handle) {
menu->sub[j]->wsub = NULL; menu->sub[j]->wsub = NULL;
} }
p.x = rc.x + rc.width + 3; p.x = MwGetInteger(handle, MwNwidth);
p.y = rc.y - 3; p.y = rc.y - 3;
menu->sub[i]->wsub = MwCreateWidget(MwSubMenuClass, "submenu", handle, 0, 0, 0, 0); menu->sub[i]->wsub = MwCreateWidget(MwSubMenuClass, "submenu", handle, 0, 0, 0, 0);
@@ -183,6 +183,8 @@ static void mwSubMenuAppearImpl(MwWidget handle, MwMenu menu, MwPoint* point, in
w += 10 + 15; w += 10 + 15;
h += 3; h += 3;
if(w < 150) w = 150;
if(diff_calc) { if(diff_calc) {
p.y = p.y - h; p.y = p.y - h;
} }