diff options
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r-- | src/ui/widget.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index ddb3f092..b60c67e3 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -149,6 +149,8 @@ void setPos_Widget(iWidget *d, iInt2 pos) { | |||
149 | } | 149 | } |
150 | 150 | ||
151 | void setSize_Widget(iWidget *d, iInt2 size) { | 151 | void setSize_Widget(iWidget *d, iInt2 size) { |
152 | if (size.x < 0) size.x = d->rect.size.x; | ||
153 | if (size.y < 0) size.y = d->rect.size.y; | ||
152 | d->rect.size = size; | 154 | d->rect.size = size; |
153 | setFlags_Widget(d, fixedSize_WidgetFlag, iTrue); | 155 | setFlags_Widget(d, fixedSize_WidgetFlag, iTrue); |
154 | } | 156 | } |