feat: 5, 6 or 7 icons per row, each laid out on purpose (4 per row dropped) #33

Merged
namillis merged 4 commits from feat/per-row-layout into main 2026-11-24 20:45:20 +00:00
Owner

Follows the merged #32, which moved All apps closer to the Apple TV (tvOS) app grid. Gabriel (the repo owner) said the home row and All apps looked off at some icons-per-row counts: the icon size, the gaps and the favorites bar's width all jumped around between 4, 5, 6 and 7. This PR lays out 5, 6 and 7 per row on purpose, so the favorites bar keeps one width at every count, and drops 4 per row. A saved 4 opens as 5.

Commits, oldest first: 66259f0 (per-row layout), ed1cfa1 (single-row spacing), 62e38a5 (merge of main), 690a62e (test cleanup, the head). Gabriel tried the debug build of ed1cfa1 (sha256 f6be5573bc874f61ed2b8f05363dba2fe687f2986d96208cb2bbcd2d6e6f32a6) on his TV and asked for this PR to be opened and merged.

Main was merged in. Main moved after this branch was cut: #26 (open hidden apps from settings, hold OK to unhide) landed at 0b91773. It is merged into this branch with a merge commit (62e38a5), not a rebase, so 66259f0 and ed1cfa1 keep the hashes they were tested at. Git merged it with no conflicts, and the PR's diff against main is only the per-row work. The build Gabriel tried does not include #26.

Terms used below:

  • tvOS: Apple TV's operating system. Glass Launcher follows its look; 6 per row is tvOS's own layout.
  • Per row: the Appearance setting for how many icons fit across the home row and each All apps row.
  • Favorites bar (or plate): the glass bar behind the favorites row, at the bottom of home and at the top of All apps.
  • Padding: the space between the bar's edge and the icons inside it.
  • Selected icon: the icon with focus. It is drawn 1.224 times its normal size.
  • Single-row layout: the setting that puts every app on one home row that scrolls sideways, inside the same bar.
  • All sizes are in pixels on a 1080p screen (the code stores them in dp, so other screens scale the same layout).

