fix listbox

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@722 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-14 18:22:46 +00:00
parent 6ebb57a1a2
commit b5180b2081

View File

@@ -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);