- Renderer computes word wrap via single LayoutString pass with
WrapHeuristically policy; glyphs drawn inline at FlagLineBreak
- Fixed line height (fontSize * 1.2), independent of glyph metrics
- Two-finger trackpad scroll via gesture.Scroll with vertical axis
- Display line feedback: renderer reports last glyph Y after each
Draw; logic uses it to clamp scroll offset so last line stops
at bottom of viewport with lineHeight/2 padding
- ScrollRange fix: {Min: -(1<<30), Max: 1<<30} ensures scroll
delta is consumed (empty range consumes nothing via clampSplit)
- Line counting fix: only FlagLineBreak increments count; buffer
flushes (32-glyph cap) draw but don't count
21 lines
584 B
Go
21 lines
584 B
Go
package ui
|
|
|
|
const (
|
|
// Standard dimensions in Dp
|
|
StatusBarLineHeight = Dp(24)
|
|
StatusBarFilenameLine = Dp(24)
|
|
StatusBarIconsLine = Dp(24)
|
|
BottomBarHeight = Dp(24)
|
|
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.
|