Skip to content

Widgets: lay out at the real cell, one number size for every widget - #22

Merged
sayed0am merged 4 commits into
mainfrom
widget-layout
Oct 31, 2026
Merged

sayed0am merged 4 commits into
mainfrom
widget-layout

Conversation

@sayed0am

Copy link
Copy Markdown
Owner

On the unfolded Fold the widgets were inconsistent, left large empty bands, and the workout widget's tile captions drifted away from their tiles.

Cause

One UI places a widget before it tells the widget its size. The Glance session kept the empty size it started with, so every layout was worked out for the smallest cell and then stretched. Logging on the phone showed the launcher reporting 393 x 313 dp while the layout used 300 x 260.

Changes

  • Real cell size: each widget reads its cell from the launcher when it lays out, and lays out again on every resize (onAppWidgetOptionsChanged).
  • One number size: every widget's dotted number takes one size per cell (WidgetHero), a share of the content's height for each size class, instead of each widget growing its own way.
  • 3-column cells: Wide and Large are picked from 280 dp wide, so the inner display's 3 columns (288 dp) get them rather than a stretched Small.
  • Moment's title: Moment's name uses the same title as the other widgets.
  • Picker previews: the previews fit One UI's picker cell (about 136 x 150 dp). The workout preview had its name cut to "Outd", and the Steps preview had its last line cut.
  • Dev build: includes the -PdevApp option from develop, so a branch build installs beside the release app.

The widgets spec (section 6.5 and the size table) records the new rules.

Testing

  • All unit tests pass. Tests that hard-coded the old 300 dp minimums or the old fixed dot sizes are updated.
  • Checked on the Fold's inner display: all five widgets at Small, 3 x 2, 3 x 3, Wide and Large, plus the picker previews.

🤖 Generated with Claude Code

sayed0am and others added 4 commits October 31, 2026 11:38
…s version

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One UI places a widget before it tells it its size, and the Glance session
kept the empty size it started with, so every layout was worked out for the
smallest cell and stretched: tile captions drifted off their tiles, empty
bands everywhere. Each widget now reads its cell from the launcher at layout
and lays out again on every resize.

Every widget's dotted number takes one size per cell (WidgetHero), a share
of the content's height by size class, instead of each widget growing its
own way. Wide and Large are picked from 280 dp wide so the unfolded Fold's
3 columns get them, and Moment's name is every widget's title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The picker shows each 2 x 2 preview at about 136 x 150 dp on the Fold.
Start's name was cut beside play ("Outd"), so play moves up beside the
tile. Steps drops the share's words, which the bar already shows. Moment's
name takes the shared white title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sayed0am
sayed0am merged commit 7e62dfe into main Oct 31, 2026
1 check passed
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.

1 participant