git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@744 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-16 08:59:09 +00:00
parent 9a0734a78f
commit 3e40b9ab16
7 changed files with 37 additions and 12 deletions

View File

@@ -259,6 +259,7 @@ static void resize(MwWidget handle) {
int w = MwGetInteger(handle, MwNwidth);
int h = MwGetInteger(handle, MwNheight);
int ih, y;
int aw;
y = MwGetInteger(handle, MwNhasHeading) ? (MwTextHeight(handle, "M") + MwDefaultBorderWidth(handle) * 2) : 0;
@@ -289,6 +290,7 @@ static void resize(MwWidget handle) {
MwNheight, h,
NULL);
}
aw = w;
h -= MwDefaultBorderWidth(handle) * 2;
ih = arrlen(lb->list);
@@ -298,6 +300,13 @@ static void resize(MwWidget handle) {
MwNareaShown, h / MwTextHeight(handle, "M"),
MwNmaxValue, ih,
NULL);
if(ih <= (h / MwTextHeight(handle, "M"))) {
MwLLShow(lb->vscroll->lowlevel, 0);
MwSetInteger(lb->frame, MwNwidth, aw);
} else {
MwLLShow(lb->vscroll->lowlevel, 1);
}
}
static int create(MwWidget handle) {