theme/devtools/splitview.go

Functions Structs

Functions

func PaintDivider

PaintDivider renders a split view divider according to DevTools specifications.

DevTools dividers are minimal: a single line with no handle decoration.

func (p SplitViewPainter) PaintDivider(canvas widget.Canvas, ps splitview.PaintState) {
	if ps.DividerRect.IsEmpty() {
		return
	}

	// Determine the color scheme to use.
	colors := ps.ColorScheme
	if colors == (splitview.DividerColorScheme{}) {
		colors = p.resolveColors()
	}

	// Resolve divider background color based on interaction state.
	bgColor := dtResolvedSplitDividerColor(ps, colors)

	// Draw divider as a simple line (no handle decoration in DevTools style).
	canvas.DrawRect(ps.DividerRect, bgColor)
}

Structs

type SplitViewPainter struct

SplitViewPainter renders split view dividers using DevTools design tokens.

DevTools split views use a minimal 1px divider line (Gray3) with a 3px

invisible drag zone (cursor change on hover), no shadow and no handle

decoration. On hover the divider brightens to Gray5, matching JetBrains

IDE panel divider styling.

 

If Theme is nil, SplitViewPainter falls back to the default DevTools dark palette.

type SplitViewPainter struct {
	Theme *Theme	// nil uses default DevTools dark fallback
}