Make the editor top and bottom bars ~30% taller for bigger tap targets

The top bar's back/search icons (24dp in a 32dp bar) and the bottom
bar's wrap toggle (a text label in a 24dp bar) were fiddly to hit.
Top bar: 32 -> 42dp (new TopBarHeight const, which buildFindBar and
the editor text area already hang off); its icons 24 -> 31dp (new
TopBarIconSize; the find bar keeps the smaller ui.IconSize). Bottom
bar: BottomBarHeight 24 -> 31dp, labels re-centred.

While verifying, a relaunch into an app-unreadable saved directory
(/storage/emulated is media_rw:media_rw 0750 on device; only
/storage/emulated/0 is app-exposed) showed an empty browser: os.Stat
passes for such dirs, so the restore guard now probes with a real
os.ReadDir — the same operation the browser index does.

Test expectations that hard-coded the old 32dp top bar now use
TopBarHeight. Verified on emulator and phone: back/search/wrap all
tappable, find bar still docks under the taller top bar.
This commit is contained in:
gmp
2026-09-03 12:34:18 -04:00
parent e96464ec79
commit ef54486683
5 changed files with 41 additions and 26 deletions
+8 -4
View File
@@ -120,10 +120,14 @@ func run(w *app.Window) error {
if sess, ok := loadSession(sessPath); ok {
if sess.InBrowser {
log.Printf("restoring session: browser path=%q", sess.BrowserPath)
// The saved directory may have vanished (deleted, synced away):
// fall back to the startup directory rather than pointing the
// browser at a dead path.
if fi, err := os.Stat(sess.BrowserPath); err == nil && fi.IsDir() {
// The saved directory may have vanished (deleted, synced away) or
// be unreadable by this app (stat succeeds but the permission bits
// deny the read — e.g. /storage/emulated itself, which is
// media_rw:media_rw 0750; only /storage/emulated/0 is app-exposed).
// Probe with a real directory read — the same operation the
// browser's index does — rather than os.Stat, which passes for
// unreadable dirs. Fall back to the startup directory otherwise.
if _, err := os.ReadDir(sess.BrowserPath); err == nil {
logic.BeginBrowserRestore(sess.BrowserPath)
}
} else {