summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/scrollbar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c
index f7dead5..6f7928f 100644
--- a/apps/gui/scrollbar.c
+++ b/apps/gui/scrollbar.c
@@ -190,10 +190,10 @@ void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int x,
if(max > items)
max = items;
- if (flags & VERTICAL)
- inner_len = height;
- else
+ if (flags & HORIZONTAL)
inner_len = width;
+ else
+ inner_len = height;
/* avoid overflows */
while (items > (INT_MAX / inner_len)) {