Collapse editor top bar to one row (back + filename)

The cut/copy/paste icons were dead placeholders (no handlers);
clipboard actions live in the floating selection menu, so the second
icon row is removed. The bar goes from two rows at 52dp to one row at
32dp, giving the editor 20dp more height.

- filename_test.go now finds the label by type (back icon precedes it)
- menu tracking tests updated for the new editorY (reg.Y = 10+32)
- scroll_cursor e2e simulation updated to match
- On-device verified: back button works, floating menu places above
  with room and flips below on the first lines, handles unaffected.
This commit is contained in:
gmp
2026-08-18 08:32:19 -04:00
parent dc35aa2e36
commit 2b7c9cd3eb
5 changed files with 43 additions and 24 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(52) = 62.
// Let's set pt.Y to 10 + 62 = 72.
localY := float64(pt.Y) - 62.0 + float64(editor.TheState.ScrollOffset)
// 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)
editor.SetCursorFromPoint(float64(pt.X), localY)
}
},
Data: ui.Point{X: 10, Y: 72},
Data: ui.Point{X: 10, Y: 52},
},
})