/* Modified by VibeMake: brand the product chrome while preserving KiCad canvas semantics. */
/* KiCad-eeschema-like application chrome. Dark theme by default, matching
KiCad's dark mode. */
:root {
/* VibeMake product tokens. The editor's KiCad-compatible surface tokens
remain below; these values are used by the branded shell and fallback
states so the product chrome has one source of truth. */
--vibemake-bg: #0b0c0e;
--vibemake-bg-raised: #101215;
--vibemake-bg-panel: #15181c;
--vibemake-border: #242932;
--vibemake-fg: #f3f4f6;
--vibemake-fg-muted: #a6adb8;
--vibemake-accent: #c8ff3e;
--vibemake-accent-muted: #a9d936;
--vibemake-hover: rgb(200 255 62 / 11%);
--vibemake-mark-glow: rgb(200 255 62 / 20%);
--vibemake-focus-outline-width: 2px;
--vibemake-focus-outline-offset: 2px;
/* Data, not chrome: ente's `colors.fixed.danger.main`
(web/packages/base/components/utils/theme.ts), the one colour its account
surfaces paint a destructive action in. The account UI follows ente, not
KiCad, which has no account. */
--critical: #ea3f3f;
/* Data likewise: ente's `avatarTextColor` (avatar.ts), the initial on an
avatar disc. */
--avatar-fg: #fff;
/* Ours, not ente's (it has no signed-out avatar): the ring and glyph the account button wears
with no address to pick a colour from - a neutral grey, so it reads as "nobody" rather than
as a person's colour. [data] */
--avatar-guest-fg: #b4b7bc;
/* Data: Excalidraw's `--color-success-contrast` (packages/excalidraw/css/theme.scss). Its
encrypted shield is drawn in its primary purple; ours is the same shield (ui/EncryptedIcon.tsx)
in Excalidraw's own green instead, the colour that reads as "safe" on our dark chrome. */
--encrypted-icon-fg: #65bb6a;
/* GTK dark chrome greys, sampled off a live KiCad 10 project-manager window
on this machine (Ubuntu/Yaru dark). KiCad paints none of these itself -
they come from wxSystemSettings / the GTK theme - so a screenshot of the
real frame is the only ground truth there is for them.
Every one is neutral (r == g == b). The values these replaced carried a
blue tint (blue 4-6 above red), which is the thing that read as "not
KiCad" before a single widget had been compared. */
/* [px] All four asked of wxWidgets itself, which is the palette KiCad paints
with: `qa/probes/syscolour_probe.cpp` dumps every wxSYS_COLOUR_* on this
machine. Reading GTK's own named colours answers a DIFFERENT question — wx
maps the theme onto its enum with logic of its own, and the two disagree
(GTK's theme_bg_color is #2c2c2c while wxSYS_COLOUR_3DFACE, which is what a
wxAuiToolBar draws on, is #373737). KiCad asks wx, so we ask wx. */
--chrome-bg: #2c2c2c; /* [px] menu bar and status bar; a TOOLBAR is
--content-bg, which is wxSYS_COLOUR_3DFACE #373737 */
--chrome-bg2: #272727; /* [px] wxSYS_COLOUR_WINDOW / _LISTBOX / _APPWORKSPACE */
/* [px] wxSYS_COLOUR_WINDOWFRAME, qa/probes/syscolour_probe. The same value as 3DFACE under
this theme, but its own system colour: a modified Symbol Fields Table row. */
--sys-windowframe: #373737;
--chrome-border: #1e1e1e;
/* [px] wxSYS_COLOUR_BTNTEXT / _MENUTEXT / _CAPTIONTEXT, all #f7f7f7. NOT
white: wx has a separate _WINDOWTEXT / _LISTBOXTEXT at #ffffff, and this
token had collapsed the two.
It is visible, and in the pane Akshay has been looking at all night. A
histogram of the GerbView layers manager, ours beside a live one at the
same size: KiCad's layer names peak at 247 with the usual antialiasing
spread beneath, ours are 1,976 pixels of flat 255. Those names are
WX_ELLIPSIZED_STATIC_TEXT (`gerbview/widgets/layer_widget.cpp:358`) — a
widget label, which takes the widget foreground, not a listbox row. */
--chrome-fg: #f7f7f7;
/* [css] Secondary/subdued text on a ZiroEDA product surface (auth, nudges):
the foreground, stepped down but kept legible. Not a wx colour — KiCad has
no such surfaces — so it is chosen, not measured, and exists so those
rules cite one source instead of each inventing its own grey. */
--chrome-fg-muted: #c3c8d0;
/* [px] wxSYS_COLOUR_HIGHLIGHTTEXT — the text ON a selection. The same
#ffffff as --view-fg in this theme, and a separate token anyway: wx has
three foregrounds that happen to coincide here, and naming which one a rule
means is the difference between a value and a source. */
--selection-fg: #ffffff;
/* Its counterpart, split for the same reason --selection-fg is: a SELECTION
block and an ACTIVE control accent are two roles that happen to share
wxSYS_COLOUR_HIGHLIGHT's value here. [px] a selected row in a live
pl_editor Design Inspector measures rgb(233,84,32) = #e95420, which is what
the syscolour probe reports for HIGHLIGHT. */
--selection-bg: #e95420;
/* [px] wxSYS_COLOUR_WINDOWTEXT / _LISTBOXTEXT, the text INSIDE a view rather
than on a widget: an entry, a listbox, a grid cell. GTK agrees — its
`entry` and `treeview` report rgb(255,255,255) where every button, label,
menu item and toolbar reports rgb(247,247,247). */
--view-fg: #ffffff;
/* Hover, and it is an OVERLAY rather than a colour.
[px] `wxSYS_COLOUR_MENUHILIGHT` is rgb(247, 247, 247) at alpha **38/255**
(`qa/probes/syscolour_probe.cpp`), and a Gtk.OffscreenWindow rendering a
real menu item prelit confirms what that composites to: rgb(74, 74, 74) on
the rgb(44, 44, 44) menu bar, which is 44 + (247-44) * 38/255 = 74.2.
That is why a flat value cannot be right. This token is used on 31 hover
surfaces whose backgrounds are #2c2c2c, #373737 and #272727, and an
overlay lands on each of them the way GTK's does while one grey can only
match one of the three. Ours was #3a3a3a = 58 everywhere: sixteen units too
dark on the menu bar, and further out on the lighter toolbars.
Toolbar BUTTONS are not this. `BITMAP_BUTTON::OnPaint` tints them with
`wxSYS_COLOUR_HIGHLIGHT.ChangeLightness( n )` — the accent, not a grey —
and they have their own --accent-fill-* tokens below. */
--chrome-hover: rgb(247 247 247 / 14.9%);
--chrome-active: #e95420;
--chrome-active-border: #e95420;
/* `BITMAP_BUTTON::OnPaint` (bitmap_button.cpp:270-310) paints every tool state
as `wxSYS_COLOUR_HIGHLIGHT.ChangeLightness( n )` — the accent with every
channel scaled to n% — outlined 1px in the highlight itself. In dark mode:
pressed 20
hover 40
hover + checked 50
checked 40
So hover and checked share a fill, and a checked tool goes LIGHTER under
the pointer rather than darker. [px] a checked tool samples rgb(93,33,12),
which is the 40 level. The launcher hover is the same wx rule and the same
token. */
/* `appearance.toolbar_icon_size`, common_settings.cpp:115-116 — default 24,
range 16..64. THE setting: KiCad stores this one number and derives every
toolbar metric from it, which is why changing it in Preferences resizes the
whole application coherently. We had six literals instead (22px icons in
26px buttons here, 28px there), so nothing moved together and none of them
were KiCad's numbers.
`ACTION_TOOLBAR::AddAction` (action_toolbar.cpp:141):
paddingDip = ( ToDIP( m_buttonSize.GetWidth() ) - iconSize ) / 2
so the padding is not a value at all — it is the half-difference between
the button and the icon. [px] measured on a hovered "Switch to PCB Editor":
KiCad 30px button around a 24px icon = 3px each side; ours was a 24px
button around a 22px icon = 1px. */
--toolbar-icon-size: 24px;
--toolbar-button-pad: 3px;
--toolbar-button-size: calc(var(--toolbar-icon-size) + 2 * var(--toolbar-button-pad));
/* [px] the wxAuiToolBar separator, from the same capture: #5f5f5f, and it
is LIGHTER than the toolbar face rather than darker. */
--toolbar-separator: #5f5f5f;
/* [px] see .ze-tb-textinfo — wx's default for an empty read-only wxTextCtrl,
from qa/probes/gerbview_toolbar_probe.cpp. */
--gbr-textinfo-width: 98px;
--accent-fill-pressed: #2f1106;
--accent-fill-checked: #5d220d;
--accent-fill-hover-checked: #742a10;
--panel-bg: #272727; /* docked pane body (project tree, properties...) */
--panel-header: #2e2e2e; /* wxAUI pane caption bar */
/* wxAUI's dock sash, the bar between a docked pane and the canvas. KiCad
never states either value: it adds the pane with EDA_PANE().Palette() and
wxAUI draws the sash from wxAuiDefaultDockArt. Measured by asking that
dock art on this machine (qa/probes/aui_sash_probe.cpp):
GetMetric( wxAUI_DOCKART_SASH_SIZE ) -> 5
GetColour( wxAUI_DOCKART_SASH_COLOUR ) -> rgb(55, 55, 55)
The colour is wxSYS_COLOUR_3DFACE, which is why it equals --content-bg;
they are the same system colour reached for two different reasons, not one
value with two names.
Not to be confused with --splitter-sash below: that is a wxSplitterWindow
sash inside a dialog, a different widget that GTK draws differently. */
--aui-sash: #373737;
--aui-sash-size: 5px;
/* The other half of the same dock art: the border wxAUI draws around a pane
that asked for one. `EDA_PANE().Canvas()` is the one that always does
(`PaneBorder( true )`, eda_base_frame.h:975-981), which is why every
editor's canvas is fenced off from the toolbars and panes around it while
two docked toolbars butt together with no line at all.
Same probe, same dock art (qa/probes/aui_sash_probe.cpp):
GetMetric( wxAUI_DOCKART_PANE_BORDER_SIZE ) -> 1
GetColour( wxAUI_DOCKART_BORDER_COLOUR ) -> rgb(41, 41, 41)
This was `--toolbar-dock-edge`, named for the one place we had noticed it:
the line under the top toolbar block. It is not a property of toolbars —
it is the canvas pane's own border, and the toolbars merely happen to be
what sits against three of its four sides. [px] pcbnew 1920x1200: #292929
down x=405 and x=1631 beside the two vertical toolbars, and ALSO along
y=1140 under the canvas — where there is no toolbar at all, and where we
had a full-width --chrome-border rule instead. */
--aui-pane-border: #292929;
--aui-pane-border-size: 1px;
/* That other sash. PANEL_SYMBOL_CHOOSER builds its panes with a
wxSplitterWindow pair (eeschema/widgets/panel_symbol_chooser.cpp:193-210,
wxSP_LIVE_UPDATE | wxSP_NOBORDER | wxSP_3DSASH) and names neither number.
[px] `qa/probes/chooser_shell_probe.cpp` builds that splitter with those
styles and asks it: `GetSashSize()` is 5, and the mapped window read back
off the display server paints the strip #181818. Not --aui-sash (#373737),
and not --chrome-border (#1e1e1e), which is what .ze-sash used to say. */
--splitter-sash: #181818;
--splitter-sash-size: 5px;
/* A wxDataViewCtrl's column header. GTK draws it as a button inside the
treeview, and Yaru's rule for it is
treeview.view header button { color: #8f8f8f; background-color: #272727;
font-weight: bold; padding: 0 6px;
border-style: none solid solid none; border-color: #2c2c2c }
so only the foreground is a value we do not already hold: the face is
--chrome-bg2 (wxSYS_COLOUR_LISTBOX) and the 1 px rule under and beside it
is --chrome-bg, the window background showing through. [px] the rendered
header measures #8f8f8f on #272727 and is 24 px tall over a 1 px #2c2c2c
rule (`qa/probes/chooser_shell_probe.cpp`). It is NOT wxSYS_COLOUR_GRAYTEXT
(#929292); those two are close and different. */
--libtree-header-fg: #8f8f8f;
--libtree-header-height: 24px;
/* The colour GTK recolours a symbolic icon to inside a text entry - the
magnifier and the clear button a wxSearchCtrl gets from the icon theme.
Yaru: `entry image { color: #cdcdcd }`, `:hover { color: #F7F7F7 }`,
`:active { color: #E95420 }`, so hover is --chrome-fg and pressed is the
accent and only the resting colour is new. [px] the rendered icons measure
#cdcdcd (`qa/probes/chooser_shell_probe.cpp`), which is exactly
mix(#f7f7f7, #272727, 80%). */
--entry-icon-fg: #cdcdcd;
/* A GtkSeparator - what a wxStaticLine is. Yaru draws it as an overlay, not a
grey: `separator { background: rgba(0, 0, 0, 0.1); min-width: 1px }`. wx
agrees: a real wxStaticLine reports its background as #0000001A, and 26/255
is that same 10.2%. So it darkens whatever it is drawn on, and a flat grey
could only ever be right on one surface. */
--gtk-separator: rgb(0 0 0 / 10%);
/* How far a wxRESIZE_BORDER grip reaches across a dialog's edge. The bands are invisible
(GTK draws no grip) and this is a hit-area reach chosen for the pointer, not a measured
GTK metric; one token so no grip rule states a number of its own. */
--resize-grip: 6px;
/* wxSYS_COLOUR_HOTLIGHT — a link, wherever KiCad draws one.
`HTML_WINDOW::SetPage` (common/widgets/html_window.cpp:56-66) wraps every
page it is handed in `
`,
so the details pane's text, face and links are three system colours rather
than a stylesheet. [px] qa/probes/chooser_shell_probe.cpp.
A `wxHyperlinkCtrl` is the same colour and not a second one: wxGTK backs it
with a real GtkLinkButton, and asking that widget for its link-state
foreground under this theme gives rgb(240,135,98) — the same value, which
is why this is one token and not two. It is Yaru's warm accent, NOT blue;
the `#4a9eff` a couple of panels invented is a colour no GTK theme on this
desktop produces. */
--link-fg: #f08762;
/* The same widget's `Gtk.StateFlags.VISITED` foreground, rgb(236,109,64). */
--link-visited-fg: #ec6d40;
/* EDA_MSG_PANEL's background, wxSYS_COLOUR_BTNFACE, measured by
qa/probes/aui_sash_probe.cpp. See .ze-msgpanel. */
--msgpanel-bg: #373737;
/* wxGrid paints three surfaces from three different system colours, and the
difference between them is the whole reason a grid reads as a grid:
SetLabelBackgroundColour -> wxSYS_COLOUR_BTNFACE the row and column
labels, LIGHTER
cell default background -> wxSYS_COLOUR_WINDOW the data cells
SetGridLineColour -> wxSYS_COLOUR_BTNSHADOW the rules between
[px] measured off a live pl_editor Design Inspector beside ours: labels
rgb(55,55,55), cells rgb(39,39,39), lines rgb(24,24,24) — which are exactly
the BTNFACE / WINDOW / BTNSHADOW our syscolour probe reports. Ours had the
header DARKER than its cells (39 against 44) and both wrong, which is what
Akshay saw as "the boxes are more whiter" in KiCad. */
--grid-label-bg: #373737;
--grid-cell-bg: #272727;
/* A covered table cell (DIALOG_TABLE_PROPERTIES::TransferDataToWindow):
wxSYS_COLOUR_BTNFACE, .ChangeLightness( 140 ) on a dark theme. [data] wx's
ChangeLightness blends toward white with alpha 1 - 0.4: 255 + 0.6 * (55 - 255)
= 135 per channel, on the measured BTNFACE #373737 (--grid-label-bg). */
--grid-covered-bg: #878787;
/* The OTHER selection fill. `wxGridCellRenderer::Draw` chooses between two:
`GetSelectionBackground()` when `grid.HasFocus()`, and
`wxSYS_COLOUR_BTNSHADOW` when it does not — and a grid does not have focus
for the whole time one of its cells is being EDITED, because the editor
control holds it and `wxWindow::HasFocus()` on the grid is then false.
[px] `qa/probes/grid_edit_fill_probe.cpp` runs that renderer into a bitmap
and reads the pixel back: #e95420 focused, #181818 with the editor open,
#272727 unselected. A live footprint editor agrees — the row being edited
on Preferences > Footprint Editor > User Layer Names measures rgb(24,24,24)
in its untouched column.
Not `--ctl-border`, which happens to hold the same #181818: that one is
Yaru's $borders_color, and the two are only equal by coincidence. */
--grid-selection-idle-bg: #181818;
/* wxGrid's OWN line colour, which is not the control border. `wxGrid`
defaults `SetGridLineColour` to the same BTNFACE the labels take, so the
lines read as part of the header band rather than as dark rules -- the
same reason a wxPropertyGrid category reads as an unbroken band (see
widgets/properties_panel.css). This said #181818, which is --ctl-border's
value: copied from the control border rather than asked of wx, and never
pinned by anything. `qa/probes/eseries_grid_probe.cpp` builds a real
wxGrid and asks it -- `wxGrid default line colour rgb(55, 55, 55)`, the
same call KiCad makes, on this machine, with this theme. */
--grid-line: #373737;
/* EDA_MSG_PANEL lays itself out in units of one 'W':
m_fontSize = GetTextExtent( "W" ) msgpanel.cpp:72
if( m_last_x == 0 ) m_last_x = m_fontSize.x; :143 (first item)
text.Append( ' ', item.GetPadding() ); :140 (the PAD)
m_last_x += GetTextExtent( text ).x; :151
m_last_x += m_fontSize.x; :154 (gap)
The left inset really is one 'W'. The GAP is not: the padding spaces are
appended to the text BEFORE it is measured, so what separates two cells is
`item.GetPadding()` spaces plus one 'W', not one 'W' alone. We had read
:151 as measuring the bare text and dropped :140 entirely, which drew every
message panel in the app about 18px per cell tighter than KiCad's.
[px] wx measures, in Ubuntu Sans 11 on this desktop
(qa/probes/msgpanel_probe.cpp): "W" 14 x 18, a space 3, six spaces 18. The
18 of the height is already --ui-line-height. Corroborated against a real
GerbView capture: the probe puts the seven GERBER_FILE_IMAGE::
DisplayImageInfo cells at x = 14, 96, 216, 304, 389, 477, 564 and the
capture has them at 80, 163, 283, 371, 455, 543, 630 - a constant 66/67px
client origin across all seven. */
--msgpanel-gutter: 14px;
/* GetTextExtent( " " ).x, the unit MSG_PANEL_ITEM::m_Padding counts in
(msgpanel.cpp:140). Separate from the gutter because the padding is
PER-ITEM - MSG_PANEL_DEFAULT_PAD is 6 (msgpanel.h:41) but the symbol
editor passes 8 (symbol_editor.cpp:1749-1767) - so it multiplies. */
--msgpanel-space: 3px;
/* The frame background a docked canvas or notebook sits on. *Lighter* than
the panes - which is the relationship KiCad has, and which we had
inverted: our tree pane was lighter than the launcher beside it. */
--content-bg: #373737;
/* wxSYS_DEFAULT_GUI_FONT, the size every KiCad frame draws its menus, trees,
labels and status text at. 11pt on a stock GTK desktop; CSS pt is defined
against 96 dpi, so this is exactly the 14.67 px the real app uses.
Applied per-widget as we port each one rather than to the whole shell,
which still runs at the 13 px base it was built around.
[gtk] `Gtk.Settings.get_default().get_property('gtk-font-name')` on this
machine = "Ubuntu Sans 11", and a GtkLabel built with it reports
`get_preferred_width() == 142` for "Black & White Picture" - the exact
width this file already recorded for the real KiCad frame. Note that
`gsettings get org.gnome.desktop.interface font-name` answers
"Cantarell 11" and is MISLEADING: Ubuntu ships
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override:62,100,
which overrides the family to Ubuntu Sans in the `ubuntu` profile, and
Cantarell is not installed here at all (`fc-list | grep -c -i cantarell`
= 0), so anything that really asks for it falls back to Noto Sans, a
visibly wider face. Earlier comments in this file named Cantarell; the
SIZE they recorded (11) was right, and it is the size these tokens key
on. */
--ui-font-size: 11pt;
/* The line box of --ui-font-size, which is `GetTextExtent( "pdI" ).y` in wx:
the string is chosen for its ascender, descender and cap height, so the
extent is the whole line rather than a glyph. MEASURED on this machine by
`qa/probes/libtree_rowheight_probe.cpp`, which asks a wxPanel carrying the
default GUI font: Ubuntu Sans 11pt gives 18 px, and wx's GetCharHeight
agrees. It is a token rather than a literal because it is the second half
of LIB_TREE's row-height formula below, and a tree that restated it would
drift from the font the moment the theme changed. */
--ui-text-height: 18px;
/* LIB_TREE's tree rows, which do NOT take GTK's own row height: it overrides
them (common/widgets/lib_tree.cpp:177-180) with
`FromDIP( 6 ) + GetTextExtent( "pdI" ).y`, because "the GTK renderer seems
to calculate row height incorrectly sometimes". 6 + 18 = 24 px here, and
the 6 is split evenly as the row's vertical padding. */
--libtree-row-pad: 3px;
/* But 24 is what wx ASKS FOR, not what gets drawn. GtkTreeView adds its
"vertical-separator" style property BETWEEN rows, so the pitch on screen is
24 + 2 = 26. Measured by `qa/probes/libtree_rowheight_probe.cpp`, which
builds a real wxDataViewCtrl, calls SetRowHeight(24) on it and then asks
GTK for the separator it will insert. Corroborated independently against a
live chooser: 17 rows spanning 416 px is 26.0 per row.
It is INSIDE the highlighted band, not between two of them. [px]
`qa/probes/libtree_selection_probe.cpp` asks the realized GtkTreeView for
both rectangles - `background_area = 26` around `cell_area = 24`, offset by
1 - and reads a selected row back off the rendered window as 26 px of solid
highlight. So the separator is 1 px of the row's own padding at each end,
and this token is halved into `.ze-libtree-row`'s padding rather than being
the list's `row-gap`. The earlier reading of it as a gap was taken from
`gtk_widget_style_get( "vertical-separator" )` alone, which says how big it
is and not which box owns it. */
--libtree-row-sep: 2px;
/* The details pane is an HTML_WINDOW, and wxHtml adds its own leading between
lines: NOT the font's 18 px line box but 21. Measured by
`qa/probes/libtree_details_probe.cpp`, which renders the real template from
generate_alias_info.cpp:28-46 and reads back where each line box lands
(tops at 10, 31, 52, 73 - four lines, three 21 px steps). A browser's
default `normal` line-height gives about 17.6 px for this font, which is
what made the description read tighter than KiCad's. */
--libtree-details-line: 21px;
/* The only two OTHER chrome text sizes KiCad has - and it derives both from
the one above rather than declaring either.
`getGUIFont( win, aRelativeSize )` (common/widgets/ui_common.cpp:109-129)
adds a signed point delta to the window's own font, and exactly five
accessors call it:
KIUI::GetControlFont ( 0) ui_common.cpp:168-171 11pt
KIUI::GetStatusFont ( 0 off macOS) ui_common.cpp:132-141 11pt
KIUI::GetDockedPaneFont ( 0 off macOS) ui_common.cpp:144-153 11pt
KIUI::GetInfoFont (-1) ui_common.cpp:156-159 10pt
KIUI::GetSmallInfoFont (-2) ui_common.cpp:162-165 9pt
So the whole application has THREE chrome text sizes on Linux, not eight,
and the smaller two are a fixed relative step off the first. That is the
parity rule: a hint under a control is 10pt because GetInfoFont says -1,
never because 12.5px looked about right. A fourth value is invented.
GetInfoFont's callers are the italic help labels beside a control
(dialog_junction_props.cpp:43-44, panel_setup_mask_and_paste.cpp:43,
properties_frame.cpp:97), the Appearance controls
(appearance_controls.cpp:446,623) and the selection filters
(panel_selection_filter.cpp:36, panel_sch_selection_filter.cpp:37).
GetSmallInfoFont's are the second-tier hints
(panel_edit_options.cpp:47-48, dialog_sheet_properties.cpp:103-104,
dialog_symbol_properties.cpp:381).
Declared here and consumed as each launcher's parity work reaches it -
nothing reads them yet, so adding them moves no pixel. */
--ui-font-size-info: 10pt;
--ui-font-size-small: 9pt;
/* KiCad's Appearance list background, and it is DERIVED, not chosen:
m_layerPanelColour = m_panelLayers->GetBackgroundColour().ChangeLightness( 110 )
(pcbnew/widgets/appearance_controls.cpp:433, :1240) -- the panel's own
background, lightened, so the layer/object rows read as a list against the
chrome. `qa/probes/layer_panel_colour_probe.cpp` builds that panel and asks
wx: background #373737, ChangeLightness( 110 ) -> #4b4b4b.
This said #3a3d42, which cannot be right by construction: ChangeLightness
on a NEUTRAL grey stays neutral, and #3a3d42 is blue-tinted (58, 61, 66).
It was our own chrome tint, not KiCad's derivation. */
--panel-list-bg: #4b4b4b;
/* The ACTIVE layer's row. `APPEARANCE_CONTROLS::OnLayerChanged` repaints
every row `m_layerPanelColour` and then lightens the current one by adding
15 to each channel below 240 (appearance_controls.cpp:1273-1288) — so from
--panel-list-bg's 75 it is exactly 90, #5a5a5a. It is NOT the selection
accent: KiCad marks the active layer with a slightly lighter grey plus an
INDICATOR_ICON, and ours painted the row Yaru orange, which is the one
colour on that panel that means "selected item" everywhere else. */
--panel-list-row-active: #5a5a5a;
/* Filled portion of an opacity slider, left of the thumb. */
--slider-fill: #e8912b;
/* Height of one menu row, and the size everything inside it is derived from.
One number so the whole app's menus stay one density — change it here and
the icons, the checkmark column and the flyout marker follow.
26px is measured: the highlight rectangle GTK paints under the hovered row
of a real KiCad menu is 26 pixels tall, screenshotted beside ours. It was
22, which is why our menus read as a size smaller than the desktop app's. */
--menu-row: 26px;
/* Status-bar height. A property of the FRAME, because KiCad has two kinds of
status bar and they do not measure the same:
23px KISTATUSBAR (common/widgets/kistatusbar.cpp). Every EDA_DRAW_FRAME
gets one (eda_draw_frame.cpp:136) and so does KICAD_MANAGER_FRAME
(kicad_manager_frame.cpp:176). MEASURED on the project manager at
1920x1200, column x=900: content (55,55,55) to y=1175, a (41,41,41)
rule at y=1176, bar (44,44,44) y=1177..1199 -> 23px.
33px a plain wxStatusBar. Only two frames in the whole of KiCad get one,
because only EDA_DRAW_FRAME and KICAD_MANAGER_FRAME override
OnCreateStatusBar: BITMAP2CMP_FRAME (bitmap2cmp_frame.cpp:181) and
EDA_3D_VIEWER_FRAME (eda_3d_viewer_frame.cpp:118). MEASURED on
bitmap2component at 1920x1200, column x=600: content (39,39,39) to
y=1165, a (24,24,24) rule at y=1166, bar (44,44,44) y=1167..1199
-> 33px.
Do NOT "unify" these. The obvious explanations are all disproved: a probe
built against this machine's own wx 3.2.4/GTK3 (see the PR) gives an
IDENTICAL height for wxSTB_SIZEGRIP vs none, 1 field vs 8, wxSB_FLAT vs
wxSB_NORMAL, and SetFont vs not - and KIUI::GetStatusFont is a no-op off
macOS anyway (getGUIFont( win, 0 ) returns the window's own font, and
apply_icon_scale_to_fonts is off here). The one difference that survives is
the widget class itself, so that is what this token keys on. */
--statusbar-height: 23px;
/* ---------------------------------------------------------------------
GTK control theme.
KiCad declares none of its control metrics. wxWidgets asks GTK, GTK
answers out of the active desktop theme, and that single answer is why
every KiCad launcher looks exactly like every other one. We had been
re-inventing a number per editor instead — ~193 hardcoded font sizes
across eight distinct values, against 15 uses of --ui-font-size — so
this block is our equivalent of the theme: one value per property,
consumed by name, never copied.
Two ground truths, marked per value:
[css] the theme stylesheet itself. Yaru-dark ships it inside a
gresource bundle; extract with
gresource extract \
/usr/share/themes/Yaru-dark/gtk-3.0/gtk.gresource \
/com/ubuntu/themes/Yaru-dark/3.0/gtk-dark.css
[px] a pixel sampled off a live, focused bitmap2component window
(1920x1200, unscaled, Xft.dpi 96, gtk-font-name Ubuntu Sans 11 - see
--ui-font-size above for why it is not Cantarell).
Where the two agree the value is certain; where they differ the sampled
one wins, because it is what the user sees, and the comment says so.
--------------------------------------------------------------------- */
/* Chrome's system-ui on Linux resolves to GTK's gtk-font-name, which is the
same family wxSYS_DEFAULT_GUI_FONT hands KiCad. That used to rest on a
ratio argument; it is now measured directly. Rendering "Black & White
Picture" at 11pt in a HEADED Chrome on this desktop:
system-ui 140.78 px "Ubuntu Sans" 140.78 px
"Noto Sans" 146.64 px Cantarell 133.64 px (not installed)
i.e. system-ui IS Ubuntu Sans, byte for byte, and Ubuntu Sans is what
gtk-font-name names. GTK's own Pango layout of the same string is 142 px,
0.9 % apart - hinting, not a different face.
Do not check this in headless Chrome: with no GTK to ask, `--headless=new`
resolves system-ui to Noto Sans (146.64 px) and the comparison inverts. */
--ui-font-family: system-ui, sans-serif;
/* The natural height of one GtkLabel at --ui-font-size, i.e. Pango's logical
extent = ascent + descent. [gtk] Pango's metrics for Ubuntu Sans 11 at
96 dpi are ascent 14 + descent 4 = 18, and a live GtkLabel agrees exactly:
`get_preferred_height()` returns (18, 18). [px] the Image Information
grid's rows repeat every 23 px and wxFormBuilder gives each a 5 px bottom
border (bitmap2cmp_panel_base.cpp:47-88), so the label itself is 18. */
--ui-line-height: 18px;
/* The window-manager title bar. KiCad's client area draws no title at all —
`SetTitle()` (bitmap2cmp_frame.cpp:352-365) hands the string to the WM,
which paints it above the menu bar in its own font. A browser tab has no WM
title bar, so we carry it in-page; carrying it in the MENU BAR row was the
part that was wrong, because that row has no title in KiCad and the string
had to shrink to 8pt to fit (measured 91 px wide against KiCad's 130 px).
[px] measured on a real frame at 1920x1200, column x=700: title strip
y=32..67 = 36 px of rgb(34,34,34), a 1 px rgb(0,0,0) rule at y=68, then the
25 px rgb(44,44,44) menu bar. Title ink sampled rgb(247,247,247).
[css] the effective WM title font is "Ubuntu Sans Bold 11" - 11pt at
96 dpi = 14.667 px, weight 700. `gsettings get
org.gnome.desktop.wm.preferences titlebar-font` answers "Cantarell
Bold 11", which is the upstream GNOME default and NOT what runs here:
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override:135 sets
it to Ubuntu Sans Bold 11 in the `ubuntu` profile. Same size, same
weight, different family - the numbers below are unaffected. */
/* DELIBERATE DIVERGENCE, Akshay's call 2026-08-19: the real strip is 36 px,
but that is a window-manager decoration and the browser already spends
~140 px on its own chrome before our frame starts. Ours is sized to the
text plus a little breathing room: 18 px of label (the natural
ascent+descent for this font, the same as --ui-line-height at the same
11pt) with 3 px above and below, so 24 px — saving 12 px per frame. Sized
to the text alone at 18 px it read as cramped. The font, colours and the
rule below are still KiCad's; only the strip's height is ours. Do not
"restore" 36 px as a parity fix. */
--titlebar-height: 24px;
--titlebar-bg: #222222;
--titlebar-fg: #f7f7f7;
--titlebar-font-size: 14.667px;
--titlebar-font-weight: 700;
--titlebar-rule: #000000;
/* [css] `decoration { border-radius: 12px 12px 0 0 }` (Yaru-dark gtk.css:4504).
A GNOME window is rounded on its TOP two corners only; the bottom two are
square. This is the window frame, so it is NOT --ctl-radius (6px), which is
a button/entry value — ours used that on all four corners. */
--window-radius: 12px;
/* The drop shadow every popup casts -- a menu, a flyout, the share panel.
GTK draws one shadow for popup windows, from the theme, so this is one
value in one place rather than a number each popup happens to carry. It
was written out three times, and the share panel was about to be a
fourth. */
--popup-shadow: 0 6px 18px rgb(0 0 0 / 45%);
/* The ink KiCad writes for a line a user has to notice.
`WX_HTML_REPORT_PANEL::generateHtml` emits an RPT_SEVERITY_ERROR line's tag
in it, and it is the one colour upstream STATES for a message rather than
leaving to the dialog's foreground. It was written out twice and the theme
folder's "could not write" line was about to be a third. */
--error-ink: #f04040;
/* [css] `decoration { box-shadow: 0 3px 9px 1px rgba(0,0,0,0.5),
0 0 0 1px rgba(0,0,0,0.75) }` (:4507) — a tight drop shadow plus a 1px
hairline ring, not the deep soft shadow we had invented. */
--window-shadow: 0 3px 9px 1px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.75);
/* The border colour of every framed thing: static box, button, text field,
checkbox, radio. [css] `frame > border`, `button`, `entry`, `check`,
`radio` all resolve to Yaru's $borders_color. [px] agrees exactly.
NOTE this is NOT the same value as --chrome-border (#1e1e1e) above, which
was sampled off the project manager; in the GTK theme there is only one
border colour and it is this one. Flagged rather than unified, because
changing --chrome-border moves every launcher at once. */
--ctl-border: #181818;
/* [px] wxGauge, measured off a GtkProgressBar GTK rendered itself
(qa/probes/progress_bar_probe.py). Yaru's gtk.css said a #222222 trough in a
#181818 border; GTK draws #4B4B4B and no border, and the fill takes all 4
rows. The fill is the accent every other control already holds as
--chrome-active. */
--gauge-trough: #4b4b4b;
--gauge-fill: #e95420;
--gauge-fill-edge: #eb6637;
/* [css] button, entry: border-radius: 6px. Our controls used 2-3px. */
--ctl-radius: 6px;
/* Outer height of a button, a text field and a combo — all three are the
same, which is why a KiCad row of mixed controls lines up.
[css] button { min-height: 24px; padding: 4px 9px; border: 1px } = 34
entry { min-height: 32px; border: 1px } = 34
[px] 34 for the Load Source Image button and for the Size fields. */
--ctl-height: 34px;
/* Natural width of a wxTextCtrl nobody has sized — GTK's own `width-chars`
default through wx, so it is theme and font derived exactly like the
height above, and it is why a dialog full of unsized entries has every
field the same width. A wxFormBuilder file that wants something else says
`SetMinSize`; where it says nothing, this is the answer.
[px] `wxTextCtrl( panel, wxID_ANY ).GetBestSize().x` reports 98 on this
machine with this theme (`qa/probes/constraints_layout_probe.cpp`). */
--ctl-entry-width: 98px;
/* The same for a wxComboBox, its drop-down button included: the entry part
of GTK's combobox entry is narrower than a bare entry's.
[px] `wxComboBox( panel, wxID_ANY, "0" )` with Footprint Properties' four
orientations appended: GetBestSize().x 77 (`qa/probes/combo_best_size_probe.cpp`). */
--ctl-textcombo-width: 77px;
--ctl-pad-x: 9px; /* [css] button { padding: 4px 9px } */
/* A GTK button carrying only a LABEL gets the `text-button` style class,
which overrides that padding:
[css] button.text-button { padding-left: 16px; padding-right: 16px }
[px] measured on pcb_calculator's own buttons: "Reset to Defaults" ink
runs 16 px from the left face edge and 15 from the right, "Browse" 18/18.
A button with an icon keeps --ctl-pad-x (image-button is 5px). */
--ctl-pad-x-text: 16px;
--ctl-face: #373737; /* [css] button { background-image: image(#373737) } [px] agrees */
--ctl-face-disabled: #2a2a2a; /* [css] button:disabled [px] agrees */
/* [css] label:disabled, entry:disabled and button:disabled all take this.
GTK dims by colour, never by opacity: an opacity fade also washes out the
control's background and border, which ours did. */
--ctl-fg-disabled: #929292;
/* A disabled bitmap: BITMAP_STORE::GetDisabledBitmapBundle draws the icon
through wxImage::ConvertToDisabled( 70 ) on a dark theme, each channel
0.4 c + 0.6 * 70/255 with alpha kept (qa/probes/convert_disabled_probe.cpp).
brightness( m ) then contrast( k ) is k m c + (1 - k) / 2: k = 171/255,
m = 102/171. Not an opacity - that fades the icon into what is behind it. */
--bitmap-disabled-filter: brightness(0.596491) contrast(0.670588);
/* [css] `treeview.view header button { color: #8f8f8f; font-weight: bold }`
in the Yaru dark stylesheet. A column header is DIMMER than the rows under
it and heavier — it is a button, not a row — and neither is a shade anyone
here picked. */
--tree-header-fg: #8f8f8f;
/* [px] the interior of a wxTextCtrl, asked of wx itself rather than sampled:
a program compiled against the installed libwxgtk3.2 creates the control
and reports #272727 three ways over — GetBackgroundColour(), the style
context of the GtkEntry wx makes, and a rendered pixel of the drawn
widget. This said #282828 until 2026-08-21, on the stated grounds that
"wx renders one level lighter" than a bare GtkEntry. That is measured
false: wx paints exactly what the toolkit declares. The same run confirms
--ctl-face-disabled (#2a2a2a for a disabled entry) and --ctl-height (34).
(--chrome-bg2 #262626 is documented as the "inset surface" colour and is
one level off this one — flagged, not changed.) */
--field-bg: #272727;
--field-pad-x: 8px; /* [css] entry { padding-left/right: 8px } */
/* [css] entry:focus { border-color: rgba(239, 134, 97, 0.7) }. Note the alpha:
the flat #e95420 we used before reads as a much louder orange than KiCad's,
which composites to about rgb(174,101,75) over a field. */
--field-focus-border: rgb(239 134 97 / 70%);
/* [css] check, radio { min-height: 14px; min-width: 14px; border: 1px }
[px] the Negative box and the Symbol dot both measure 16 across. */
--check-size: 16px;
/* [css] check, radio { background-image: image(#393939) } [px] agrees, and so
does qa/probes/checkbox_probe.cpp, which renders the control through
wxRendererNative::DrawCheckBox - the same GTK draw LAYER_WIDGET's wxCheckBox
gets - and reads the unchecked face back as rgb(57,57,57). Three sources,
one value. */
--check-face: #393939;
/* [px] the ring around an unchecked radio on a live pcb_calculator measures
rgb(25,25,25) - a shade off --ctl-border's #181818. */
--check-border: #191919;
/* [px] a CHECKED radio is a solid rgb(233,84,32) disc with a 6 px white
centre dot, 16 px across. Chrome's accent-color paints a ring plus a dot
instead, which is why ours never matched. */
--radio-dot: 5.5px;
--check-margin: 4px; /* [css] check, radio { margin: 0 4px } */
/* The tick's own ink, on the accent square. NOT --chrome-fg, which happens to
be the same white: this one is Yaru's $selected_fg_color and would move with
the accent if the desktop's did. [css] check:checked, radio:checked
{ color: #FFFFFF }. GTK draws it as check-symbolic.svg recoloured to that;
we draw the equivalent glyph, so only the colour is shared. */
--check-mark: #ffffff;
/* [css] check { border-radius: 3px } — a checkbox is the ONE control that is
not --ctl-radius 6px. (radio { border-radius: 100% } needs no token.) */
--check-radius: 3px;
/* The row a checkbox or radio occupies, indicator centred in it. [px] the
Output Format radios repeat every 34 px and wxFormBuilder gives them
5 top + 5 bottom + a 2 px flexgrid vgap (bitmap2cmp_panel_base.cpp:161-193),
so the control itself is 22. */
--check-row: 22px;
/* The same row, for a checkbox carrying KIUI::GetInfoFont rather than the GUI
font. That is `getGUIFont( win, -1 )` (common/widgets/ui_common.cpp:156) —
one point down — and a point of font is a pixel of row here.
[px] asked of the widget two ways, which agree: wxCheckBox::GetBestSize
(qa/probes/selfilter_grid_probe.cpp) and Gtk.CheckButton's own natural
height both return 21 at 10pt and 22 at 11pt, and a checkbox and a radio
return the same number, so --check-row above is not wrong — it is the
11pt answer, and this is the 10pt one.
PANEL_SCH_SELECTION_FILTER puts the info font on every one of its
checkboxes (panel_sch_selection_filter.cpp:36-47), so its rows are 21. */
--check-row-info: 21px;
/* The air GTK puts around a checkbox's parts, which is ONE number appearing
three times, not three numbers. [px] asked of Gtk.CheckButton's style
properties: focus-padding 1 + focus-line-width 1 + indicator-spacing 2 = 4,
applied before the indicator, again between indicator and label, and again
after the label. The widget's own allocation agrees on both ends: it puts
its label child at x=24 from the button's left edge (4 + 16 + 4), and
wxCheckBox::GetBestSize is text + 28 (4 + 16 + 4 + text + 4) for every one
of the ten Selection Filter labels — the same constant ten times, which is
what makes it a metric rather than a coincidence.
A running eeschema confirms both ends independently: its pane edge is at
x=66, its indicator's left edge at 75 (5 of wxLEFT border + this 4) and its
first label pixel at 95 (a further 16 + this 4).
Ours draws the indicator with `appearance: none` at exactly --check-size
and gets none of that for free, so wherever we lay a checkbox beside a
label, this is the padding and the gap. */
--check-inset: 4px;
/* [px] the wxSlider track is 4 px of flat #4b4b4b with the filled part in the
desktop accent; the thumb is a 20 px circle. [css] agrees on the thumb —
scale slider { min-height: 18px; border: 1px } — and on its colours, but
declares #222222 for the trough, which is not what the live window draws. */
--slider-track-height: 4px;
/* [px] A GTK menu separator, asked of the `separator` node inside a realized
Gtk.Menu on this theme: background #4b4b4b. It coincides with
--slider-track-bg and has nothing to do with it, which is why it is its own
token — a scan for literals restating a token flagged the two together and
substituting would have tied the menus to the slider.
Note what the same probe says about the popup itself: a `menu` node reports
background #1d1d1d (= wxSYS_COLOUR_MENU), radius 6 and a border width of
ZERO. The 1 px #4b4b4b edges on .ze-dropdown, .ze-tooltip and
.ze-combo-popup were measured off a capture, so they may be reproducing
Yaru's box-shadow as a border. Left alone rather than changed on a hunch;
it wants a rendered menu sampled edge-on. */
--menu-separator: #4b4b4b;
/* [data] `wxColour FOOTPRINT_CHOICE::m_grey( 0x808080 )`
(common/widgets/footprint_choice.cpp:25). KiCad's own literal, NOT a theme
colour - wxSYS_COLOUR_GRAYTEXT is #929292 on this machine, which is what
--ctl-fg-disabled carries, and using that here would be a fifth of a
channel out. A token rather than two literals because upstream has one
static: the same m_grey paints the dim library prefix of a row (:111) and
the rule across a separator row (:64). [px] both confirmed at exactly
#808080, with no lighter antialiased pixel above them, by reading the
popup window back off the display server (~/kicad-probes/fp_choice_pixels.cpp). */
--odcombo-grey: #808080;
--slider-track-bg: #4b4b4b;
/* [css] scale { padding: 12px } insets the trough from the widget's own box.
[px] the real trough runs 1671..1893 inside a slider box of 1659..1903,
i.e. 12 px in at each end. */
--slider-track-inset: 12px;
--slider-thumb-size: 20px;
--slider-thumb-bg: #fcfcfc; /* [css] scale slider { background-image: image(#fcfcfc) } */
--slider-thumb-border: #101010; /* [css] scale slider { border: 1px solid #101010 } */
/* A wxNotebook's tab strip. [px] 36 px tall over a 1 px bottom border, the
selected tab marked by a 3 px accent bar that replaces that border;
[css] notebook > header.top > tabs > tab:checked { box-shadow: inset 0 -3px }
confirms the 3. [px] 12 px of padding either side of the tab label. */
--tab-strip-height: 36px;
--tab-underline: 3px;
--tab-pad-x: 12px;
/* INDICATOR_ICON's box: KIUI::c_IndicatorSizeDIP
(`include/widgets/ui_common.h:52`), the size every LAYER_WIDGET row marker
and turndown is built at. [data]: KiCad's own constant, in DIP, which is
px at this display's scale factor of 1. */
--indicator-size: 10px;
/* COLOR_SWATCH, whose size is dialog units rather than pixels:
SWATCH_SIZE_SMALL_DU(8,6) and SWATCH_SIZE_MEDIUM_DU(24,10)
(include/widgets/color_swatch.h:46-47) through ConvertDialogToPixels,
which is wxMulDivInt32( n, base, 4 or 8 ) and ROUNDS:
(n*base + div/2) / div.
[px] asked of wx itself — qa/probes builds a real wxPanel and reports
GetCharWidth() 8, GetCharHeight() 18 at Ubuntu Sans 11, so
small = 8*8/4 x (6*18+4)/8 = 16 x 14
medium = 24*8/4 x (10*18+4)/8 = 48 x 23
Truncating instead of rounding gives 22 for the medium height, which is the
number two separate derivations here got wrong before the probe existed.
Small was written as 14 x 13, which is neither: 8*8/4 is 16, not 14. A
capture of a live GerbView layers pane agrees with the formula and not with
the old token — the swatch there is exactly 16 x 14, hard-cornered and
unbordered (`RenderToDC` sets *wxTRANSPARENT_PEN*, color_swatch.cpp:72).
The -2 border adjustment in color_swatch.cpp:200-205 is inside
#ifdef __WXMAC__ and does not apply. */
--swatch-small-w: 16px;
--swatch-small-h: 14px;
--swatch-medium-w: 48px;
--swatch-medium-h: 23px;
/* SWATCH_SIZE_LARGE_DU(24, 16) (color_swatch.h:48) through the same
conversion: 24*8/4 x (16*18+4)/8 = 48 x 36. The colour picker's Defined
Colors page is the only thing built at this size
(dialog_color_picker.cpp:181). [px] a capture of that page in the real
pl_editor reads a black swatch spanning exactly 48 x 36, with the parent's
rgb(39,39,39) touching it on every side - a bare wxStaticBitmap, no
wxBORDER_SIMPLE panel around it as a COLOR_SWATCH has. */
--swatch-large-w: 48px;
--swatch-large-h: 36px;
/* --- The GTK file chooser, which is the window every wxFileDialog puts up.
[px] throughout, and every one is a run boundary in a capture of the real
dialog — KiCad 10.0.5's Open Existing Project on Yaru-dark, profiled pixel
by pixel. A live Gtk.FileChooserDialog under python-gi was asked the same
questions and agrees; the two are not independent (one machine, one theme),
so that corroborates the reading, not the theme. Full capture in
~/chooser-image-measurements.md and docs/proposals/file-dialog.md. Tokens
rather than per-dialog values for the usual reason — upstream has one
chooser and every launcher opens it. --- */
/* [px] the list row. 29, NOT 24: the selection band in the capture is 29 px
tall and the Modified column's text pitches at 28.8 over ten rows, and a
browse-mode probe returns get_background_area h=29 for every row. The 24
this shipped as was measured with the chooser in Recent mode, whose tree
view is a different instance with a different column set - which is also
why the 130 px Type width below appears nowhere in the capture. */
--chooser-row: 29px;
/* [px] the column header button allocates 25 px high; its font is the list's
own size in bold, and its background is the list's, so there is no separate
header colour. */
--chooser-header-row: 25px;
/* [px] the file list's cell renderers, read off the dialog wxFileDialog
itself builds with the chooser pointed at a DIRECTORY - browse mode, not
Recent. qa/probes/chooser_cells_probe.cpp; gtk-font-name was Ubuntu Sans 11
for the reading, and python-gi returns the same properties.
The Name column carries TWO renderers. A GtkCellRendererPixbuf 28 px wide
with xpad 6, drawing a 16 px icon at xalign 0.5 - so the icon sits 6 px
into a 28 px cell - and then a GtkCellRendererText at x_offset 28 with
xpad 2. That is the whole of --chooser-text-pad's reach: it is the NAME
column's text renderer and nothing else. Every other column's text
renderer pads 6, which is --chooser-cell-pad below.
This is what reconciles the capture with the widget: the capture puts the
name icon 8 px from the list's left edge while the renderer's xpad is 6,
and the missing 2 is --chooser-row-inset. 647 + 2 + 6 = 655, and the
capture's icon runs 655..670. */
--chooser-icon-size: 16px;
--chooser-icon-pad: 6px;
--chooser-text-pad: 2px;
/* [px] every text renderer that is not the Name column's, and also the
padding of the column header button - two separate GTK values that agree.
The header's is the theme's button padding (label starts 6 px into the
button, every column), not a cell renderer's xpad, which is why the header
text lines up with Size/Type/Modified but not with a file name: the name
starts past the 28 px icon cell. */
--chooser-cell-pad: 6px;
/* [px] GtkTreeView insets a row's cell area from its background by the
horizontal-separator: measured background x=0 w=578 against cell x=2
w=574. Only the cells are inset - the header buttons start at the column's
own x. */
--chooser-row-inset: 2px;
/* [px] the path bar band is 46 + its 1 px rule, and it sits inside the right
pane - it starts at the list's left edge, not the dialog's, because the
sidebar runs the full height between the header bar and the footer. */
--chooser-pathbar-height: 47px;
--chooser-nav-button: 26px;
/* [px] the dialog's GtkHeaderBar band is 46 + its 1 px rule. */
--chooser-headerbar-height: 47px;
/* Every button in the header bar and the path bar, and the filter combo in
the footer, is an ordinary GTK button: --ctl-height (34) tall, and
--ctl-pad-x-text (16) either side of a label. There is no chooser-specific
height, which is what a `--chooser-btn-height: 32px` here used to say - 32
is the *face* between the two 1 px borders, and setting it as the
border-box height drew every one of them 2 px short.
Asked of GTK rather than read off the capture (qa/probes; the same numbers
the capture shows): a GtkFileChooserDialog's header bar reports its Cancel
button as 78x46 with margin 6 top and bottom - so 34 drawn, centred in the
46 px band - and padding 4/16 over a min-height of 24, which is 34 again.
--chooser-band-pad is that 6.
[px] the header bar's *image* buttons - the search toggle - are 36 wide:
GTK reports padding 5 either side of a 24 px min-width, plus the borders.
They are 34 tall like the rest. */
--chooser-image-btn-width: 36px;
--chooser-band-pad: 6px;
/* [px] GtkDialog puts its header-bar action widgets in one horizontal size
group, so the accept button is as wide as Cancel rather than as wide as
its own label: GTK gives a standalone "Open" 70 and a standalone "Save"
65, but inside the dialog both come back 78 - Cancel's width. CSS has no
"as wide as that sibling", so both carry Cancel's width as a floor. */
--chooser-headerbar-btn-min: 78px;
/* The header bar is darker than the rest of the chrome: #222222 against the
#2c2c2c the sidebar and the footer share with --chrome-bg. */
--chooser-headerbar-bg: #222222;
/* GTK's `suggested-action`, which the accept button carries. Green, not the
Yaru accent - the accent is the selection, and they are different colours
in the same window. */
--chooser-suggested-bg: #0d761d;
/* A GtkPathBar's current element is a *checked* button, which Yaru paints
darker than the bar rather than filling with the accent. */
--chooser-crumb-current: #151515;
/* [px] the dialog's own top corners. The bottom two are square in the
capture. Fitted from the header background's leftmost-x curve: at dy=0
x=404, dy=3 x=396, dy=8 x=392 - a circle of r=12. */
--chooser-radius: 12px;
/* [px] the places sidebar: 254 wide, 36 px rows on a 38 px pitch, the first
4 px down, the icon 15 px in and the label 39. */
--chooser-sidebar-width: 254px;
--chooser-sidebar-row: 36px;
--chooser-sidebar-gap: 2px;
--chooser-sidebar-pad: 4px;
--chooser-sidebar-indent: 15px;
--chooser-sidebar-icon-gap: 8px;
/* [px] the fixed columns, read off the capture's own header positions: Size
starts at x=1330, Type at 1402, Modified at 1510, and the list ends at 1589
- so 72 / 108 / 82, with Name taking what is left as the only expanding
one. GTK sizes these to their widest cell, so they are this instance's
rather than a constant of the widget; the 130 they shipped as was read off
the Recent-mode tree view, which is a different widget with a different
column set and never appears in the browse-mode dialog at all. */
--chooser-col-size: 72px;
--chooser-col-type: 108px;
--chooser-col-modified: 82px;
/* The border wxFormBuilder puts around a sizer item — `wxALL, 5` — which is
the spacing unit of every KiCad dialog and panel, not a per-editor choice.
Two stacked items are therefore 10 px apart, one against the frame edge
is 5 px in. */
--wx-border: 5px;
/* HOTKEY_CYCLE_POPUP's own two numbers. KiCad hardcodes them per platform —
#ifdef __WXGTK__
#define LIST_BOX_H_PADDING 20
#define LIST_BOX_V_PADDING 8
common/dialogs/hotkey_cycle_popup.cpp:29-38
— so they are [data], not chrome: nothing in the theme decides them and
the GTK row is the one this build takes. The H figure is the total across
both edges of the list (`width + LIST_BOX_H_PADDING`, `:93`); the V figure
is per edge (`height + LIST_BOX_V_PADDING * 2`, `:94`) and is ALSO the
leading added to each row (`:90`). */
--hkcycle-list-h-padding: 20px; /* [data] */
--hkcycle-list-v-padding: 8px; /* [data] */
/* The shell is dark-only, and this is what tells the engine so: it paints
every *native* control, scrollbar and popup from its dark palette —
including the list a