Skip to content

fw: honor the Text Size setting in the launcher, add a notification text size - #2087

Merged
gmarull merged 5 commits into
coredevices:mainfrom
teslabs:launcher-text-size
Sep 17, 2026
Merged

gmarull merged 5 commits into
coredevices:mainfrom
teslabs:launcher-text-size

Conversation

@gmarull

@gmarull gmarull commented Sep 16, 2026

Copy link
Copy Markdown
Member

The launcher picked its fonts and cell heights at compile time from PBL_DISPLAY_HEIGHT, so the Text Size setting (including the ExtraLarge tier on large-display platforms) never reached it while every other system menu followed the preference.

  • Replace the display-height macros with a style table indexed by the preferred content size. Medium/Large carry the values previously used on small/large displays, which are the platform defaults, so nothing changes until the user touches the setting (existing goldens pass unchanged). ExtraLarge adds Gothic 28 bold / Gothic 24 in 60 px rect cells and 66/56 px round cells; the round row count is now derived from the cell heights.
  • The saved scroll offset is tagged with the content size it was captured with, so Settings → change size → back re-centers the selection instead of restoring a stale offset. A phone-side change while the launcher is open rebuilds the menu layer in place.
  • The battery and charging icons in the Settings glance scale with the tier (21×12 / 9×12 at ExtraLarge) and are centered on the subtitle instead of using a display-height offset. The charging bolt is now drawn from a per-row span table rather than the 7×9 PNG, pixel-identical at the existing size, so no new resources are needed.

"Before" is main; the Default column is pixel-identical before and after on both platforms.

Default Larger Larger, scrolled
Before (qemu_emery)
After (qemu_emery)
Before (qemu_gabbro)
After (qemu_gabbro)

Settings glance while charging, Default vs Larger (qemu_emery):

Default Larger

Fixes FIRM-4325

Notification text size (FIRM-4324)

Text Size started out under Notifications and only affected notifications; once it was generalized to the rest of the system UI there was no way to keep notifications at a different size than the menus. This adds a notification-specific preference (notifTextSize in the alerts preferences) with the same Smaller/Default/Larger choices plus Same as System, and brings the Text Size row back under Settings → Notifications. Only the notification layout resolves it, so the notification popup, reminders and the notifications app content follow it while everything else keeps following the system setting. The default is the platform default size, i.e. what the notification-only setting used to default to, so notifications look the same as before until either setting is changed.

Fixes FIRM-4324

Follow-ups from #1912

  • Option menus (including the Text Size choosers) follow the user's size, with an ExtraLarge style (56 px single-line cell). Goldens added at Medium/ExtraLarge on obelix and gabbro; the platform-default goldens are unchanged.
  • Notifications app list and empty state, alarms "limit reached" cell and the Bluetooth pairing hint follow the user's size. The round notifications list gets a 100 px focused cell at ExtraLarge, since the icon + title + subtitle stack no longer fits the 84 px one.
  • Left pinned to the platform default on purpose: the selection/date/time pickers (their Large layouts assume ≥200 px displays), Music, Send Text's no-contacts screen, the text_layer default font, action-menu separator/crumbs, Timeline and the status bar.

Screenshots (qemu_emery)

System Text Size at Larger unless noted. "Before" is the previous tip of this PR (launcher commits only), so these isolate the notification and #1912 follow-up changes.

Before After
Settings → Notifications (defaults)
Notification Text Size chooser (defaults)
Text Size chooser (option menu) at Larger
Settings → Notifications at Larger
Notification, notification size at its default
Notification, notification size Smaller
Notification, notification size Same as System
Notifications app list
Settings → Bluetooth

Tested: full unit suite (333 tests), builds for qemu_emery, obelix, asterix, getafix and qemu_gabbro; manual checks on qemu_emery and qemu_gabbro. Not tested on hardware.

🤖 Generated with Claude Code

@gmarull
gmarull requested a review from jplexer as a code owner September 16, 2026 18:03
@gmarull gmarull changed the title fw/apps/launcher: honor the Text Size setting fw: honor the Text Size setting in the launcher, add a notification text size Sep 17, 2026
gmarull and others added 5 commits September 17, 2026 10:24
The launcher draws app names with fonts and cell heights picked at
compile time from PBL_DISPLAY_HEIGHT, so the Text Size setting had no
effect on it while every other system menu followed the preference.

