Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/omamobile-shell/plugins/omamobile.home/AppTile.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@ Item {
anchors.bottom: parent.verticalCenter
anchors.bottomMargin: -Math.round(width * 0.18)
// Phone-sized, like a home-screen icon on iOS: most of the cell's width.
width: Math.min(64, Math.max(40, Math.min(tile.width, tile.height) * 0.62))
// Up to 128 px of cell width (the 7 Pro's and the 9a's default grids,
// about 120 px) it is exactly as before, capped at 64. A wider cell
// (scale 2, or the 3-column grid) follows the cell with no cap; there the
// height limit keeps the icon's top in the cell and room for its name.
// It takes the larger of the two, so a wide but short cell (the 7 Pro
// on its side) keeps its old size: this only ever grows an icon.
width: tile.width > 128
? Math.max(Math.min(64, Math.max(40, Math.min(tile.width, tile.height) * 0.62)),
Math.min(tile.width * 0.62, tile.height * 0.6))
: Math.min(64, Math.max(40, Math.min(tile.width, tile.height) * 0.62))
height: width
fillMode: Image.PreserveAspectFit
asynchronous: true
Expand Down
5 changes: 5 additions & 0 deletions packages/omamobile-shell/test/all
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,11 @@ grep -c '!LauncherModel.opensShellSurface(entry))' plugins/omamobile.launcher/La
grep -c '!HomeModel.opensShellSurface(entry))' plugins/omamobile.home/Home.qml >/dev/null || fail "no launch toast for an entry that opens a shell surface (drawer and home)"
grep -c 'Quickshell.execDetached(HomeModel.appLaunchArgv(entry.id))' plugins/omamobile.home/Home.qml >/dev/null || fail "home-screen apps launch through omamobile-launch"
grep -c 'tile.home.launch(tile.entry.app)' plugins/omamobile.home/AppTile.qml >/dev/null || fail "app tiles launch through the home screen"
# Home icons: unchanged (capped at 64) up to a 128 px cell, the cell's 62 %
# beyond it (scale 2, the 3-column grid)
grep -c 'Math.min(64, Math.max(40, Math.min(tile.width, tile.height) \* 0.62))' plugins/omamobile.home/AppTile.qml >/dev/null || fail "narrow cells keep the 64 px icon"
grep -c 'width: tile.width > 128' plugins/omamobile.home/AppTile.qml >/dev/null || fail "wide cells lift the icon cap"
grep -c '? Math.max(Math.min(64, Math.max(40, Math.min(tile.width, tile.height) \* 0.62)),' plugins/omamobile.home/AppTile.qml >/dev/null || fail "a wide cell never shrinks the icon below the capped size (the 7 Pro on its side)"
grep -c 'Quickshell.execDetached(HomeModel.commandLaunchArgv(argv))' plugins/omamobile.home/WidgetHost.qml >/dev/null || fail "widgets' host.launch goes through omamobile-launch"
grep -c 'Quickshell.execDetached(HomeModel.urlLaunchArgv(text))' plugins/omamobile.home/WidgetHost.qml >/dev/null || fail "widgets' host.openUrl goes through omamobile-launch"
grep -c 'HomeModel.commandLaunchArgv(\["sh", "-c", tap\])' plugins/omamobile.home/CommandWidget.qml >/dev/null || fail "the text widget's tap goes through omamobile-launch"
Expand Down
2 changes: 1 addition & 1 deletion packages/omamobile-shell/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.65
0.2.66