forked from pyrite-dev/milsko
Merge branch 'master' of ssh://forgejo.nishi.boats:2222/pyrite-dev/milsko
This commit is contained in:
commit
84ad1b0d6b
1 changed files with 3 additions and 3 deletions
|
|
@ -218,7 +218,7 @@ static void frame_draw(MwWidget handle) {
|
||||||
st = get_first_entry(handle->parent, lb);
|
st = get_first_entry(handle->parent, lb);
|
||||||
|
|
||||||
area = r.height - MwDefaultBorderWidth(handle) * 2;
|
area = r.height - MwDefaultBorderWidth(handle) * 2;
|
||||||
ent = area / (MwTextHeight(handle, NULL, "M") + Padding) + 2;
|
ent = area / (MwTextHeight(handle, Font, "M") + Padding) + 2;
|
||||||
|
|
||||||
for(i = st; i < arrlen(lb->list) && i < st + ent; i++) {
|
for(i = st; i < arrlen(lb->list) && i < st + ent; i++) {
|
||||||
int selected = MwGetInteger(handle->parent, MwNvalue) == i ? 1 : 0;
|
int selected = MwGetInteger(handle->parent, MwNvalue) == i ? 1 : 0;
|
||||||
|
|
@ -318,7 +318,7 @@ static void resize(MwWidget handle) {
|
||||||
|
|
||||||
h -= y;
|
h -= y;
|
||||||
|
|
||||||
if(ih <= (h / (MwTextHeight(handle, NULL, "M") + Padding))) {
|
if(ih <= (h / (MwTextHeight(handle, Font, "M") + Padding))) {
|
||||||
MwLLShow(lb->vscroll->lowlevel, 0);
|
MwLLShow(lb->vscroll->lowlevel, 0);
|
||||||
} else {
|
} else {
|
||||||
MwLLShow(lb->vscroll->lowlevel, 1);
|
MwLLShow(lb->vscroll->lowlevel, 1);
|
||||||
|
|
@ -342,7 +342,7 @@ static void resize(MwWidget handle) {
|
||||||
h -= MwDefaultBorderWidth(handle) * 2;
|
h -= MwDefaultBorderWidth(handle) * 2;
|
||||||
|
|
||||||
MwVaApply(lb->vscroll,
|
MwVaApply(lb->vscroll,
|
||||||
MwNareaShown, h / (MwTextHeight(handle, NULL, "M") + Padding),
|
MwNareaShown, h / (MwTextHeight(handle, Font, "M") + Padding),
|
||||||
MwNmaxValue, ih,
|
MwNmaxValue, ih,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue