devtools

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package devtools provides a JetBrains-inspired DevTools design system theme.

DevTools is a dark-first, high-density, IDE-inspired design system modeled after the JetBrains Int UI (IntelliJ Platform New UI). It features compact spacing, 13px base typography, and a gray-scale palette with blue accents.

Creating a Theme

Create a theme from the default blue accent:

dark := devtools.NewDarkTheme()   // dark mode (primary)
light := devtools.NewTheme()      // light mode

Customize the accent color:

t := devtools.NewDarkTheme(devtools.WithAccentColor(widget.Hex(0x57965C)))

Painters

DevTools provides 20 painters covering all interactive and data-display widgets:

Use NewPainters to create all 20 painters at once:

dt := devtools.NewDarkTheme()
p := devtools.NewPainters(dt)
btn := button.New(button.PainterOpt(p.Button))
cb := checkbox.New(checkbox.PainterOpt(p.Checkbox))

Design Characteristics

  • Dark-first: optimized for long coding sessions
  • Compact spacing: 2/4/6/8/12/16/24px scale (smaller than M3 or Fluent)
  • 13px base font size (vs 14px in M3 and Fluent)
  • Small radii: 4px default component radius
  • Gray-scale palette: 14 neutral tones from #1E1F22 to #FFFFFF
  • Blue accent: #3574F0 (JetBrains default)
  • Dark header toolbar in both light and dark modes

Integration

Convert to the generic theme system with Theme.AsTheme:

generic := devtools.NewDarkTheme().AsTheme()

Index

Constants

This section is empty.

Variables

View Source
var DefaultAccentColor = widget.Hex(0x3574F0)

