summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/sidebarwidget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 8bf64b5c..0477adec 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -416,7 +416,7 @@ static void checkModeButtonLayout_SidebarWidget_(iSidebarWidget *d) {
416 416
417void setWidth_SidebarWidget(iSidebarWidget *d, int width) { 417void setWidth_SidebarWidget(iSidebarWidget *d, int width) {
418 iWidget *w = as_Widget(d); 418 iWidget *w = as_Widget(d);
419 width = iMax(30 * gap_UI, width); 419 width = iClamp(width, 30 * gap_UI, rootSize_Window(get_Window()).x - 50 * gap_UI);
420 d->width = width; 420 d->width = width;
421 if (isVisible_Widget(w)) { 421 if (isVisible_Widget(w)) {
422 w->rect.size.x = width; 422 w->rect.size.x = width;