From b5180b208163bfab8f6fbd34bf31ff7ac4dde78b Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Fri, 14 Nov 2025 18:22:46 +0000 Subject: [PATCH] fix listbox git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@722 b9cfdab3-6d41-4d17-bbe4-086880011989 --- src/widget/listbox.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widget/listbox.c b/src/widget/listbox.c index fff4616..09717e9 100644 --- a/src/widget/listbox.c +++ b/src/widget/listbox.c @@ -240,6 +240,7 @@ static void frame_draw(MwWidget handle) { p.x += MwDefaultBorderWidth(handle); MwDrawText(handle, &p, t, 0, MwALIGNMENT_BEGINNING, selected ? base : text); p.x += get_col_width(lb, j) - MwDefaultBorderWidth(handle); + if(j == 0) p.x -= 4; if(j == 0) p.x -= MwGetInteger(handle->parent, MwNleftPadding); } @@ -344,7 +345,7 @@ static void draw(MwWidget handle) { if(MwGetInteger(handle, MwNhasHeading) && arrlen(lb->list) > 0) { MwPoint p; int i; - int x = 4; + int x = 0; r.width -= 16; @@ -357,7 +358,7 @@ static void draw(MwWidget handle) { x += MwDefaultBorderWidth(handle); - p.x = x; + p.x = 4 + x; p.y = r.y + r.height / 2; MwDrawText(handle, &p, lb->list[0].name[i], 0, MwALIGNMENT_BEGINNING, text);