From e26b406e021f46366ae5b49fa32f415df4953dad Mon Sep 17 00:00:00 2001 From: Kaj Schittecat Date: Wed, 29 Jul 2026 14:15:17 +0200 Subject: [PATCH] touch: P4 honours the UI-size pref again (text size was a dead no-op) beta_49 hard-pinned s_ui_fscale=100 on the P4 to stop >100% chrome overflow, but the "UI size" dropdown stays shown (CAP_LARGE_SCREEN), so changing it did nothing (reported: "changing text size doesn't work on the P4"). Honour the saved pref like the Tanmatsu does. Large/Huge can still make some P4 chrome that uses unscaled dims tight; that's a per-screen SC() follow-up, not a reason to disable scaling. Co-Authored-By: Claude Opus 4.8 --- src/ui-touch/UITask.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/ui-touch/UITask.cpp b/src/ui-touch/UITask.cpp index c9b6143..5725aa9 100644 --- a/src/ui-touch/UITask.cpp +++ b/src/ui-touch/UITask.cpp @@ -534,15 +534,12 @@ static void initTouchFontFallbacks() { // upscaling a low-res frame). g_font_12/14/16 are what the whole UI draws with, so this scales // every screen at once. The colour-emoji + non-Latin fallbacks stay their baked sizes (they don't // grow), which is fine for Latin text. g_font_tab is pinned to 16 px so the bottom bar never grows. -#if defined(HAS_TDISPLAY_P4) - // The P4 is a NARROW 284 px portrait: bigger fonts overflow the fixed-height/width chrome (the - // status bar, home grid, and list/settings rows all use unscaled dims), so 100% is the only size - // that fits. Ignore any Large/Huge pref (a unit can inherit one from adopted T-Deck prefs). The - // Tanmatsu is 800 px landscape and keeps the option. GH: P4 text overflow above 100%. - s_ui_fscale = 100; -#else + // UI scale from the saved pref (Normal/Large/Huge -> 100/140/170%). The P4 honours it like the + // Tanmatsu — its "UI size" dropdown is shown (CAP_LARGE_SCREEN), so pinning 100% here made that + // setting a dead no-op (reported: "changing text size doesn't work"). At Large/Huge some P4 chrome + // that still uses unscaled dims (status bar, home grid, list rows) can be tight; that is the lesser + // problem and a per-screen SC() follow-up, not a reason to disable scaling outright. switch (touchPrefsGetUiScale()) { case 1: s_ui_fscale = 140; break; case 2: s_ui_fscale = 170; break; default: s_ui_fscale = 100; break; } -#endif switch (s_ui_fscale) { case 140: g_font_12 = lv_font_montserrat_16; g_font_14 = lv_font_montserrat_20; g_font_16 = lv_font_montserrat_24; break; // Large ~1.4x case 170: g_font_12 = lv_font_montserrat_20; g_font_14 = lv_font_montserrat_24; g_font_16 = lv_font_montserrat_28; break; // Huge ~1.7x