mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-10 03:13:28 +00:00
add MwNleftPadding and update binding
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@346 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -87,7 +87,7 @@ static void frame_draw(MwWidget handle) {
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
p.x = MwDefaultBorderWidth;
|
||||
p.x = MwDefaultBorderWidth + MwGetInteger(handle->parent, MwNleftPadding);
|
||||
p.y = MwDefaultBorderWidth;
|
||||
|
||||
st = get_first_entry(lb);
|
||||
@@ -167,6 +167,8 @@ static int create(MwWidget handle) {
|
||||
lb->selected = -1;
|
||||
lb->click_time = 0;
|
||||
|
||||
MwSetInteger(handle, MwNleftPadding, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -190,6 +192,10 @@ static void draw(MwWidget handle) {
|
||||
|
||||
static void prop_change(MwWidget handle, const char* prop) {
|
||||
if(strcmp(prop, MwNwidth) == 0 || strcmp(prop, MwNheight) == 0) resize(handle);
|
||||
if(strcmp(prop, MwNleftPadding) == 0) {
|
||||
MwListBox lb = handle->internal;
|
||||
MwForceRender(lb->frame);
|
||||
}
|
||||
}
|
||||
|
||||
MwClassRec MwListBoxClassRec = {
|
||||
|
||||
Reference in New Issue
Block a user