diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-01-03 19:23:09 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-01-03 19:23:09 +0100 |
commit | f9fc01b176f177bc744aaba643c9a12d0b511e30 (patch) | |
tree | 130f5622f1c43028272414162160c13c2c6b00ae /source/widgets/box.c | |
parent | 7600668bffacb5844e9e6064cb7b75c9aa737230 (diff) |
Add percentage option to border,padding
Diffstat (limited to 'source/widgets/box.c')
-rw-r--r-- | source/widgets/box.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/widgets/box.c b/source/widgets/box.c index 3a1c1d9d..e485c5e4 100644 --- a/source/widgets/box.c +++ b/source/widgets/box.c @@ -55,7 +55,7 @@ static void box_update ( widget *wid ); static int box_get_desired_height ( widget *wid ) { box *b = (box *)wid; - int spacing = distance_get_pixel ( b->spacing ); + int spacing = distance_get_pixel ( b->spacing, b->type == BOX_VERTICAL? ORIENTATION_VERTICAL:ORIENTATION_HORIZONTAL ); int active_widgets = 0; int height = 0; if ( b->type == BOX_VERTICAL ){ @@ -90,7 +90,7 @@ static int box_get_desired_height ( widget *wid ) static void vert_calculate_size ( box *b ) { - int spacing = distance_get_pixel ( b->spacing ); + int spacing = distance_get_pixel ( b->spacing, ORIENTATION_VERTICAL ); int expanding_widgets = 0; int active_widgets = 0; int rem_width = widget_padding_get_remaining_width ( WIDGET (b) ); @@ -169,7 +169,7 @@ static void vert_calculate_size ( box *b ) } static void hori_calculate_size ( box *b ) { - int spacing = distance_get_pixel ( b->spacing ); + int spacing = distance_get_pixel ( b->spacing, ORIENTATION_HORIZONTAL ); int expanding_widgets = 0; int active_widgets = 0; int rem_width = widget_padding_get_remaining_width ( WIDGET (b) ); |