Fix wallpaper transparency, Recents setup guide, and drawer animation
Launcher / test (pull_request) Successful in 1m12s
Launcher / apk (pull_request) Skipped

This commit is contained in:
Sprite committed 2026-11-23 04:55:23 +00:00
1 parent 2fa7bd745b
commit 216c80252d
14 files changed
+474 -86

No files matched your search

+16 -13
View File
@@ -172,23 +172,18 @@ extern "js" fn resize_handles() -> String =
#|() => JSON.stringify([...document.querySelectorAll(".resize-handle")].map((h) => { const r = h.getBoundingClientRect(); return [Math.round(r.left), Math.round(r.top), Math.round(r.width), Math.round(r.height)]; }))
///|
/// The drawer covers the page down to this y (px); -1 once it covers the screen, 0 when
/// there is no drawer. `last` is the previous bottom edge, so the answer can run ahead of it.
extern "js" fn drawer_cover(last : Double) -> Double =
#|(last) => { const d = document.querySelector(".drawer"); if (!d) return 0; const b = d.getBoundingClientRect().bottom; if (b >= innerHeight - 1) return -1; return Math.min(innerHeight - 1, Math.max(0, Math.ceil(b + 2 * Math.max(0, b - last)))); }
/// Whether the drawer is open and not animating out.
extern "js" fn drawer_covering() -> Bool =
#|() => !!document.querySelector(".drawer:not(.closing)")
///|
extern "js" fn drawer_bottom() -> Double =
#|() => { const d = document.querySelector(".drawer"); return d ? d.getBoundingClientRect().bottom : 0 }
///|
/// A drawer or sheet over the home screen's widgets (the shell has them step aside).
/// A drawer over the home screen's widgets without a sheet on top (the shell keeps widget views placed while `cover` hides them).
extern "js" fn has_drawer() -> Bool =
#|() => !!document.querySelector(".drawer") && !document.querySelector(".sheet-overlay")
#|() => !!document.querySelector(".drawer:not(.closing)") && !document.querySelector(".sheet-overlay")
///|
extern "js" fn focus_search() -> Unit =
#|() => { const i = document.querySelector(".drawer:not(.picking) .drawer-head input"); if (i) i.focus({ preventScroll: true }) }
#|() => { const i = document.querySelector(".drawer:not(.picking):not(.closing) .drawer-head input"); if (i) i.focus({ preventScroll: true }) }
///|
extern "js" fn blur_active() -> Unit =
@@ -308,8 +303,16 @@ extern "js" fn h_pick_wallpaper() -> Unit =
#|() => window.Android.pickWallpaper()
///|
extern "js" fn h_open_recents() -> Unit =
#|() => window.Android.openRecents()
extern "js" fn h_open_recents() -> Bool =
#|() => window.Android.openRecents() !== false
///|
extern "js" fn h_open_accessibility_settings() -> Unit =
#|() => window.Android.openAccessibilitySettings && window.Android.openAccessibilitySettings()
///|
extern "js" fn h_open_self_app_info() -> Unit =
#|() => window.Android.openSelfAppInfo && window.Android.openSelfAppInfo()
///|
extern "js" fn h_http_get(url : String, tag : Int32) -> Unit =