summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/bitmap/list.c10
-rw-r--r--apps/gui/list.c11
-rw-r--r--apps/gui/list.h2
3 files changed, 21 insertions, 2 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index 4aaecc7eab..5a8bc69450 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -250,8 +250,14 @@ void list_draw(struct screen *display, struct viewport *parent,
250 } 250 }
251 } 251 }
252 else 252 else
253 display->puts_style_offset(0, i-start, entry_name, 253 {
254 list_text[display->screen_type].drawmode, item_offset); 254 if (list->scroll_all)
255 display->puts_scroll_style_offset(0, i-start, entry_name,
256 list_text[display->screen_type].drawmode, item_offset);
257 else
258 display->puts_style_offset(0, i-start, entry_name,
259 list_text[display->screen_type].drawmode, item_offset);
260 }
255 /* do the icon */ 261 /* do the icon */
256 if (list->callback_get_item_icon && global_settings.show_icons) 262 if (list->callback_get_item_icon && global_settings.show_icons)
257 { 263 {
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 96652ce0a9..ee50ccf63e 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -786,6 +786,17 @@ bool list_do_action(int context, int timeout,
786 return gui_synclist_do_button(lists, action, wrap); 786 return gui_synclist_do_button(lists, action, wrap);
787} 787}
788 788
789bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
790 enum screen_type screen, int item)
791{
792 struct viewport vp = *lists->parent[screen];
793#ifdef HAVE_LCD_BITMAP
794 if (list_display_title(lists, lists->parent[screen]))
795 vp.height -= list_title_height(lists, lists->parent[screen]);
796#endif
797 return item <= (lists->start_item[screen] + viewport_get_nb_lines(&vp));
798}
799
789/* Simple use list implementation */ 800/* Simple use list implementation */
790static int simplelist_line_count = 0; 801static int simplelist_line_count = 0;
791static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH]; 802static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH];
diff --git a/apps/gui/list.h b/apps/gui/list.h
index e2d7a518e4..8db9c24d48 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -171,6 +171,8 @@ extern void gui_synclist_set_title(struct gui_synclist * lists, char * title,
171 int icon); 171 int icon);
172extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, 172extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists,
173 bool hide); 173 bool hide);
174extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
175 enum screen_type screen, int item);
174/* 176/*
175 * Do the action implied by the given button, 177 * Do the action implied by the given button,
176 * returns true if the action was handled. 178 * returns true if the action was handled.