Make editor top/bottom bars full-width; keep margin on the text area

The 10dp margin used to surround the top and bottom bars, leaving a gap
around them. The bars now span the full screen width and sit flush with
the top/bottom edges (merging with the system UI); their inner content
(icons, labels) keeps the margin so it still aligns with the text area.
The editor text area and the browser file list keep the margin, as before,
and the editor gains the 20dp of height the bar margins used to occupy.

Tests: menu-geometry expectations shifted with editorRegion.Y 42 -> 32;
the below-placement clamp test now expects the window-top clamp; the
stable-end test anchors at line 3 (less headroom above line 2 now).
This commit is contained in:
gmp
2026-08-19 22:36:05 -04:00
parent eb725ee781
commit 49b60a79e8
3 changed files with 35 additions and 30 deletions
+4 -4
View File
@@ -85,13 +85,13 @@ func TestEditorClickToMoveCursorWithScroll(t *testing.T) {
Handler: func(data any) {
if pt, ok := data.(ui.Point); ok {
// Manually simulate the offset correction that EditorLayout does
// editorRegion.Y is margin(10) + statusBarH(32) = 42.
// Let's set pt.Y to 10 + 42 = 52.
localY := float64(pt.Y) - 42.0 + float64(editor.TheState.ScrollOffset)
// editorRegion.Y is the (margin-free) statusBarH(32) = 32.
// Let's set pt.Y to 10 + 32 = 42.
localY := float64(pt.Y) - 32.0 + float64(editor.TheState.ScrollOffset)
editor.SetCursorFromPoint(float64(pt.X), localY)
}
},
Data: ui.Point{X: 10, Y: 52},
Data: ui.Point{X: 10, Y: 42},
},
})