What changed

  • One bar width, sizes that follow the count (66259f0). The favorites bar is 1820 px wide (x 50-1869) at every count. The icons, the gaps between them and the padding grow or shrink together, and the bar's height follows the icons:

    per row icon (px) gap (px) padding, all four sides (px) bar height (px)
    5 300 x 180 56 48 276
    6 250 x 150 (tvOS size, unchanged) 48 40 230
    7 212 x 127 44 36 199

    All apps uses the same icon sizes and gaps. A selected icon stays at least 12 px inside the bar. The bar's corners keep their shape when you change icon roundness.

  • 4 per row is gone (66259f0). The setting now steps 5, 6, 7. A saved 4, from the app's settings or from a restored backup, opens as 5.

  • 7 per row no longer runs off the home bar (66259f0). The home row used to start too far right, so its last icon ran past the bar's edge, and after coming back from All apps the row sat against the bar's left edge. In both cases the row is now centered.

  • Single-row spacing (ed1cfa1). The single-row layout uses the table's icon sizes. At 6 per row it keeps main's spacing exactly: the first icon at x 122, and when you move along the row it scrolls so the selected icon stays at least 96 px from the end of the row. At 5 and 7 the first icon sits one gap in from the bar's end (x 134 / 116) and the scroll margin is two gaps (112 / 88 px).

  • Test cleanup (690a62e). Test-only, no app code. In PerRowLayoutTest it drops one assert that could never fail (top padding = bottom padding, which the bar's height formula already guarantees), and the two single-row checks that the selected icon stays 12 px inside the bar now name the per-row count in their failure messages.

  • Docs (in 66259f0 and ed1cfa1). CHANGELOG.md (Unreleased) has the 5/6/7 entry, the saved-4 note, the single-row sentence and the 7-per-row fix. #26's entry is kept next to it. README.md reads "Choose 5, 6 or 7 icons per row".

  • Where in the code. All in glasslauncher/app/src: the new PerRowLayout.java holds the per-count sizes and the row math, and LauncherActivity.java reads it for the home row, its bar, and the All apps grid and bar. LayoutOptions.MIN_COLUMNS is now 5. Tests: the new PerRowLayoutTest, plus LayoutOptionsTest, At4kHomeLayoutTest, HomeDrawerModelTest, and the instrumented LauncherCustomizationTest, all moved off 4 per row.

No new permissions. The manifest is unchanged. minSdk stays 26 (Android 8). Name text and colors are unchanged.

Screenshots

Glass Launcher on the emulator (Android TV 14, API 34, 1080p), Yosemite wallpaper, from the ed1cfa1 build. Home has the first favorite selected. All apps is the first screen after opening it, with the first app of row 2 selected. #26 changes only the Hidden apps settings page, which isn't shown here.

Home, 5 per row All apps, 5 per row
home 5 all apps 5
Home, 6 per row All apps, 6 per row
home 6 all apps 6
Home, 7 per row All apps, 7 per row
home 7 all apps 7

How it was checked

  • On the head (690a62e, with #26 in), each as its own Gradle run:
    • Unit tests: 288 pass, 0 failed, 0 skipped.
    • Lint: 0 errors, 8 warnings, the same 8 as on main.
    • assembleDebug and assembleDebugAndroidTest: both build. The instrumented tests were compiled, not run.
    • #26's code doesn't use the per-row count, so nothing of #26 still expects 4 per row.
  • On the emulator, with the 66259f0 and ed1cfa1 builds (Android TV 14 at 1080p):
    • Every size in the table above measures within 2 px of the target, on home and All apps, at 5, 6 and 7. A second Kiro session that hadn't built the change measured them again from raw pixels.
    • 6 per row is pixel-identical to main on home, on home after coming back from All apps, and on All apps rows 1 and 3. In the single-row layout it is pixel-identical too, at open and after moving right 9 times. The on-screen clock was left out of these comparisons, because the time changes between captures.
    • A saved 4 opens with every value identical to 5.
    • Also tried: 3 favorites at 7, 4 favorites at 5 (centered in the full-width bar), coming back from All apps at 7, and the single-row layout at 5 and 7.
    • The smaller icons at 7 don't hurt name readability: the lowest name contrast in All apps is 4.73:1 (the WCAG minimum for normal text is 4.5:1).
  • Gabriel's TV (hometv, Android 11): he tried the ed1cfa1 build and approved it. Nothing was measured on it.

Not covered yet

  • 4K and 720p screens on a device. Only unit tests cover them: At4kHomeLayoutTest at 4K, and PerRowLayoutTest's 720p and narrow-screen cases.
  • A device on Android 12 or newer.
  • Reordering favorites at 5 and 7, and touch fling in the single-row layout.
  • The instrumented tests (compiled only).
  • The head with #26 on a screen. Kiro is smoke-testing it on the emulator before this PR merges.

Trying it

Debug APK of the head: GlassLauncher-per-row-690a62e-debug.apk, sha256 6fc04144ea9855ad81da3484bf0c7fd8160e94b10e5bab5fd8b002249672be55 (built from the head's app code; 690a62e changes only tests). adb install -r it, open Settings > Appearance, step icons per row through 5, 6 and 7, and look at home and All apps at each.

Follows the merged [#32](https://git.namillis.me/namillis/GlassLauncherTV/pulls/32), which moved All apps closer to the Apple TV (tvOS) app grid. Gabriel (the repo owner) said the home row and All apps looked off at some icons-per-row counts: the icon size, the gaps and the favorites bar's width all jumped around between 4, 5, 6 and 7. This PR lays out 5, 6 and 7 per row on purpose, so the favorites bar keeps one width at every count, and drops 4 per row. A saved 4 opens as 5. **Commits, oldest first:** `66259f0` (per-row layout), `ed1cfa1` (single-row spacing), `62e38a5` (merge of main), `690a62e` (test cleanup, the head). Gabriel tried the debug build of `ed1cfa1` (sha256 `f6be5573bc874f61ed2b8f05363dba2fe687f2986d96208cb2bbcd2d6e6f32a6`) on his TV and asked for this PR to be opened and merged. **Main was merged in.** Main moved after this branch was cut: [#26](https://git.namillis.me/namillis/GlassLauncherTV/pulls/26) (open hidden apps from settings, hold OK to unhide) landed at `0b91773`. It is merged into this branch with a merge commit (`62e38a5`), not a rebase, so `66259f0` and `ed1cfa1` keep the hashes they were tested at. Git merged it with no conflicts, and the PR's diff against main is only the per-row work. The build Gabriel tried does not include #26. Terms used below: - **tvOS**: Apple TV's operating system. Glass Launcher follows its look; 6 per row is tvOS's own layout. - **Per row**: the Appearance setting for how many icons fit across the home row and each All apps row. - **Favorites bar** (or **plate**): the glass bar behind the favorites row, at the bottom of home and at the top of All apps. - **Padding**: the space between the bar's edge and the icons inside it. - **Selected icon**: the icon with focus. It is drawn 1.224 times its normal size. - **Single-row layout**: the setting that puts every app on one home row that scrolls sideways, inside the same bar. - All sizes are in pixels on a 1080p screen (the code stores them in dp, so other screens scale the same layout). ## What changed - **One bar width, sizes that follow the count (66259f0).** The favorites bar is 1820 px wide (x 50-1869) at every count. The icons, the gaps between them and the padding grow or shrink together, and the bar's height follows the icons: | per row | icon (px) | gap (px) | padding, all four sides (px) | bar height (px) | |---|---|---|---|---| | 5 | 300 x 180 | 56 | 48 | 276 | | 6 | 250 x 150 (tvOS size, unchanged) | 48 | 40 | 230 | | 7 | 212 x 127 | 44 | 36 | 199 | All apps uses the same icon sizes and gaps. A selected icon stays at least 12 px inside the bar. The bar's corners keep their shape when you change icon roundness. - **4 per row is gone (66259f0).** The setting now steps 5, 6, 7. A saved 4, from the app's settings or from a restored backup, opens as 5. - **7 per row no longer runs off the home bar (66259f0).** The home row used to start too far right, so its last icon ran past the bar's edge, and after coming back from All apps the row sat against the bar's left edge. In both cases the row is now centered. - **Single-row spacing (ed1cfa1).** The single-row layout uses the table's icon sizes. At 6 per row it keeps main's spacing exactly: the first icon at x 122, and when you move along the row it scrolls so the selected icon stays at least 96 px from the end of the row. At 5 and 7 the first icon sits one gap in from the bar's end (x 134 / 116) and the scroll margin is two gaps (112 / 88 px). - **Test cleanup (690a62e).** Test-only, no app code. In `PerRowLayoutTest` it drops one assert that could never fail (top padding = bottom padding, which the bar's height formula already guarantees), and the two single-row checks that the selected icon stays 12 px inside the bar now name the per-row count in their failure messages. - **Docs (in 66259f0 and ed1cfa1).** `CHANGELOG.md` (Unreleased) has the 5/6/7 entry, the saved-4 note, the single-row sentence and the 7-per-row fix. #26's entry is kept next to it. `README.md` reads "Choose 5, 6 or 7 icons per row". - **Where in the code.** All in `glasslauncher/app/src`: the new `PerRowLayout.java` holds the per-count sizes and the row math, and `LauncherActivity.java` reads it for the home row, its bar, and the All apps grid and bar. `LayoutOptions.MIN_COLUMNS` is now 5. Tests: the new `PerRowLayoutTest`, plus `LayoutOptionsTest`, `At4kHomeLayoutTest`, `HomeDrawerModelTest`, and the instrumented `LauncherCustomizationTest`, all moved off 4 per row. No new permissions. The manifest is unchanged. minSdk stays 26 (Android 8). Name text and colors are unchanged. ## Screenshots Glass Launcher on the emulator (Android TV 14, API 34, 1080p), Yosemite wallpaper, from the `ed1cfa1` build. Home has the first favorite selected. All apps is the first screen after opening it, with the first app of row 2 selected. #26 changes only the Hidden apps settings page, which isn't shown here. | | | |---|---| | Home, 5 per row | All apps, 5 per row | | ![home 5](https://git.namillis.me/attachments/2c03cc36-7cfb-41c7-9da1-5974634a25d2) | ![all apps 5](https://git.namillis.me/attachments/fab5d649-728f-435b-8e48-2c1bfb6e2133) | | Home, 6 per row | All apps, 6 per row | | ![home 6](https://git.namillis.me/attachments/a23356ed-ac14-433e-8454-6304dd957788) | ![all apps 6](https://git.namillis.me/attachments/d4b423d4-9f5f-4d7f-95d0-5358311eb640) | | Home, 7 per row | All apps, 7 per row | | ![home 7](https://git.namillis.me/attachments/bcd810b3-b0c0-4a6e-b98e-0974589e6ff4) | ![all apps 7](https://git.namillis.me/attachments/b016f6ab-2533-4ff3-ae92-f11d3789e26f) | ## How it was checked - **On the head (`690a62e`, with #26 in), each as its own Gradle run:** - Unit tests: 288 pass, 0 failed, 0 skipped. - Lint: 0 errors, 8 warnings, the same 8 as on main. - `assembleDebug` and `assembleDebugAndroidTest`: both build. The instrumented tests were compiled, not run. - #26's code doesn't use the per-row count, so nothing of #26 still expects 4 per row. - **On the emulator, with the `66259f0` and `ed1cfa1` builds (Android TV 14 at 1080p):** - Every size in the table above measures within 2 px of the target, on home and All apps, at 5, 6 and 7. A second Kiro session that hadn't built the change measured them again from raw pixels. - 6 per row is pixel-identical to main on home, on home after coming back from All apps, and on All apps rows 1 and 3. In the single-row layout it is pixel-identical too, at open and after moving right 9 times. The on-screen clock was left out of these comparisons, because the time changes between captures. - A saved 4 opens with every value identical to 5. - Also tried: 3 favorites at 7, 4 favorites at 5 (centered in the full-width bar), coming back from All apps at 7, and the single-row layout at 5 and 7. - The smaller icons at 7 don't hurt name readability: the lowest name contrast in All apps is 4.73:1 (the WCAG minimum for normal text is 4.5:1). - **Gabriel's TV (hometv, Android 11):** he tried the `ed1cfa1` build and approved it. Nothing was measured on it. ## Not covered yet - 4K and 720p screens on a device. Only unit tests cover them: `At4kHomeLayoutTest` at 4K, and `PerRowLayoutTest`'s 720p and narrow-screen cases. - A device on Android 12 or newer. - Reordering favorites at 5 and 7, and touch fling in the single-row layout. - The instrumented tests (compiled only). - The head with #26 on a screen. Kiro is smoke-testing it on the emulator before this PR merges. ## Trying it Debug APK of the head: `GlassLauncher-per-row-690a62e-debug.apk`, sha256 `6fc04144ea9855ad81da3484bf0c7fd8160e94b10e5bab5fd8b002249672be55` (built from the head's app code; 690a62e changes only tests). `adb install -r` it, open Settings > Appearance, step icons per row through 5, 6 and 7, and look at home and All apps at each.
One pure geometry class, PerRowLayout, now sets tile size, gap, padding,
row pitch and plate corners per count. The home shelf, its blur layer and
rim, and All apps all read it, so the bar is x 50-1869 at every count with
equal padding on all four sides. 6 per row is pixel-equal to before.

- Icons grow at 5 (300x180) and shrink at 7 (212x127) instead of 7 running
  off the bar.
- Fewer favorites than the count: the bar keeps its width and the icons
  are centered. Single-row mode keeps the count's icon size.
- A row that fits exactly is centered (totalW <= w), so 7 no longer sits
  flush left after coming back from All apps.
- MIN_COLUMNS is 5; a saved 4 (prefs or backup) opens as 5.
Author
Owner

Intent. These commits follow the merged #32. They make the home row and All apps look laid out on purpose at 5, 6 and 7 icons per row: the favorites bar keeps one width (1820 px at 1080p), and the icons, gaps and padding grow or shrink together, with equal padding on all four sides. 6 per row stays pixel-identical to main, including the single-row layout. 4 per row is removed, and a saved 4 opens as 5. Main (with #26) was merged in, not rebased, so the tested commits keep their hashes.

Not goals:

  • changing 6 per row, which stays tvOS's layout and main's pixels;
  • new settings, or bringing 4 per row back in another form;
  • changes to name text, colors, Control Center, the clock bubble or the settings pages;
  • 4K or 720p tuning beyond the layout scaling with screen density;
  • a release.
**Intent.** These commits follow the merged #32. They make the home row and All apps look laid out on purpose at 5, 6 and 7 icons per row: the favorites bar keeps one width (1820 px at 1080p), and the icons, gaps and padding grow or shrink together, with equal padding on all four sides. 6 per row stays pixel-identical to main, including the single-row layout. 4 per row is removed, and a saved 4 opens as 5. Main (with #26) was merged in, not rebased, so the tested commits keep their hashes. **Not goals:** - changing 6 per row, which stays tvOS's layout and main's pixels; - new settings, or bringing 4 per row back in another form; - changes to name text, colors, Control Center, the clock bubble or the settings pages; - 4K or 720p tuning beyond the layout scaling with screen density; - a release.
namillis deleted branch feat/per-row-layout 2026-11-24 20:45:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
namillis/GlassLauncherTV!33
No description provided.