summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/tv_menu.c
diff options
context:
space:
mode:
authorMoshe Piekarski <mendelmunkis@protonmail.com>2018-04-03 12:45:22 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2018-07-04 06:25:45 +0200
commitab1b67f37b4d415ba096aed3bc5d9700e0a7923f (patch)
tree952e58823e37c7ea99a4f24b0de29bb2105bea6c /apps/plugins/text_viewer/tv_menu.c
parent8742f6f0e2cf7c03716d4486f4fad3b57b98d8d3 (diff)
downloadrockbox-ab1b67f37b4d415ba096aed3bc5d9700e0a7923f.tar.gz
rockbox-ab1b67f37b4d415ba096aed3bc5d9700e0a7923f.zip
Textviewer night mode
Add a night mode to textviewer. Change-Id: I6ddcd9c3c87473cbbffaeacf63a21ef11c0e5f44
Diffstat (limited to 'apps/plugins/text_viewer/tv_menu.c')
-rw-r--r--apps/plugins/text_viewer/tv_menu.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/plugins/text_viewer/tv_menu.c b/apps/plugins/text_viewer/tv_menu.c
index 9e796982d3..01fb052151 100644
--- a/apps/plugins/text_viewer/tv_menu.c
+++ b/apps/plugins/text_viewer/tv_menu.c
@@ -247,6 +247,13 @@ static bool tv_indent_spaces_setting(void)
247 &new_prefs.indent_spaces, NULL, 1, 0, 5, NULL); 247 &new_prefs.indent_spaces, NULL, 1, 0, 5, NULL);
248} 248}
249 249
250#ifdef HAVE_LCD_COLOR
251static bool tv_night_mode_setting(void)
252{
253 return rb->set_bool("Night Mode", &new_prefs.night_mode);
254}
255#endif
256
250MENUITEM_FUNCTION(encoding_item, 0, "Encoding", tv_encoding_setting, 257MENUITEM_FUNCTION(encoding_item, 0, "Encoding", tv_encoding_setting,
251 NULL, NULL, Icon_NOICON); 258 NULL, NULL, Icon_NOICON);
252MENUITEM_FUNCTION(word_wrap_item, 0, "Word Wrap", tv_word_wrap_setting, 259MENUITEM_FUNCTION(word_wrap_item, 0, "Word Wrap", tv_word_wrap_setting,
@@ -269,6 +276,10 @@ MENUITEM_FUNCTION(font_item, 0, "Font", tv_font_setting,
269#endif 276#endif
270MENUITEM_FUNCTION(indent_spaces_item, 0, "Indent Spaces", tv_indent_spaces_setting, 277MENUITEM_FUNCTION(indent_spaces_item, 0, "Indent Spaces", tv_indent_spaces_setting,
271 NULL, NULL, Icon_NOICON); 278 NULL, NULL, Icon_NOICON);
279#ifdef HAVE_LCD_COLOR
280MENUITEM_FUNCTION(night_mode_item, 0, "Night Mode", tv_night_mode_setting,
281 NULL, NULL, Icon_NOICON);
282#endif
272 283
273MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON, 284MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON,
274 &encoding_item, &word_wrap_item, &line_mode_item, &windows_item, 285 &encoding_item, &word_wrap_item, &line_mode_item, &windows_item,
@@ -276,7 +287,11 @@ MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON,
276#ifdef HAVE_LCD_BITMAP 287#ifdef HAVE_LCD_BITMAP
277 &header_item, &footer_item, &font_item, &statusbar_item, 288 &header_item, &footer_item, &font_item, &statusbar_item,
278#endif 289#endif
279 &scroll_menu, &indent_spaces_item); 290 &scroll_menu, &indent_spaces_item
291#ifdef HAVE_LCD_COLOR
292 , &night_mode_item
293#endif
294 );
280 295
281static unsigned tv_options_menu(void) 296static unsigned tv_options_menu(void)
282{ 297{