DefaultAccentColor is the JetBrains default blue accent (#3574F0).

Functions

This section is empty.

Types

type ButtonPainter

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

ButtonPainter renders buttons using DevTools design tokens. DevTools buttons are compact (28px height) with 4px corner radius, matching JetBrains IDE toolbar and dialog button styling.

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

func (ButtonPainter) PaintButton

func (p ButtonPainter) PaintButton(canvas widget.Canvas, state button.PaintState)

PaintButton renders a button according to DevTools design specifications.

type CheckboxPainter

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

CheckboxPainter renders checkboxes using DevTools design tokens. DevTools checkboxes are 16px with 2px corner radius, matching JetBrains IDE settings panel checkbox styling.

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

func (CheckboxPainter) PaintCheckbox

func (p CheckboxPainter) PaintCheckbox(canvas widget.Canvas, state checkbox.PaintState)

PaintCheckbox renders a checkbox according to DevTools design specifications.

type CollapsiblePainter

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

CollapsiblePainter renders collapsible section headers using DevTools design tokens. DevTools collapsibles use minimal styling: Surface background, a subtle chevron (Gray7 -> Gray12 on hover), 1px bottom border separator, and compact 8px padding, matching JetBrains IDE tool window section headers.

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

func (CollapsiblePainter) PaintHeader

func (p CollapsiblePainter) PaintHeader(canvas widget.Canvas, s collapsible.HeaderState)

PaintHeader renders a collapsible header according to DevTools specifications.

type ColorScheme

type ColorScheme struct {
	// Surface group: neutral backgrounds from darkest to lightest.
	Background         widget.Color // deepest background (editor area)
	Surface            widget.Color // panel/surface background
	SurfaceElevated    widget.Color // elevated surface, separator
	OnSurface          widget.Color // primary text/foreground
	OnSurfaceSecondary widget.Color // secondary text (dimmer)
	OnSurfaceDisabled  widget.Color // disabled/muted text

	// Accent/Primary: brand accent color and interactive states.
	Primary      widget.Color // primary accent (buttons, links, focus ring)
	PrimaryHover widget.Color // hover state
	PrimaryPress widget.Color // pressed state
	OnPrimary    widget.Color // text/icon on primary-colored surfaces

	// Selection: text/item selection background.
	Selection widget.Color

	// Borders: varying strengths for visual hierarchy.
	Border       widget.Color // default border (subtle)
	BorderStrong widget.Color // stronger border (emphasis)
	BorderFocus  widget.Color // focused element border (accent)

	// Input/Control: fills for interactive controls.
	InputBackground widget.Color // text input background
	ControlFill     widget.Color // default control fill
	ControlHover    widget.Color // control hover fill

	// Header/Toolbar: always dark in both light and dark modes.
	HeaderBackground widget.Color // dark toolbar background
	HeaderForeground widget.Color // toolbar text/icons

	// Semantic: status-indicating colors.
	Error           widget.Color // error border/icon
	ErrorBackground widget.Color // error surface tint
	Warning         widget.Color // warning icon
	Success         widget.Color // success icon
	Info            widget.Color // info (same as primary)

	// Overlay: backdrops and shadows.
	Backdrop widget.Color // modal backdrop
	Shadow   widget.Color // drop shadow

	// Scrollbar: thumb and track colors.
	ScrollbarThumb      widget.Color // scrollbar thumb at rest
	ScrollbarThumbHover widget.Color // scrollbar thumb hovered
	ScrollbarTrack      widget.Color // scrollbar track (typically transparent)
}

ColorScheme holds all DevTools design system color roles.

The scheme is organized around a neutral gray scale with a blue accent, following the JetBrains Int UI color system. Dark mode uses deep grays (#1E1F22 through #393B40) for surfaces with light text (#DFE1E5), while light mode inverts to white/light-gray surfaces with dark text.

Both modes share the same blue accent (#3574F0) and a dark header toolbar, matching JetBrains IDEs where the main toolbar is always dark.

func DarkScheme

func DarkScheme() ColorScheme

DarkScheme returns the DevTools dark color scheme.

This is the primary color scheme, optimized for long coding sessions. Colors are extracted from JetBrains Int UI dark theme (expUI/dark.theme.json).

func LightScheme

func LightScheme() ColorScheme

LightScheme returns the DevTools light color scheme.

Light mode uses white/light-gray surfaces with dark text. Notably, the header toolbar remains dark (#27282E), matching JetBrains IDE behavior where the main toolbar is always dark even in light themes.

type DataTablePainter

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

DataTablePainter renders data tables using DevTools design tokens. DevTools tables use striped rows (alternating Background/Surface), compact 24px row height, and a fixed header with SurfaceElevated background, matching JetBrains IDE table styling.

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

func (DataTablePainter) PaintCell

func (p DataTablePainter) PaintCell(canvas widget.Canvas, cps datatable.CellPaintState)

PaintCell draws a single data cell with DevTools on-surface text color.

func (DataTablePainter) PaintEmptyState

func (p DataTablePainter) PaintEmptyState(canvas widget.Canvas, bounds geometry.Rect)

PaintEmptyState draws a centered "No data" message.

func (DataTablePainter) PaintHeader

func (p DataTablePainter) PaintHeader(canvas widget.Canvas, bounds geometry.Rect, hps datatable.HeaderPaintState)

PaintHeader draws the table header background with DevTools elevated surface color.

func (DataTablePainter) PaintHeaderCell

func (p DataTablePainter) PaintHeaderCell(canvas widget.Canvas, bounds geometry.Rect, hcs datatable.HeaderCellPaintState)

PaintHeaderCell draws a column header with title and sort indicator.

func (DataTablePainter) PaintRow

func (p DataTablePainter) PaintRow(canvas widget.Canvas, rps datatable.RowPaintState)

PaintRow draws the row background with zebra striping and DevTools selection/hover highlights.

type DialogPainter

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

DialogPainter renders dialogs using DevTools design tokens. DevTools dialogs use Surface (#2B2D30) background with 8px radius, subtle shadow, 1px border, and 16px bold title — matching JetBrains IDE modal dialog styling.

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

func (DialogPainter) PaintDialog

func (p DialogPainter) PaintDialog(canvas widget.Canvas, ps dialog.PaintState)

PaintDialog renders a dialog according to DevTools design specifications.

type DockingPainter

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

DockingPainter renders docking zones and tab bars using DevTools design tokens. DevTools docking uses a tool window style: compact tab strip at bottom/side, 24px tabs with 12px font, Surface background for panels, SurfaceElevated for tab bars, and a Blue6 underline (2px) for the selected tab, matching JetBrains IDE tool window tab styling.

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

func (DockingPainter) PaintZoneBorder

func (p DockingPainter) PaintZoneBorder(canvas widget.Canvas, borderRect geometry.Rect, _ docking.Zone)

PaintZoneBorder renders the border between a zone and the center.

func (DockingPainter) PaintZoneTabs

func (p DockingPainter) PaintZoneTabs(canvas widget.Canvas, ps docking.ZoneTabsPaintState)

PaintZoneTabs renders the tab header bar using DevTools elevated surface and accent underline.

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

DropdownPainter renders dropdowns using DevTools design tokens. DevTools dropdowns use the same InputBackground as text fields, with SurfaceElevated popup menus and compact spacing.

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

func (p DropdownPainter) PaintMenu(canvas widget.Canvas, st *dropdown.MenuPaintState)

PaintMenu renders a dropdown menu according to DevTools design specifications.

func (p DropdownPainter) PaintTrigger(canvas widget.Canvas, st *dropdown.TriggerPaintState)

PaintTrigger renders a dropdown trigger according to DevTools design specifications.

type LineChartPainter

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

LineChartPainter renders line charts using DevTools design tokens. DevTools charts use a dark grid (Gray3 lines on Background), muted axes (Gray7 text, Gray3 axis lines), and 1.5px line width with Blue6 as the default series color, matching JetBrains IDE performance monitoring charts.

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

func (LineChartPainter) PaintChart

func (p LineChartPainter) PaintChart(canvas widget.Canvas, bounds geometry.Rect, state linechart.PaintState)

PaintChart renders a line chart according to DevTools specifications.

type ListViewPainter

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

ListViewPainter renders list view elements using DevTools design tokens. DevTools lists use wide full-row selection (Blue2 background), 24px row height, ControlHover highlight, and optional alternating rows (Background/Surface), matching JetBrains IDE file list styling.

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

func (ListViewPainter) PaintDivider

func (p ListViewPainter) PaintDivider(canvas widget.Canvas, ds listview.DividerState)

PaintDivider draws a DevTools-styled divider between list items.

func (ListViewPainter) PaintEmptyState

func (p ListViewPainter) PaintEmptyState(canvas widget.Canvas, bounds geometry.Rect)

PaintEmptyState draws a centered "No items" message.

func (ListViewPainter) PaintItemBackground

func (p ListViewPainter) PaintItemBackground(canvas widget.Canvas, ips listview.ItemPaintState)

PaintItemBackground draws the DevTools item background with hover state.

func (ListViewPainter) PaintSelection

func (p ListViewPainter) PaintSelection(canvas widget.Canvas, ips listview.ItemPaintState)

PaintSelection draws the DevTools selection highlight (full-row, no rounded corners).

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

MenuPainter renders menus and menu bars using DevTools design tokens. DevTools menus use a dark popup (SurfaceElevated #393B40) with 8px radius, 1px border, 28px item height, right-aligned keyboard shortcut text in Gray9, and a ControlHover (#43454A) highlight, matching JetBrains IDE menu styling.

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

func (p MenuPainter) PaintMenu(canvas widget.Canvas, st *menu.MenuPaintState)

PaintMenu renders a popup menu panel with DevTools elevated surface styling.

func (p MenuPainter) PaintMenuBar(canvas widget.Canvas, st *menu.MenuBarPaintState)

PaintMenuBar renders a menu bar with DevTools surface and border styling.

type Option

type Option func(*themeConfig)

Option configures a DevTools theme.

func WithAccentColor

func WithAccentColor(accent widget.Color) Option

WithAccentColor sets the accent color for the DevTools theme. If not provided, the default JetBrains Blue (#3574F0) is used.

The accent color is applied to Primary, PrimaryHover, PrimaryPress, BorderFocus, and Info roles. Hover and press variants are derived automatically.

type Painters

type Painters struct {
	Button      ButtonPainter
	Checkbox    CheckboxPainter
	Radio       RadioPainter
	TextField   TextFieldPainter
	Dropdown    DropdownPainter
	Slider      SliderPainter
	Dialog      DialogPainter
	Scrollbar   ScrollbarPainter
	TabView     TabViewPainter
	TreeView    TreeViewPainter
	DataTable   DataTablePainter
	Toolbar     ToolbarPainter
	Menu        MenuPainter
	Collapsible CollapsiblePainter
	Progress    ProgressPainter
	SplitView   SplitViewPainter
	Docking     DockingPainter
	Popover     PopoverPainter
	LineChart   LineChartPainter
	ListView    ListViewPainter
	TitleBar    TitleBarPainter
	Stripe      StripePainter
}

Painters provides all DevTools painters for convenient widget construction.

Instead of creating each painter individually:

btn := button.New(button.PainterOpt(devtools.ButtonPainter{Theme: dt}))
cb  := checkbox.New(checkbox.PainterOpt(devtools.CheckboxPainter{Theme: dt}))

Use NewPainters to create all painters at once:

p := devtools.NewPainters(dt)
btn := button.New(button.PainterOpt(p.Button))
cb  := checkbox.New(checkbox.PainterOpt(p.Checkbox))

func NewPainters

func NewPainters(t *Theme) Painters

NewPainters returns all 22 DevTools painters initialized with the given theme.

This is a convenience function that avoids repetitive Theme field assignment. All painters share the same *Theme pointer, so updating the theme via pointer mutation (e.g. *dt = *devtools.NewDarkTheme()) updates all painters at once.

type PopoverPainter

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

PopoverPainter renders popovers and tooltips using DevTools design tokens. DevTools popovers use SurfaceElevated (#393B40) background with 4px border radius, 1px Gray5 border, 8px padding, and a subtle shadow, matching JetBrains IDE popup and tooltip styling.

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

func (PopoverPainter) PaintPopover

func (p PopoverPainter) PaintPopover(canvas widget.Canvas, st *popover.PopoverPaintState)

PaintPopover renders a popover background with shadow according to DevTools specifications.

func (PopoverPainter) PaintTooltip

func (p PopoverPainter) PaintTooltip(canvas widget.Canvas, st *popover.TooltipPaintState)

PaintTooltip renders a tooltip background and text according to DevTools specifications.

type ProgressPainter

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

ProgressPainter renders progress indicators using DevTools design tokens. DevTools progress uses a 2px stroke: Gray3 track with Blue6 fill for both linear and circular indicators. The indeterminate mode uses an animated Blue6 arc, matching JetBrains IDE progress bar styling.

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

func (ProgressPainter) PaintProgress

func (p ProgressPainter) PaintProgress(canvas widget.Canvas, ps progress.PaintState)

PaintProgress renders a circular progress indicator according to DevTools specifications.

type RadioPainter

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

RadioPainter renders radio items using DevTools design tokens. DevTools radio buttons are 16px diameter circles with a 6px inner dot when selected, matching JetBrains IDE settings panel radio styling.

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

func (RadioPainter) PaintRadio

func (p RadioPainter) PaintRadio(canvas widget.Canvas, state radio.PaintState)

PaintRadio renders a radio item according to DevTools design specifications.

type ScrollbarPainter

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

ScrollbarPainter renders scrollbars using DevTools design tokens. DevTools scrollbars are thin (6px width, 4px idle expanding to 6px on hover) with transparent track — matching JetBrains IDE editor scrollbar styling.

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

func (ScrollbarPainter) PaintScrollbar

func (p ScrollbarPainter) PaintScrollbar(canvas widget.Canvas, ps scrollview.PaintState)

PaintScrollbar renders scrollbars according to DevTools design specifications.

type SliderPainter

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

SliderPainter renders sliders using DevTools design tokens. DevTools sliders have a 2px track and 12px thumb circle with Blue6 accent, matching JetBrains IDE preference panel slider styling.

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

func (SliderPainter) PaintSlider

func (p SliderPainter) PaintSlider(canvas widget.Canvas, ps slider.PaintState)

PaintSlider renders a slider according to DevTools design specifications.

type SplitViewPainter

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

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.

func (SplitViewPainter) PaintDivider

func (p SplitViewPainter) PaintDivider(canvas widget.Canvas, ps splitview.PaintState)

PaintDivider renders a split view divider according to DevTools specifications. DevTools dividers are minimal: a single line with no handle decoration.

type StripePainter

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

StripePainter renders stripe toolbars using DevTools design tokens. DevTools stripes use a Surface background with a 1px border, and SquareStripeButton styling: 40x40 buttons, 20px icons, 12px corner radius on hover, matching JetBrains IDE tool window strip styling.

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

func (StripePainter) PaintBackground

func (p StripePainter) PaintBackground(canvas widget.Canvas, bounds geometry.Rect)

PaintBackground renders the stripe background with a 1px border.

func (StripePainter) PaintButton

func (p StripePainter) PaintButton(canvas widget.Canvas, state stripe.ButtonPaintState)

PaintButton renders a stripe button with icon and optional label.

type TabViewPainter

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

TabViewPainter renders tab bars using DevTools design tokens. DevTools tabs use a flat underline indicator (2px Blue6) instead of pills, matching JetBrains IDE editor tab styling. Unselected tabs show Gray9 text, selected tabs show Gray12 text with a bold bottom accent line.

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

func (TabViewPainter) PaintTabBar

func (p TabViewPainter) PaintTabBar(canvas widget.Canvas, ps tabview.PaintState)

PaintTabBar renders a tab bar according to DevTools design specifications.

type TextFieldPainter

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

TextFieldPainter renders text fields using DevTools design tokens. DevTools text fields use a deep InputBackground (#1E1F22) with 4px radius, subtle Gray5 border, and Blue6 border on focus — matching JetBrains IDE input field styling.

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

func (TextFieldPainter) PaintTextField

func (p TextFieldPainter) PaintTextField(canvas widget.Canvas, st textfield.PaintState)

PaintTextField renders a text field according to DevTools design specifications.

type Theme

type Theme struct {
	// Colors holds the DevTools color scheme.
	Colors ColorScheme
	// contains filtered or unexported fields
}

Theme provides JetBrains-inspired DevTools design tokens.

A Theme contains the complete set of design tokens needed to style a DevTools application: colors (based on JetBrains Int UI gray scale with a customizable accent), and references to the shared theme.Theme for typography, spacing, shadows, and radii.

DevTools is dark-first: NewDarkTheme produces the primary theme, while NewTheme produces a light variant. Both themes feature a dark header toolbar, matching JetBrains IDE behavior.

Create a theme:

dark := devtools.NewDarkTheme()                                         // default dark
dark := devtools.NewDarkTheme(devtools.WithAccentColor(widget.Hex(0x57965C))) // green accent
light := devtools.NewTheme()                                           // default light

func NewDarkTheme

func NewDarkTheme(opts ...Option) *Theme

NewDarkTheme creates a DevTools dark theme.

This is the primary theme for DevTools, optimized for long sessions. By default it uses JetBrains Blue (#3574F0) as the accent color. Use WithAccentColor to customize.

func NewTheme

func NewTheme(opts ...Option) *Theme

NewTheme creates a DevTools light theme.

By default it uses JetBrains Blue (#3574F0) as the accent color. Use WithAccentColor to customize:

t := devtools.NewTheme(devtools.WithAccentColor(widget.Hex(0x57965C)))

func (*Theme) AsTheme

func (t *Theme) AsTheme() *theme.Theme

AsTheme converts the DevTools theme to a theme.Theme for use with the generic theme system. This maps DevTools color roles to the shared ColorPalette structure.

func (*Theme) IsDark

func (t *Theme) IsDark() bool

IsDark returns true if this theme uses a dark color scheme.

func (*Theme) OnSurface

func (t *Theme) OnSurface() widget.Color

OnSurface returns the default text/icon color for surface backgrounds.

This satisfies the widget.ThemeProvider interface.

type TitleBarPainter

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

TitleBarPainter renders title bars using DevTools design tokens.

DevTools title bars use a dark header background (#27282E) that is always dark even in light mode, matching JetBrains IDE behavior. Window control buttons are 46x40px with no border and Windows-style hover effects.

If Theme is nil, TitleBarPainter falls back to default DevTools dark colors.

func (TitleBarPainter) DrawBackground

func (p TitleBarPainter) DrawBackground(canvas widget.Canvas, bounds geometry.Rect, _ titlebar.BackgroundState)

DrawBackground renders the dark header background with a 1px bottom border.

func (TitleBarPainter) DrawControlButton

func (p TitleBarPainter) DrawControlButton(canvas widget.Canvas, bounds geometry.Rect, control titlebar.ControlType, state titlebar.ControlState)

DrawControlButton renders a window control button with Windows-style hover.

type ToolbarPainter

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

ToolbarPainter renders toolbars using DevTools design tokens. DevTools toolbars are flat and transparent with no background, featuring a subtle 1px bottom border (Gray3) and compact 28px square icon buttons with 4px radius, matching JetBrains IDE toolbar styling.

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

func (ToolbarPainter) PaintButtonItem

func (p ToolbarPainter) PaintButtonItem(canvas widget.Canvas, state toolbar.PaintButtonState)

PaintButtonItem renders a button item with icon and optional text label.

func (ToolbarPainter) PaintSeparator

func (p ToolbarPainter) PaintSeparator(canvas widget.Canvas, bounds geometry.Rect)

PaintSeparator renders a vertical separator line.

func (ToolbarPainter) PaintToolbar

func (p ToolbarPainter) PaintToolbar(canvas widget.Canvas, state toolbar.PaintToolbarState)

PaintToolbar renders the toolbar background with a subtle bottom border.

type TreeViewPainter

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

TreeViewPainter renders tree views using DevTools design tokens. DevTools tree views use full-row selection highlighting (Blue2 #2E436E), dotted indent guides, and compact 24px row height matching JetBrains IDE project tree styling.

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

func (TreeViewPainter) PaintConnectorLines

func (p TreeViewPainter) PaintConnectorLines(canvas widget.Canvas, s treeview.ConnectorState)

PaintConnectorLines draws L-shaped connector lines using DevTools border color.

func (TreeViewPainter) PaintEmptyState

func (p TreeViewPainter) PaintEmptyState(canvas widget.Canvas, bounds geometry.Rect)

PaintEmptyState draws a centered placeholder message.

func (TreeViewPainter) PaintExpandIcon

func (p TreeViewPainter) PaintExpandIcon(canvas widget.Canvas, s treeview.ExpandIconState)

PaintExpandIcon draws the expand/collapse indicator using DevTools secondary color.

func (TreeViewPainter) PaintLabel

func (p TreeViewPainter) PaintLabel(canvas widget.Canvas, s treeview.LabelState)

PaintLabel draws the node label text using DevTools on-surface color.

func (TreeViewPainter) PaintRowBackground

func (p TreeViewPainter) PaintRowBackground(canvas widget.Canvas, s treeview.RowPaintState)

PaintRowBackground draws the hover highlight for a tree row using DevTools colors.

func (TreeViewPainter) PaintSelection

func (p TreeViewPainter) PaintSelection(canvas widget.Canvas, s treeview.RowPaintState)

PaintSelection draws the selection highlight using DevTools selection color. DevTools uses full-row selection without rounded corners.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL