Commit Graph

115 Commits

Author SHA1 Message Date
1ee75c1cd1 Add op.Record/Stop macro wrapping to drawLineText (matches Gio's textView)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-09 11:30:41 -04:00
1acad99450 Fix filename rendering: split drawText into layout + drawLineText to avoid triple LayoutString calls
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-09 11:26:35 -04:00
fcd2fea870 Add drawTruncatedText for single-pass layout, measure, and render
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-09 11:14:46 -04:00
16719afb95 Use shaper.Shape() and shaper.Bitmaps() to draw glyphs directly (no double-shaping)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-09 11:13:06 -04:00
87992c3d99 Fix charWidths to match Gio's textView PxPerEm calculation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 23:37:10 -04:00
96b7c6dc97 Remove debug logging
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 20:48:23 -04:00
9c1e32c52a Fix filename truncation with proper scaling and ellipsis width measurement
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 20:47:08 -04:00
bbd16be9f2 Improve filename truncation to fit exact number of characters
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 20:21:35 -04:00
68d431408d Add 5px margin around StatusBar and BottomBar to avoid macOS corner clipping
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 18:53:05 -04:00
1ae02d57fd Fix BottomBar text positioning using op.Offset and remove debug logging
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 18:45:24 -04:00
aa422ab541 Fix element positioning in renderer
- Use gtx.Constraints.Min.X/Y instead of image.Point.ToSize()
- Properly position all elements at their region origins
- Fix StatusBar and BottomBar text positioning

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 17:26:49 -04:00
c452cbef6d Fix BottomBar element positioning in renderer
- drawBottomBar now uses element region to position text
- Clips to bottom bar region before drawing
- Positions cursor position, byte position, word wrap button correctly

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 17:12:21 -04:00
013416ee08 Move logic into separate internal/editor package
- Create internal/editor/state.go with State struct and EditorLayout
- Create internal/editor/logic.go with Logic struct and Run method
- Logic owns all state, provides channels for config, frames, input, results
- Main goroutine uses editor.NewLogic() and logic.Run()
- Proper separation for testing later

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 17:06:00 -04:00
869f0b13ac Implement initial editor mockup with StatusBar, BottomBar, window resize
Elements implemented:
- StatusBar (top bar with filename, action icons, conflict/search icons)
- BottomBar (bottom bar with cursor position, byte position, word wrap button)
- Button (interactive button element)
- AlphaIndex, SearchBar, Cursor, MergeHunk, Toast, Spacer (stubs)

Layout:
- EditorLayout function computes regions for StatusBar and BottomBar
- Filename truncation with ellipsis (mocked filename for testing)
- Mocked data: "very_long_filename...", "Ln 47, Col 12", "1024 / 50000"

Renderer:
- drawStatusBar: draws filename line + icon line
- drawBottomBar: draws cursor pos, byte pos, word wrap button
- drawButton: draws button text
- drawIconButton: draws icon buttons

Window resize:
- configChan setup in main.go
- ConfigEvent handling in event loop
- Layout recomputation on resize

Builds and runs successfully.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 16:22:46 -04:00
6720359360 Add Gioui scaffolding with Label and ListView rendering
- Element interface with Region() and Visible() methods
- Label and ListView element types with constructors
- Renderer that clips and draws elements in slice order
- Main app loop with Gioui window and frame events

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-07 17:45:56 -04:00