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.
21 lines
728 B
Go
21 lines
728 B
Go
package ui
|
|
|
|
const (
|
|
// Standard dimensions in Dp
|
|
StatusBarLineHeight = Dp(24)
|
|
StatusBarFilenameLine = Dp(24)
|
|
StatusBarIconsLine = Dp(24)
|
|
BottomBarHeight = Dp(31) // ~30% taller than the old 24dp: the bar's only tap target (the wrap toggle) is a text label, so the bar doubles as its hit area
|
|
IconSize = Dp(24)
|
|
IconGap = Dp(36)
|
|
Padding = Dp(8)
|
|
ButtonPadding = Dp(8)
|
|
)
|
|
|
|
// LineHeightScale is the baseline-to-baseline spacing multiplier for editor text.
|
|
// Fixed at 1.2 — independent of which glyphs appear on a given line.
|
|
const LineHeightScale = 1.2
|
|
|
|
// NOTE: EditorLayout is defined in internal/editor/state.go.
|
|
// This file contains layout constants only.
|