forked from len0rd/rockbox
Settings: Add a new option to prevent text scrollings in the home screen
This option is especially useful for theme creators that want to create themes with lockscreens. When text is scrolling, it is breaking the lockscreen so setting this option to true prevent this. Text will continue to scroll normally in all other contexts. Change-Id: I194f6837217881d50f567a775b81d0b422caf35c
This commit is contained in:
parent
f6b9e923dc
commit
f69d9c8a95
6 changed files with 44 additions and 2 deletions
|
@ -16497,6 +16497,20 @@
|
|||
*: "Choose File"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_DISABLE_MAINMENU_SCROLLING
|
||||
desc: Disable main menu scrolling
|
||||
user: core
|
||||
<source>
|
||||
*: "Disable main menu scrolling"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Disable main menu scrolling"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Disable main menu scrolling"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_REMAINING
|
||||
desc: Playing Time
|
||||
|
|
|
@ -15080,3 +15080,17 @@
|
|||
*: "Français"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_DISABLE_MAINMENU_SCROLLING
|
||||
desc: Disable main menu scrolling
|
||||
user: core
|
||||
<source>
|
||||
*: "Disable main menu scrolling"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Désactiver défilement dans le menu principal"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Désactiver défilement dans le menu principal"
|
||||
</voice>
|
||||
</phrase>
|
||||
|
|
|
@ -331,6 +331,7 @@ MENUITEM_SETTING(list_accel_start_delay,
|
|||
MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL);
|
||||
#endif /* HAVE_WHEEL_ACCELERATION */
|
||||
MENUITEM_SETTING(offset_out_of_view, &global_settings.offset_out_of_view, NULL);
|
||||
MENUITEM_SETTING(disable_mainmenu_scrolling, &global_settings.disable_mainmenu_scrolling, NULL);
|
||||
MENUITEM_SETTING(screen_scroll_step, &global_settings.screen_scroll_step, NULL);
|
||||
MENUITEM_SETTING(scroll_paginated, &global_settings.scroll_paginated, NULL);
|
||||
MENUITEM_SETTING(list_wraparound, &global_settings.list_wraparound, NULL);
|
||||
|
@ -343,7 +344,9 @@ MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON,
|
|||
#ifdef HAVE_REMOTE_LCD
|
||||
&remote_scroll_sets,
|
||||
#endif
|
||||
&offset_out_of_view, &screen_scroll_step,
|
||||
&offset_out_of_view,
|
||||
&disable_mainmenu_scrolling,
|
||||
&screen_scroll_step,
|
||||
&scroll_paginated,
|
||||
&list_wraparound,
|
||||
&list_order,
|
||||
|
|
|
@ -686,6 +686,7 @@ struct user_settings
|
|||
int screen_scroll_step;
|
||||
int show_path_in_browser; /* 0=off, 1=current directory, 2=full path */
|
||||
bool offset_out_of_view;
|
||||
bool disable_mainmenu_scrolling;
|
||||
unsigned char icon_file[MAX_FILENAME+1];
|
||||
unsigned char viewers_icon_file[MAX_FILENAME+1];
|
||||
unsigned char font_file[MAX_FILENAME+1]; /* last font */
|
||||
|
|
|
@ -1319,6 +1319,8 @@ const struct settings_list settings[] = {
|
|||
#endif
|
||||
OFFON_SETTING(0, offset_out_of_view, LANG_SCREEN_SCROLL_VIEW,
|
||||
false, "Screen Scrolls Out Of View", NULL),
|
||||
OFFON_SETTING(0, disable_mainmenu_scrolling, LANG_DISABLE_MAINMENU_SCROLLING,
|
||||
false, "Disable main menu scrolling", NULL),
|
||||
INT_SETTING(F_PADTITLE, scroll_step, LANG_SCROLL_STEP, 6, "scroll step",
|
||||
UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, lcd_scroll_step),
|
||||
INT_SETTING(F_PADTITLE, screen_scroll_step, LANG_SCREEN_SCROLL_STEP, 16,
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
/* This file is meant to be #included by scroll_engine.c (twice if a remote
|
||||
* is present) */
|
||||
|
||||
#include "misc.h"
|
||||
#include "settings.h"
|
||||
#ifndef LCDFN /* Not compiling for remote - define macros for main LCD. */
|
||||
#define LCDFN(fn) lcd_ ## fn
|
||||
#define LCDM(ma) LCD_ ## ma
|
||||
|
@ -195,8 +197,14 @@ static void LCDFN(scroll_worker)(void)
|
|||
s = &si->scroll[index];
|
||||
|
||||
/* check pause */
|
||||
if (TIME_BEFORE(current_tick, s->start_tick))
|
||||
if (TIME_BEFORE(current_tick, s->start_tick)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (global_settings.disable_mainmenu_scrolling && get_current_activity() == ACTIVITY_MAINMENU) {
|
||||
// No scrolling on the main menu if disabled (to not break themes with lockscreens)
|
||||
continue;
|
||||
}
|
||||
|
||||
s->start_tick = current_tick;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue