summaryrefslogtreecommitdiff
path: root/apps/gui/scrollbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/scrollbar.c')
-rw-r--r--apps/gui/scrollbar.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c
index aafd4b093a..2e4bd8580c 100644
--- a/apps/gui/scrollbar.c
+++ b/apps/gui/scrollbar.c
@@ -94,11 +94,20 @@ void gui_scrollbar_draw(struct screen * screen, int x, int y,
94 max_shown = items; 94 max_shown = items;
95 } 95 }
96 96
97 inner_x = x + 1; 97 if (flags & BORDER_NOFILL)
98 inner_y = y + 1; 98 {
99 inner_wd = width - 2; 99 inner_x = x;
100 inner_ht = height - 2; 100 inner_y = y;
101 101 inner_wd = width;
102 inner_ht = height;
103 }
104 else
105 {
106 inner_x = x + 1;
107 inner_y = y + 1;
108 inner_wd = width - 2;
109 inner_ht = height - 2;
110 }
102 /* Boundary check to make sure that height is reasonable, otherwise nothing 111 /* Boundary check to make sure that height is reasonable, otherwise nothing
103 * to do 112 * to do
104 */ 113 */
@@ -113,16 +122,18 @@ void gui_scrollbar_draw(struct screen * screen, int x, int y,
113 scrollbar_helper(min_shown, max_shown, items, inner_len, &size, &start); 122 scrollbar_helper(min_shown, max_shown, items, inner_len, &size, &start);
114 123
115 /* draw box */ 124 /* draw box */
125 if (!(flags & BORDER_NOFILL))
126 {
116#ifdef HAVE_LCD_COLOR 127#ifdef HAVE_LCD_COLOR
117 /* must avoid corners if case of (flags & FOREGROUND) */ 128 /* must avoid corners if case of (flags & FOREGROUND) */
118 screen->hline(inner_x, x + inner_wd, y); 129 screen->hline(inner_x, x + inner_wd, y);
119 screen->hline(inner_x, x + inner_wd, y + height - 1); 130 screen->hline(inner_x, x + inner_wd, y + height - 1);
120 screen->vline(x, inner_y, y + inner_ht); 131 screen->vline(x, inner_y, y + inner_ht);
121 screen->vline(x + width - 1, inner_y, y + inner_ht); 132 screen->vline(x + width - 1, inner_y, y + inner_ht);
122#else 133#else
123 screen->drawrect(x, y, width, height); 134 screen->drawrect(x, y, width, height);
124#endif 135#endif
125 136 }
126 screen->set_drawmode(DRMODE_SOLID | DRMODE_INVERSEVID); 137 screen->set_drawmode(DRMODE_SOLID | DRMODE_INVERSEVID);
127 138
128#ifdef HAVE_LCD_COLOR 139#ifdef HAVE_LCD_COLOR