feat: 5, 6 or 7 icons per row, each laid out on purpose (4 per row dropped) #33
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/per-row-layout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 ofed1cfa1(sha256f6be5573bc874f61ed2b8f05363dba2fe687f2986d96208cb2bbcd2d6e6f32a6) 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, so66259f0anded1cfa1keep 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:
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: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. InPerRowLayoutTestit 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
66259f0anded1cfa1).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.mdreads "Choose 5, 6 or 7 icons per row".Where in the code. All in
glasslauncher/app/src: the newPerRowLayout.javaholds the per-count sizes and the row math, andLauncherActivity.javareads it for the home row, its bar, and the All apps grid and bar.LayoutOptions.MIN_COLUMNSis now 5. Tests: the newPerRowLayoutTest, plusLayoutOptionsTest,At4kHomeLayoutTest,HomeDrawerModelTest, and the instrumentedLauncherCustomizationTest, 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
ed1cfa1build. 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.How it was checked
690a62e, with #26 in), each as its own Gradle run:assembleDebugandassembleDebugAndroidTest: both build. The instrumented tests were compiled, not run.66259f0anded1cfa1builds (Android TV 14 at 1080p):ed1cfa1build and approved it. Nothing was measured on it.Not covered yet
At4kHomeLayoutTestat 4K, andPerRowLayoutTest's 720p and narrow-screen cases.Trying it
Debug APK of the head:
GlassLauncher-per-row-690a62e-debug.apk, sha2566fc04144ea9855ad81da3484bf0c7fd8160e94b10e5bab5fd8b002249672be55(built from the head's app code;690a62echanges only tests).adb install -rit, open Settings > Appearance, step icons per row through 5, 6 and 7, and look at home and All apps at each.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: