optimize
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-09-21 11:57:37 +09:00
commit 2858679cc4

View file

@ -59,6 +59,17 @@ static void draw(MwWidget handle) {
MwFLFont font = NULL;
MwPoint u_p, s_p, c_p;
int u = 0, s = 0, c = 0;
int s_y = 0;
int s_h = MwGetInteger(handle, MwNheight);
MwWidget p = handle->parent;
s_y = MwGetInteger(handle, MwNy);
while(p != NULL && p->widget_class != MwWindowClass) {
s_y += MwGetInteger(p, MwNy);
p = p->parent;
}
s_y *= -1;
u_p.x = s_p.x = c_p.x = 0;
u_p.y = s_p.y = c_p.y = 0;
@ -80,6 +91,8 @@ static void draw(MwWidget handle) {
p.x = l->x;
p.y = l->y + MwTextHeight(handle, font, l->text) / 2;
if(p.y <= s_y || p.y >= s_y + s_h) break;
if(u || s || c) {
MwPoint line[2];
int j;