diff options
Diffstat (limited to 'apps/plugins/text_viewer/tv_display.c')
-rw-r--r-- | apps/plugins/text_viewer/tv_display.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/plugins/text_viewer/tv_display.c b/apps/plugins/text_viewer/tv_display.c index 7c6fdcb760..8cf7e11419 100644 --- a/apps/plugins/text_viewer/tv_display.c +++ b/apps/plugins/text_viewer/tv_display.c | |||
@@ -100,6 +100,7 @@ static struct tv_rect bookmark; | |||
100 | #endif | 100 | #endif |
101 | static struct tv_rect drawarea; | 101 | static struct tv_rect drawarea; |
102 | 102 | ||
103 | static bool show_horizontal_scrollbar; | ||
103 | static bool show_vertical_scrollbar; | 104 | static bool show_vertical_scrollbar; |
104 | 105 | ||
105 | static int display_columns; | 106 | static int display_columns; |
@@ -138,7 +139,7 @@ static void tv_show_scrollbar(int window, int col, off_t cur_pos, int size) | |||
138 | int min_shown; | 139 | int min_shown; |
139 | int max_shown; | 140 | int max_shown; |
140 | 141 | ||
141 | if (preferences->horizontal_scrollbar) | 142 | if (show_horizontal_scrollbar) |
142 | { | 143 | { |
143 | items = preferences->windows * display_columns; | 144 | items = preferences->windows * display_columns; |
144 | min_shown = window * display_columns + col; | 145 | min_shown = window * display_columns + col; |
@@ -168,7 +169,8 @@ static void tv_show_scrollbar(int window, int col, off_t cur_pos, int size) | |||
168 | void tv_init_scrollbar(off_t total, bool show_scrollbar) | 169 | void tv_init_scrollbar(off_t total, bool show_scrollbar) |
169 | { | 170 | { |
170 | totalsize = total; | 171 | totalsize = total; |
171 | show_vertical_scrollbar = show_scrollbar; | 172 | show_horizontal_scrollbar = (show_scrollbar && preferences->horizontal_scrollbar); |
173 | show_vertical_scrollbar = (show_scrollbar && preferences->vertical_scrollbar); | ||
172 | } | 174 | } |
173 | 175 | ||
174 | void tv_show_bookmarks(const int *rows, int count) | 176 | void tv_show_bookmarks(const int *rows, int count) |
@@ -251,8 +253,10 @@ void tv_end_display(void) | |||
251 | void tv_set_layout(bool show_scrollbar) | 253 | void tv_set_layout(bool show_scrollbar) |
252 | { | 254 | { |
253 | #ifdef HAVE_LCD_BITMAP | 255 | #ifdef HAVE_LCD_BITMAP |
254 | int scrollbar_width = (show_scrollbar)? TV_SCROLLBAR_WIDTH + 1 : 0; | 256 | int scrollbar_width = (show_scrollbar && preferences->vertical_scrollbar)? |
255 | int scrollbar_height = (preferences->horizontal_scrollbar)? TV_SCROLLBAR_HEIGHT + 1 : 0; | 257 | TV_SCROLLBAR_WIDTH + 1 : 0; |
258 | int scrollbar_height = (show_scrollbar && preferences->horizontal_scrollbar)? | ||
259 | TV_SCROLLBAR_HEIGHT + 1 : 0; | ||
256 | 260 | ||
257 | row_height = preferences->font->height; | 261 | row_height = preferences->font->height; |
258 | 262 | ||