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 4aaecc7..5a8bc69 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,
}
}
else
- display->puts_style_offset(0, i-start, entry_name,
- list_text[display->screen_type].drawmode, item_offset);
+ {
+ if (list->scroll_all)
+ display->puts_scroll_style_offset(0, i-start, entry_name,
+ list_text[display->screen_type].drawmode, item_offset);
+ else
+ display->puts_style_offset(0, i-start, entry_name,
+ list_text[display->screen_type].drawmode, item_offset);
+ }
/* do the icon */
if (list->callback_get_item_icon && global_settings.show_icons)
{
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 96652ce..ee50ccf 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -786,6 +786,17 @@ bool list_do_action(int context, int timeout,
return gui_synclist_do_button(lists, action, wrap);
}
+bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
+ enum screen_type screen, int item)
+{
+ struct viewport vp = *lists->parent[screen];
+#ifdef HAVE_LCD_BITMAP
+ if (list_display_title(lists, lists->parent[screen]))
+ vp.height -= list_title_height(lists, lists->parent[screen]);
+#endif
+ return item <= (lists->start_item[screen] + viewport_get_nb_lines(&vp));
+}
+
/* Simple use list implementation */
static int simplelist_line_count = 0;
static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH];
diff --git a/apps/gui/list.h b/apps/gui/list.h
index e2d7a51..8db9c24 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,
int icon);
extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists,
bool hide);
+extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
+ enum screen_type screen, int item);
/*
* Do the action implied by the given button,
* returns true if the action was handled.