Replace the display-height macros with a style table indexed by the
preferred content size. Medium carries the values previously used on
small displays and Large the ones used on large displays, which are
exactly the platform defaults, so the launcher looks the same as before
until the user changes the setting. ExtraLarge adds the tier the
setting exposes on large-display platforms: Gothic 28 bold titles with
Gothic 24 subtitles in 60 px rect cells, and 66/56 px focused/unfocused
round cells. On round displays the number of unfocused rows on each
side of the focused one is now derived from the cell heights instead
of being fixed, so the layout stays consistent across sizes.

The number of visible rows, which bounds the glance cache, remains a
compile-time constant computed from the smallest cell heights.

The battery and charging icons in the Settings glance were fixed at
16x9 and 7x9 with a display-height vertical offset, which leaves them
small and sitting low next to the ExtraLarge subtitle. Size them per
content size too: the battery silhouette path is already built from
its dimensions, and the charging bolt bitmap becomes a per-row span
table so a 9x12 bolt can be drawn without a new resource. Medium and
Large keep the previous sizes and offsets, so they render identically.
The PNG stays in the resource maps for now, since dropping it renumbers
every later resource id and needs the test fixtures regenerated.

Fixes FIRM-4325

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The launcher saves its scroll offset when it exits and restores it on
the next visit, so changing the text size in Settings and pressing back
restored an offset measured with the old cell heights and could leave
the selection off screen. Record the content size alongside the offset
and, when it no longer matches, fall back to centering the selected row.

A preference change pushed from the phone while the launcher is open
could not be picked up either, as glances cache their fonts and the
menu layer its cell heights. Subscribe to preference change events and
rebuild the launcher menu layer in place when the content size differs
from the one it was initialized with, keeping the selection.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The Text Size setting started out under Notifications and, until it was
generalized to the rest of the system UI, only affected notifications.
Users who picked a size for their notifications now get it applied to
every menu too, and there is no way to keep notifications at a different
size than the system.

Add a notification content size preference to the alerts preferences,
stored in the notification preferences file as "notifTextSize". It takes
the same Smaller/Default/Larger choices as the system setting, plus a
"Same as System" value that follows it. The notification layout resolves
the preference when it builds its view, so the notification window,
reminders and the notifications app all render with it while the rest
of the system keeps following the system setting.

The default is the platform default content size, which is what the
original notification-only Text Size setting defaulted to, so
notifications look the same as they did before the generalization until
the user changes either setting.

Settings -> Notifications gets the Text Size row back, now driving the
notification preference.

Fixes FIRM-4324

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Radio-list option menus, including the Text Size chooser itself, kept
rendering their titles and cell geometry at the platform default size
after the rest of the system menus started following the user's Text
Size setting.

Route the option menu style and title font through the preferred
content size. The option menu is system-only, so no per-process gating
is needed. Add an ExtraLarge style with a 56 px single-line cell, ten
pixels taller than Large like the ExtraLarge small menu cell, so the
Gothic 28 bold title fits; the default and double-line content types
already scale through menu_cell_basic_cell_height().

Add goldens at Medium and ExtraLarge on the rect and round test
platforms; the existing goldens at the platform default are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The notifications app list, its empty state, the alarms "limit reached"
cell and the Bluetooth pairing hint still drew with the platform default
fonts and cell heights, so they stayed the same size when the user
changed Text Size while every other menu around them followed it.

Switch them to the preferred content size. The notifications list picks
its cell height from the same per-size table it already had, so
ExtraLarge gets the basic menu cell height like Large does. On round
displays the focused notification cell grows from 84 to 100 px at
ExtraLarge, since the icon, title and subtitle stack no longer fits the
fixed tall cell with the larger fonts; the unfocused rows shrink
accordingly so two still fit on each side. The Bluetooth pairing hint is
drawn below the first cell outside its bounds with a fixed 83 px box,
which no longer fits the larger fonts; size the box to the remaining
display height instead and let the trailing ellipsis handle overflow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
@gmarull
gmarull merged commit bb02ebe into coredevices:main Sep 17, 2026
48 checks passed
@gmarull
gmarull deleted the launcher-text-size branch September 17, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants