summaryrefslogtreecommitdiff
path: root/apps/settings_list.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2013-05-06 07:20:40 +0200
committerThomas Martitz <kugel@rockbox.org>2014-03-03 15:14:16 +0100
commit05a67d021c8fbb10b2654f8378b549901dd4c520 (patch)
tree23d0fa787d7373bf2ea08d1678cff47306a1a55d /apps/settings_list.c
parent20e114c1a0f086e432f374fe0ecebf014a571448 (diff)
downloadrockbox-05a67d021c8fbb10b2654f8378b549901dd4c520.zip
rockbox-05a67d021c8fbb10b2654f8378b549901dd4c520.tar.gz
rockbox-05a67d021c8fbb10b2654f8378b549901dd4c520.tar.bz2
rockbox-05a67d021c8fbb10b2654f8378b549901dd4c520.tar.xz
Touchscreen: Show a line separator in lists.
This patch adds a configurable line separator between list items, very similar to lists in Android. Additionally, below the list item there is a thicker line. It can be disabled in the settings. Its color can be configured as well. Remote and monochrome displays are explicitly unsupported. If there is desire this can be changed but it doesn't seem useful to me. Change-Id: I005313b0d8f5ecd15864bf20e66ea4e3390d8b7d
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r--apps/settings_list.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 9b1ec44..681a3ab 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -282,6 +282,7 @@ static const char graphic_numeric[] = "graphic,numeric";
#define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)
#define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00)
#define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00)
+#define DEFAULT_THEME_SEPARATOR LCD_RGBPACK(0x80, 0x80, 0x80)
#define DEFAULT_BACKDROP BACKDROP_DIR "/cabbiev2.bmp"
@@ -323,7 +324,6 @@ static const char graphic_numeric[] = "graphic,numeric";
#define DEFAULT_TAGCACHE_SCAN_PATHS "/"
#endif
-#ifdef HAVE_TOUCHSCREEN
static const char* list_pad_formatter(char *buffer, size_t buffer_size,
int val, const char *unit)
@@ -348,7 +348,6 @@ static int32_t list_pad_getlang(int value, int unit)
}
}
-#endif /* HAVE_TOUCHSCREEN */
static const char* formatter_unit_0_is_off(char *buffer, size_t buffer_size,
int val, const char *unit)
{
@@ -910,6 +909,14 @@ const struct settings_list settings[] = {
list_pad_getlang, NULL, 16,
-1,0,2,4,6,8,10,12,16,20,24,28,32,38,44,50),
#endif
+#if LCD_DEPTH > 1
+ TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, list_separator_height, LANG_LIST_SEPARATOR,
+ 0, "list separator height", "auto,off", UNIT_PIXEL,
+ list_pad_formatter, list_pad_getlang, NULL, 15,
+ -1,0,1,2,3,4,5,7,9,11,13,16,20,25,30),
+ {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.list_separator_color,-1,
+ INT(DEFAULT_THEME_SEPARATOR),"list separator color",NULL,UNUSED},
+#endif
#if CONFIG_KEYPAD == RECORDER_PAD
OFFON_SETTING(F_THEMESETTING,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL),
#endif