mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 05:35:02 -05:00
touchscreen: Evaluate %Tp tag only if pointing mode is enabled
Simply knowing that a touchscreen is present isn't that useful for themes. Having %Tp evaluate as true when in pointing mode and false in 3x3 mode is better. For example, themes can change their layout or hide touch UI elements when in 3x3 mode, or show a status icon. Although a similar effect can be achieved with the %St tag it's simpler to use %Tp for this purpose -- it can report the current mode, not just the user preference. Change-Id: Ie343c105970dca11864fa44c6a091ed8e9e35b3d
This commit is contained in:
parent
02ad19c959
commit
910a39af27
2 changed files with 4 additions and 4 deletions
|
|
@ -1457,10 +1457,10 @@ const char *get_token_value(struct gui_wps *gwps,
|
||||||
return NULL;
|
return NULL;
|
||||||
case SKIN_TOKEN_HAVE_TOUCH:
|
case SKIN_TOKEN_HAVE_TOUCH:
|
||||||
#ifdef HAVE_TOUCHSCREEN
|
#ifdef HAVE_TOUCHSCREEN
|
||||||
return "t";
|
if (touchscreen_get_mode() == TOUCHSCREEN_POINT)
|
||||||
#else
|
return "t";
|
||||||
return NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
return NULL;
|
||||||
|
|
||||||
#ifdef HAVE_QUICKSCREEN
|
#ifdef HAVE_QUICKSCREEN
|
||||||
case SKIN_TOKEN_TOP_QUICKSETTING_NAME:
|
case SKIN_TOKEN_TOP_QUICKSETTING_NAME:
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ static const struct tag_info legal_tags[] =
|
||||||
* keep in sync with parse_touchregion() and parse_lasttouch() */
|
* keep in sync with parse_touchregion() and parse_lasttouch() */
|
||||||
TAG(SKIN_TOKEN_LASTTOUCH, "Tl" , "|[SD]D", SKIN_REFRESH_DYNAMIC),
|
TAG(SKIN_TOKEN_LASTTOUCH, "Tl" , "|[SD]D", SKIN_REFRESH_DYNAMIC),
|
||||||
TAG(SKIN_TOKEN_TOUCHREGION, "T" , "[Sip][ip][ip][ip][Sip]|S*", 0|NOBREAK),
|
TAG(SKIN_TOKEN_TOUCHREGION, "T" , "[Sip][ip][ip][ip][Sip]|S*", 0|NOBREAK),
|
||||||
TAG(SKIN_TOKEN_HAVE_TOUCH, "Tp", "", FEATURE_TAG),
|
TAG(SKIN_TOKEN_HAVE_TOUCH, "Tp", "", SKIN_REFRESH_STATIC),
|
||||||
|
|
||||||
TAG(SKIN_TOKEN_CURRENT_SCREEN,"cs", "", SKIN_REFRESH_DYNAMIC),
|
TAG(SKIN_TOKEN_CURRENT_SCREEN,"cs", "", SKIN_REFRESH_DYNAMIC),
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue