Add an icon size setting for the home grid and the app drawer
Slider (70-160%, step 5) with Small/Medium/Large presets and a live preview in the home menu. Icon, label and row height scale together; the home and drawer column counts reflow; the size is saved in localStorage; a corrupt saved value is logged and shown, not silently replaced. 100% is the original layout. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3070db4fb4
commit
23317b949a
22 files changed
+901
-51
No files matched your search
+8
-1
@@ -170,6 +170,8 @@ fn exec(e : @app.Effect) -> Unit {
|
||||
dispatch(LimitsKnown(id, Some(json)))
|
||||
}
|
||||
SaveHome(json) => storage_set("launcher.home", json)
|
||||
SaveIconSize(pct) => storage_set("launcher.iconSize", pct.to_string())
|
||||
LogError(line) => log_error(line)
|
||||
SaveLastCheck(t) => storage_set("launcher.update.lastCheck", t.to_string())
|
||||
Delay(ms, msg) => set_timeout(ms, fn() { dispatch(msg) })
|
||||
HoldTimer(ms, token) => set_timeout(ms, fn() { feed(Hold(token)) })
|
||||
@@ -518,7 +520,12 @@ fn main {
|
||||
None
|
||||
}
|
||||
let legacy = if saved is None { Some(storage_legacy()) } else { None }
|
||||
dispatch(Restore(saved~, legacy~))
|
||||
let icon_size = if storage_has("launcher.iconSize") {
|
||||
Some(storage_get("launcher.iconSize"))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
dispatch(Restore(saved~, legacy~, icon_size~))
|
||||
if is_android() {
|
||||
// the shell keeps the build whose install the user cancelled (-1: none)
|
||||
let declined = h_declined_version()
|
||||
|
||||
Reference in new issue
Block a user