diff options
author | Thomas Martitz <kugel@rockbox.org> | 2013-05-06 07:20:40 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-03-03 15:14:16 +0100 |
commit | 05a67d021c8fbb10b2654f8378b549901dd4c520 (patch) | |
tree | 23d0fa787d7373bf2ea08d1678cff47306a1a55d /apps/settings_list.c | |
parent | 20e114c1a0f086e432f374fe0ecebf014a571448 (diff) | |
download | rockbox-05a67d021c8fbb10b2654f8378b549901dd4c520.tar.gz rockbox-05a67d021c8fbb10b2654f8378b549901dd4c520.zip |
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.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c index 9b1ec4427f..681a3ab05b 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -282,6 +282,7 @@ static const char graphic_numeric[] = "graphic,numeric"; | |||
282 | #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c) | 282 | #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c) |
283 | #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00) | 283 | #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00) |
284 | #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00) | 284 | #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00) |
285 | #define DEFAULT_THEME_SEPARATOR LCD_RGBPACK(0x80, 0x80, 0x80) | ||
285 | 286 | ||
286 | #define DEFAULT_BACKDROP BACKDROP_DIR "/cabbiev2.bmp" | 287 | #define DEFAULT_BACKDROP BACKDROP_DIR "/cabbiev2.bmp" |
287 | 288 | ||
@@ -323,7 +324,6 @@ static const char graphic_numeric[] = "graphic,numeric"; | |||
323 | #define DEFAULT_TAGCACHE_SCAN_PATHS "/" | 324 | #define DEFAULT_TAGCACHE_SCAN_PATHS "/" |
324 | #endif | 325 | #endif |
325 | 326 | ||
326 | #ifdef HAVE_TOUCHSCREEN | ||
327 | 327 | ||
328 | static const char* list_pad_formatter(char *buffer, size_t buffer_size, | 328 | static const char* list_pad_formatter(char *buffer, size_t buffer_size, |
329 | int val, const char *unit) | 329 | int val, const char *unit) |
@@ -348,7 +348,6 @@ static int32_t list_pad_getlang(int value, int unit) | |||
348 | } | 348 | } |
349 | } | 349 | } |
350 | 350 | ||
351 | #endif /* HAVE_TOUCHSCREEN */ | ||
352 | static const char* formatter_unit_0_is_off(char *buffer, size_t buffer_size, | 351 | static const char* formatter_unit_0_is_off(char *buffer, size_t buffer_size, |
353 | int val, const char *unit) | 352 | int val, const char *unit) |
354 | { | 353 | { |
@@ -910,6 +909,14 @@ const struct settings_list settings[] = { | |||
910 | list_pad_getlang, NULL, 16, | 909 | list_pad_getlang, NULL, 16, |
911 | -1,0,2,4,6,8,10,12,16,20,24,28,32,38,44,50), | 910 | -1,0,2,4,6,8,10,12,16,20,24,28,32,38,44,50), |
912 | #endif | 911 | #endif |
912 | #if LCD_DEPTH > 1 | ||
913 | TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, list_separator_height, LANG_LIST_SEPARATOR, | ||
914 | 0, "list separator height", "auto,off", UNIT_PIXEL, | ||
915 | list_pad_formatter, list_pad_getlang, NULL, 15, | ||
916 | -1,0,1,2,3,4,5,7,9,11,13,16,20,25,30), | ||
917 | {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.list_separator_color,-1, | ||
918 | INT(DEFAULT_THEME_SEPARATOR),"list separator color",NULL,UNUSED}, | ||
919 | #endif | ||
913 | #if CONFIG_KEYPAD == RECORDER_PAD | 920 | #if CONFIG_KEYPAD == RECORDER_PAD |
914 | OFFON_SETTING(F_THEMESETTING,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL), | 921 | OFFON_SETTING(F_THEMESETTING,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL), |
915 | #endif | 922 | #endif |