14010 lines
563 KiB
CSS
14010 lines
563 KiB
CSS
/* 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 `<body text=WINDOWTEXT bgcolor=WINDOW link=HOTLIGHT>`,
|
||
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
|
||
<br> 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 <select> opens, which no CSS rule can reach. Without
|
||
it the chrome was dark and every scrollbar and text box on top of it was
|
||
white. */
|
||
color-scheme: dark;
|
||
/* --- GTK3/Yaru overlay scrollbar, measured (see ui/overlay_scrollbars.ts for
|
||
the method; [css] = the extracted Yaru-dark GTK3 stylesheet, [px] = pixel
|
||
profiles of a live Gtk.ScrolledWindow). Tokens rather than per-editor
|
||
values: KiCad's scrollbars come from the GTK theme, so every frame has the
|
||
same ones and no frame styles its own. --- */
|
||
/* [css] .overlay-indicator ... slider { min-width: 3px; border: 1px solid
|
||
black } = 5 px, of which 3 px reads as the hairline. [px] x596..598 white
|
||
against a content edge at x599. */
|
||
--osb-indicator-size: 5px;
|
||
--osb-indicator-fill: #f7f7f7;
|
||
--osb-indicator-edge: #000;
|
||
/* [css] .overlay-indicator:not(.dragging):not(.hovering) { opacity: 0.4 }.
|
||
[px] #f7f7f7 at 0.4 over #272727 = #7a7a7a, exactly the sampled value. */
|
||
--osb-indicator-opacity: 0.4;
|
||
/* [px] the thickened bar: a 12 px band (x588..599) holding a 6 px slider
|
||
(x591..596), with a 1 px #181818 line at x587.
|
||
[css] slider { min-width: 6px; margin: -1px; border: 4px transparent }. */
|
||
--osb-band: 12px;
|
||
--osb-slider-size: 6px;
|
||
--osb-slider-inset: 3px;
|
||
--osb-slider-fill: #a6a6a6; /* [css] scrollbar slider */
|
||
--osb-slider-hover: #cecece; /* [css] scrollbar slider:hover */
|
||
--osb-slider-active: #ee784e; /* [css] scrollbar slider:hover:active */
|
||
--osb-band-edge: #181818; /* [css] scrollbar.right { border-left } */
|
||
--osb-radius: 8px; /* [css] scrollbar slider { border-radius: 8px } */
|
||
/* [css] .overlay-indicator.dragging, .hovering { opacity: 0.8 }.
|
||
[px] #a6a6a6 at 0.8 over #272727 = #8d8d8d, exactly the sampled value. */
|
||
--osb-over-opacity: 0.8;
|
||
/* [css] scrollbar { transition: 300ms cubic-bezier(0.25,0.46,0.45,0.94) } */
|
||
--osb-transition: 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||
/* [px] measured from the last pointer MOTION, not from the pointer leaving:
|
||
held perfectly still in the middle of a live GtkScrolledWindow the
|
||
indicator was full through 1.8 s, ~29 % at 2.3 s and gone at 2.8 s. The
|
||
~2000 ms hold is a JS timer (a CSS transition-delay cannot be asymmetric);
|
||
this is the fade half. The thickened state does not fade at all. */
|
||
--osb-fade-duration: 1000ms;
|
||
}
|
||
|
||
/* Native scrollbars OFF, app-wide. This is the load-bearing half of the overlay
|
||
scrollbar port: it is what makes `offsetWidth - clientWidth` 0, which is what
|
||
"the content is full width" means.
|
||
|
||
It has to be a universal selector, and that is not a style choice.
|
||
`scrollbar-width` is NOT an inherited property (only `scrollbar-color` is),
|
||
so the `:root { scrollbar-width: thin }` this replaces reached the document
|
||
element and nothing else - which is exactly why every pane stayed at the
|
||
browser default. Measured in Chrome 149 on this machine: a scroller takes a
|
||
15 px gutter at `auto`, 10 px at `thin` and 0 px at `none`, and the Image
|
||
Converter's preview measured 15, i.e. `auto`, the whole time `thin` was
|
||
declared.
|
||
|
||
`*` is specificity 0, the lowest there is, so it cannot outrank anything
|
||
below it - the hazard the old comment was guarding against by keeping the
|
||
declaration on :root.
|
||
|
||
`overflow: overlay`, which would have done the layout half natively, is
|
||
removed from the platform. The indicator is drawn by
|
||
ui/overlay_scrollbars.ts. */
|
||
* {
|
||
scrollbar-width: none;
|
||
}
|
||
|
||
/* Schematic Editor only: real eeschema's own chrome colors on this machine
|
||
(sampled off a live 9.0.8 window, GTK/Yaru dark theme) - neutral greys
|
||
instead of our app's blue-tinted chrome, and its orange selected/active/
|
||
hover accent instead of our blue --chrome-active. Scoped via custom-
|
||
property shadowing on the editor's root so every descendant that already
|
||
reads these vars (toolbars, menus, panels, tree rows...) picks it up for
|
||
free, without touching any other editor. */
|
||
.sch-theme {
|
||
/* Everything this used to shadow is now the shell default; kept as the hook
|
||
for anything eeschema-specific that turns up next to it. */
|
||
}
|
||
|
||
html,
|
||
body {
|
||
background: var(--chrome-bg2);
|
||
/*
|
||
* A `wxFrame` CLIPS. Nothing in KiCad scrolls the window itself: a pane too
|
||
* big for its space is cut off by the frame, and the widget inside deals with
|
||
* not fitting — a toolbar grows an overflow chevron
|
||
* (`ACTION_TOOLBAR`'s `SetOverflowVisible( !GetToolBarFits() )`,
|
||
* `common/tool/action_toolbar.cpp:221-231`), a scrolled window grows
|
||
* scrollbars, and a canvas is simply the size it is.
|
||
*
|
||
* A page does not clip: an overflowing child makes the DOCUMENT scroll, and
|
||
* `html, body, #root { height: 100% }` alone does not stop it. Setting the
|
||
* toolbar icons to Large made the vertical toolbars taller than the window,
|
||
* which scrolled the whole application — the right toolbar's last buttons
|
||
* disappeared under the status bar and the menu bar could be scrolled off the
|
||
* top. There is no state in KiCad in which that can happen, so it is
|
||
* forbidden here at the root rather than patched per frame.
|
||
*/
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
Dark form controls and scrollbars.
|
||
|
||
The chrome is painted by the rules in this file, but scrollbars, text fields,
|
||
comboboxes and the drop-down lists the browser opens are drawn by the *user
|
||
agent*, which defaults to the OS light theme — white boxes and pale scrollbars
|
||
over a dark shell. A handful of places had been themed one at a time
|
||
(`.ze-auxbar select`, `.ze-cell-input`, …); everything else was still white.
|
||
|
||
`color-scheme: dark` is the load-bearing line: it tells the engine to paint
|
||
every native control, scrollbar and popup in its dark palette, including the
|
||
open <select> list, which CSS cannot reach. The rest matches those controls to
|
||
KiCad's own greys rather than the browser's idea of dark.
|
||
|
||
All of it is element-level under `.ze-app`, so the specific rules further down
|
||
still win wherever a widget wants something different.
|
||
------------------------------------------------------------------------- */
|
||
/* WebKit engines that predate `scrollbar-width` need the pseudo-element form of
|
||
the same instruction; both have to be present, because Chromium ignores
|
||
::-webkit-scrollbar rules the moment scrollbar-width is set and Safari does
|
||
the opposite. Zero width is what removes the gutter; `display: none` alone
|
||
leaves WebKit reserving it. */
|
||
::-webkit-scrollbar {
|
||
width: 0;
|
||
height: 0;
|
||
display: none;
|
||
}
|
||
::-webkit-scrollbar-track,
|
||
::-webkit-scrollbar-thumb,
|
||
::-webkit-scrollbar-corner,
|
||
::-webkit-scrollbar-button {
|
||
display: none;
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
The overlay indicator itself — GTK's, ported.
|
||
|
||
One fixed layer over the whole document rather than a child of each pane: a
|
||
child of a scroll container scrolls with the content, and wrapping ~40 panes
|
||
to give each a positioned parent would change their layout. Geometry is set
|
||
inline by ui/overlay_scrollbars.ts; everything that is a *value* is here.
|
||
------------------------------------------------------------------------- */
|
||
.ze-osb-layer {
|
||
position: fixed;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
/* Above every dialog and popup, because the pane under a dialog is a pane. */
|
||
z-index: 2147483000;
|
||
}
|
||
|
||
.ze-osb {
|
||
position: fixed;
|
||
opacity: 0;
|
||
/* Rule 1, restated: the layer is fixed and the bars are in it, so nothing
|
||
here can take space from a pane. */
|
||
pointer-events: none;
|
||
/* Fading OUT is the slow half; the class flip to is-visible overrides it with
|
||
--osb-transition so appearing stays at GTK's 300 ms. */
|
||
transition: opacity var(--osb-fade-duration) ease-out;
|
||
}
|
||
.ze-osb-v {
|
||
width: var(--osb-band);
|
||
}
|
||
.ze-osb-h {
|
||
height: var(--osb-band);
|
||
}
|
||
.ze-osb.is-visible {
|
||
opacity: var(--osb-indicator-opacity);
|
||
transition: opacity var(--osb-transition);
|
||
}
|
||
.ze-osb.is-over {
|
||
opacity: var(--osb-over-opacity);
|
||
/* Only the thickened state draws the trough edge; the indicator is bare. */
|
||
box-shadow: inset 1px 0 0 var(--osb-band-edge);
|
||
pointer-events: auto;
|
||
}
|
||
.ze-osb-h.is-over {
|
||
box-shadow: inset 0 1px 0 var(--osb-band-edge);
|
||
}
|
||
|
||
.ze-osb-thumb {
|
||
position: absolute;
|
||
display: block;
|
||
box-sizing: border-box;
|
||
background: var(--osb-indicator-fill);
|
||
border: 1px solid var(--osb-indicator-edge);
|
||
transition:
|
||
width var(--osb-transition),
|
||
height var(--osb-transition),
|
||
inset-block-end var(--osb-transition),
|
||
inset-inline-end var(--osb-transition),
|
||
background-color var(--osb-transition),
|
||
border-color var(--osb-transition),
|
||
border-radius var(--osb-transition);
|
||
}
|
||
.ze-osb-v .ze-osb-thumb {
|
||
right: 0;
|
||
width: var(--osb-indicator-size);
|
||
}
|
||
.ze-osb-h .ze-osb-thumb {
|
||
bottom: 0;
|
||
height: var(--osb-indicator-size);
|
||
}
|
||
/* The "over" state: the flat 3 px hairline becomes GTK's rounded grey slider,
|
||
inset from the edge by the band's own padding. */
|
||
.ze-osb.is-over .ze-osb-thumb {
|
||
background: var(--osb-slider-fill);
|
||
border-color: transparent;
|
||
border-radius: var(--osb-radius);
|
||
}
|
||
.ze-osb-v.is-over .ze-osb-thumb {
|
||
right: var(--osb-slider-inset);
|
||
width: var(--osb-slider-size);
|
||
}
|
||
.ze-osb-h.is-over .ze-osb-thumb {
|
||
bottom: var(--osb-slider-inset);
|
||
height: var(--osb-slider-size);
|
||
}
|
||
.ze-osb.is-over:hover .ze-osb-thumb {
|
||
background: var(--osb-slider-hover);
|
||
}
|
||
.ze-osb.is-over:active .ze-osb-thumb {
|
||
background: var(--osb-slider-active);
|
||
}
|
||
|
||
/* Text fields and comboboxes. The `:not(…)` list keeps the controls that are
|
||
*drawn* rather than filled — a checkbox, a radio, a colour well, a slider —
|
||
out of it; giving those a background and a border destroys them.
|
||
|
||
`.ze-bare` is the explicit opt-out, for an entry that sits *inside* a frame
|
||
its wrapper draws — a search box with a magnifier beside it, a filename with
|
||
a fixed extension after it. Those need no background, border or padding of
|
||
their own, and every `:not()` here counts toward specificity, which puts this
|
||
rule at (0,5,1) and out of reach of any sensible stack of classes. Opting out
|
||
by name beats each such entry having to find an id to win with. */
|
||
.ze-app
|
||
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not(
|
||
.ze-bare
|
||
),
|
||
.ze-app select,
|
||
.ze-app textarea {
|
||
/* A GTK `entry`, and every one of these four is the entry's own value:
|
||
--field-bg #272727, --ctl-border #181818, --ctl-radius 6px and
|
||
--field-pad-x 8px, all already measured and sitting in the token block.
|
||
This rule wrote --chrome-bg2 / --chrome-border / 3px / 5px instead - panel
|
||
chrome, not entry chrome - and being (0,1,1) it quietly beat every rule
|
||
that DID name the right tokens. GerbView's `fmt:` box is where it showed:
|
||
.ze-tb-textinfo at (0,1,0) states --field-bg, --ctl-border, --ctl-radius
|
||
and --field-pad-x and got none of them, so the box rendered #262626 inside
|
||
#1e1e1e at radius 3 with 5 px of padding against a real GerbView's #272727
|
||
inside #181818 at radius 6 with 8. That is the specificity trap in CLAUDE.md
|
||
with the values the right way round: the SHARED rule was the drifted one,
|
||
so restating them locally would have fixed one box and left the app wrong.
|
||
Vertical padding is left alone: an entry's height is set per control
|
||
(--ctl-height where it is a full-size field), not by this rule. */
|
||
background: var(--field-bg);
|
||
color: var(--view-fg); /* an entry is a view: wxSYS_COLOUR_WINDOWTEXT */
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: var(--ctl-radius);
|
||
padding: 2px var(--field-pad-x);
|
||
font: inherit;
|
||
outline: none;
|
||
}
|
||
/* Yaru gives the ORANGE focus border to `entry` and `spinbutton` only, and at
|
||
70% alpha over the field, not the flat accent:
|
||
|
||
spinbutton:focus:not(.vertical), entry:focus {
|
||
box-shadow: inset 0 0 0 1px rgba(239, 134, 97, 0.7);
|
||
border-color: rgba(239, 134, 97, 0.7); }
|
||
|
||
A `button` — and a combo box is a button, `combobox > box > button.combo` —
|
||
has no :focus rule whatsoever; all it declares is `outline-color`, which in
|
||
GTK3 is the dashed keyboard-navigation rectangle, not a border. So clicking a
|
||
drop-down in KiCad shows no orange at all, and that is handled on `.ze-combo`
|
||
below. `select` is dropped from this rule for the same reason. */
|
||
.ze-app
|
||
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not(
|
||
.ze-bare
|
||
):focus,
|
||
.ze-app textarea:focus {
|
||
border-color: var(--field-focus-border);
|
||
box-shadow: inset 0 0 0 1px var(--field-focus-border);
|
||
}
|
||
/* `.ze-bare` is an entry that sits INSIDE a frame its wrapper draws, and GTK
|
||
draws the focus ring on the frame — a GtkSearchEntry's ring goes round the
|
||
whole box, magnifier and all, not round the text area inside it. Without the
|
||
`:not()` above, a bare entry drew a second ring inset within the wrapper's,
|
||
which is the doubled box on Preferences > Hotkeys' filter. */
|
||
.ze-tplsel-searchwrap:focus-within {
|
||
border-color: var(--field-focus-border);
|
||
box-shadow: inset 0 0 0 1px var(--field-focus-border);
|
||
}
|
||
.ze-app input:disabled,
|
||
.ze-app select:disabled,
|
||
.ze-app textarea:disabled {
|
||
opacity: 0.55;
|
||
cursor: default;
|
||
}
|
||
/* [px] wxSYS_COLOUR_GRAYTEXT, #929292. This was #8b9098 — blue 152 against
|
||
red 139, the blue tint CLAUDE.md names as "the thing that read as not KiCad
|
||
before a single widget had been compared". --ctl-fg-disabled already carries
|
||
the measured value. */
|
||
.ze-app input::placeholder,
|
||
.ze-app textarea::placeholder {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* The accent the browser paints inside a checkbox, and the size GTK gives it.
|
||
Both come from the theme, so neither is ours to pick: --chrome-active is the
|
||
desktop accent and --check-size is the measured indicator.
|
||
The accent used to be #e07b1a, a shade that appears nowhere in Yaru, and the
|
||
Schematic Editor's dock then restated the right value locally as "the precise
|
||
shade sampled off real eeschema" — which is the specificity trap: one app
|
||
looked correct while every other one drifted. A live GerbView layers pane
|
||
confirms it from a second app: its visibility checkboxes fill with exactly
|
||
rgb(233, 84, 32), and they measure 16 across, not the 13 a bare
|
||
<input type=checkbox> takes from the user agent. */
|
||
/* Drawn rather than accented. `accent-color` gets the FILL right - a live
|
||
GerbView's boxes are rgb(233,84,32) and so are ours - but the tick is not
|
||
ours to ask for: the browser picks its own contrast colour for the mark and
|
||
for this accent Chrome chooses BLACK, where GTK strokes it white. That is
|
||
what Akshay saw beside a real GerbView, and no amount of accent-color can
|
||
move it, so the box is drawn here instead.
|
||
|
||
Every value below is measured off the real widget rather than chosen -
|
||
`wxRendererNative::DrawCheckBox` renders through GTK, so it IS the widget
|
||
LAYER_WIDGET puts in its visibility column (`layer_widget.cpp:347`). See
|
||
qa/probes/checkbox_probe.cpp. */
|
||
.ze-app input[type="checkbox"] {
|
||
appearance: none;
|
||
width: var(--check-size);
|
||
height: var(--check-size);
|
||
border: 1px solid var(--check-border);
|
||
border-radius: var(--check-radius);
|
||
background: var(--check-face);
|
||
}
|
||
.ze-app input[type="checkbox"]:checked {
|
||
border-color: var(--chrome-active);
|
||
background-color: var(--chrome-active);
|
||
/* The check stroke. --check-mark already holds this: Yaru's
|
||
$selected_fg_color, the ink GTK recolours check-symbolic.svg to. CSS cannot
|
||
interpolate a custom property into a url(), so the colour is spelled out
|
||
here and `checkbox_and_swatch.test.ts` asserts it still equals the token.
|
||
[px] the probe reads the stroke at rgb(255,252,252), white within
|
||
antialiasing, and so does Akshay's capture of a real GerbView. */
|
||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12 5 L6.5 11.5 L4 9' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
||
background-repeat: no-repeat;
|
||
background-position: center;
|
||
}
|
||
/* wxCHK_UNDETERMINED: GTK's inconsistent check - Yaru's check:indeterminate is the checked
|
||
face with a dash (check-mixed-symbolic) for the mark, in the same ink. */
|
||
.ze-app input[type="checkbox"]:indeterminate {
|
||
border-color: var(--chrome-active);
|
||
background-color: var(--chrome-active);
|
||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8 L11.5 8' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
|
||
background-repeat: no-repeat;
|
||
background-position: center;
|
||
}
|
||
.ze-app input[type="checkbox"]:indeterminate:disabled {
|
||
border-color: var(--ctl-border);
|
||
background-color: var(--ctl-face-disabled);
|
||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8 L11.5 8' fill='none' stroke='%23929292' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
|
||
}
|
||
/* A DISABLED tick is not an orange one. Yaru states this outright, for the
|
||
checkbox and the radio in one rule:
|
||
|
||
check:checked:disabled,
|
||
radio:checked:disabled {
|
||
box-shadow: none;
|
||
color: #929292; <- the mark
|
||
border-color: #181818; <- --ctl-border
|
||
background-image: image(#2a2a2a); } <- --ctl-face-disabled
|
||
|
||
so every value here is a token we already hold, and none is chosen. Ours had
|
||
no `:disabled` override at all, so `updateShapeAndPins` and
|
||
`updateKeywordsAndFootprintFilters` — the two DIALOG_CHANGE_SYMBOLS ticks
|
||
that are SetValue(true) then Enable(false) — stayed full accent orange while
|
||
KiCad greys them. Akshay's capture of the real dialog reads rgb(42,42,42)
|
||
there against rgb(233,84,32) on an enabled one.
|
||
|
||
The mark colour is spelled out rather than interpolated for the same reason
|
||
the enabled one is — CSS cannot put a custom property inside a url() — and
|
||
`checkbox_and_swatch.test.ts` asserts it still equals --ctl-fg-disabled. */
|
||
.ze-app input[type="checkbox"]:checked:disabled {
|
||
border-color: var(--ctl-border);
|
||
background-color: var(--ctl-face-disabled);
|
||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12 5 L6.5 11.5 L4 9' fill='none' stroke='%23929292' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
||
}
|
||
|
||
/* A wxSlider, drawn rather than accented: GTK's thumb is a WHITE disc, not a
|
||
coloured one, and its trough is a flat grey with no filled portion.
|
||
[px] measured on pcb_calculator's current-density slider: trough 4 px tall,
|
||
rgb(75,75,75); thumb 20 px across, rgb(252,252,252) with a 1 px grey edge. */
|
||
.ze-app input[type="range"] {
|
||
appearance: none;
|
||
height: var(--slider-thumb-size);
|
||
background: transparent;
|
||
}
|
||
|
||
.ze-app input[type="range"]::-webkit-slider-runnable-track {
|
||
height: var(--slider-track-height);
|
||
border-radius: calc(var(--slider-track-height) / 2);
|
||
background: var(--slider-track-bg);
|
||
}
|
||
|
||
.ze-app input[type="range"]::-webkit-slider-thumb {
|
||
appearance: none;
|
||
width: var(--slider-thumb-size);
|
||
height: var(--slider-thumb-size);
|
||
margin-top: calc((var(--slider-track-height) - var(--slider-thumb-size)) / 2);
|
||
border-radius: 50%;
|
||
background: var(--slider-thumb-bg);
|
||
border: 1px solid var(--slider-thumb-border);
|
||
}
|
||
|
||
.ze-app input[type="range"]::-moz-range-track {
|
||
height: var(--slider-track-height);
|
||
border-radius: calc(var(--slider-track-height) / 2);
|
||
background: var(--slider-track-bg);
|
||
}
|
||
|
||
.ze-app input[type="range"]::-moz-range-thumb {
|
||
width: var(--slider-thumb-size);
|
||
height: var(--slider-thumb-size);
|
||
border: 1px solid var(--slider-thumb-border);
|
||
border-radius: 50%;
|
||
background: var(--slider-thumb-bg);
|
||
}
|
||
|
||
/* ---- wxSlider with wxSL_LABELS / wxSL_VERTICAL (see ui/Slider.tsx) ----
|
||
|
||
GTK draws the current value beside the thumb and the two range ends at the
|
||
ends of the track, each on its own label line. These rules were scoped to
|
||
`.imgc-frame` in imageConverter.css and so were reachable from one launcher;
|
||
the colour picker asked for the same control and got a bare range input.
|
||
|
||
`--slider-frac` is where the thumb really stands, 0..1. A range input's thumb
|
||
centre travels only between half a thumb in from each end, which is what the
|
||
second term of each calc() corrects for — so the accent fill and the value
|
||
label follow the thumb rather than the value. */
|
||
.ze-slider {
|
||
position: relative;
|
||
/* [data] the wxFormBuilder border around a slider at its call sites:
|
||
`wxBOTTOM|wxLEFT|wxRIGHT, 5` in bitmap2cmp_panel_base.cpp:150. */
|
||
padding: 0 var(--wx-border);
|
||
}
|
||
/* wxSL_LABELS makes room for a label line above the track and one below. */
|
||
.ze-slider.labelled {
|
||
padding-block: var(--ui-line-height);
|
||
}
|
||
/* GTK insets the trough 12 px from each end of the scale's own box and lets the
|
||
thumb hang half over it. A range input confines its thumb inside the track
|
||
instead, so the two cannot both be exact: this matches the TROUGH, which is
|
||
on screen at every value. */
|
||
.ze-app .ze-slider > input[type="range"] {
|
||
display: block;
|
||
width: calc(100% - 2 * var(--slider-track-inset));
|
||
margin: 0 var(--slider-track-inset);
|
||
/* NOT PROVEN. The +7 is a fudge that makes the label lines above and below
|
||
the track clear the thumb; no GTK metric and no measurement says 7. It is
|
||
the one number in this rule that is neither a token nor a citation. */
|
||
height: calc(var(--slider-thumb-size) + 7px);
|
||
padding: 0;
|
||
appearance: none;
|
||
background: transparent;
|
||
}
|
||
/* scale highlight is the accent, scale trough the flat grey behind it. */
|
||
.ze-app .ze-slider > input[type="range"]::-webkit-slider-runnable-track {
|
||
--slider-thumb-x: calc(
|
||
var(--slider-thumb-size) /
|
||
2 +
|
||
var(--slider-frac) *
|
||
(100% - var(--slider-thumb-size))
|
||
);
|
||
height: var(--slider-track-height);
|
||
border-radius: calc(var(--slider-track-height) / 2);
|
||
background: linear-gradient(
|
||
to right,
|
||
var(--chrome-active) 0 var(--slider-thumb-x),
|
||
var(--slider-track-bg) var(--slider-thumb-x) 100%
|
||
);
|
||
}
|
||
.ze-app .ze-slider > input[type="range"]::-webkit-slider-thumb {
|
||
appearance: none;
|
||
width: var(--slider-thumb-size);
|
||
height: var(--slider-thumb-size);
|
||
border-radius: 50%;
|
||
background: var(--slider-thumb-bg);
|
||
border: 1px solid var(--slider-thumb-border);
|
||
box-sizing: border-box;
|
||
margin-top: calc((var(--slider-track-height) - var(--slider-thumb-size)) / 2);
|
||
}
|
||
/* Centred on the thumb, wherever the thumb actually is. */
|
||
.ze-slider-val {
|
||
position: absolute;
|
||
top: 0;
|
||
left: calc(
|
||
var(--wx-border) +
|
||
var(--slider-track-inset) +
|
||
var(--slider-thumb-size) /
|
||
2 +
|
||
var(--slider-frac) *
|
||
(100% - 2 * var(--wx-border) - 2 * var(--slider-track-inset) - var(--slider-thumb-size))
|
||
);
|
||
transform: translateX(-50%);
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
.ze-slider-ends {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: var(--wx-border);
|
||
right: var(--wx-border);
|
||
display: flex;
|
||
justify-content: space-between;
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
/* wxSL_VERTICAL. The control is the same one turned a quarter; `direction: rtl`
|
||
with the writing mode is what carries wxSL_INVERSE - the MAXIMUM at the top,
|
||
where a person expects "more" to be. Both of the colour picker's sliders
|
||
have that bit (dialog_color_picker_base.cpp:124, 173).
|
||
|
||
[px] the whole layout below was asked of a real wxSlider built with those
|
||
very bits - qa/probes/slider_probe.cpp, on this machine with this theme. It
|
||
reports a horizontal GtkBox holding
|
||
|
||
GtkScale x=159 w=52 the trough, then the value text
|
||
GtkBox x=211 w=24 the two range labels, one above the other
|
||
|
||
so 76 across for a 0..255 range. Inside the scale: `padding: 12px` on all
|
||
four sides, the 4 px trough painted at local x=12, and `value-pos=RIGHT`
|
||
putting the value text at local x=28 - i.e. one more scale-padding past the
|
||
trough. The range labels then start at local 52, max at the top because the
|
||
scale is inverted.
|
||
|
||
Every one of those numbers is a token or a sum of tokens here, and the whole
|
||
arrangement is on the RIGHT. wxSL_LEFT names the constant, but wx hands GTK
|
||
GTK_POS_RIGHT for it; reading the flag's name instead of measuring it is
|
||
what put the labels on the left and the value under the thumb. */
|
||
.ze-slider.vertical {
|
||
position: relative;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: stretch;
|
||
padding: 0;
|
||
/* The scale (two paddings and the trough, then one label column) beside the
|
||
range-label column: 12 + 4 + 12 + 24 + 24 = the measured 76. */
|
||
width: calc(
|
||
2 *
|
||
var(--slider-track-inset) +
|
||
var(--slider-track-height) +
|
||
2 *
|
||
var(--slider-label-w)
|
||
);
|
||
}
|
||
.ze-app .ze-slider.vertical > input[type="range"] {
|
||
writing-mode: vertical-lr;
|
||
direction: rtl;
|
||
/* The thumb is wider than the trough and straddles it, so the box the input
|
||
needs is one thumb across, centred on where the trough goes. */
|
||
width: var(--slider-thumb-size);
|
||
height: auto;
|
||
flex: 0 0 auto;
|
||
align-self: stretch;
|
||
/* The scale's padding along the track, which is also the travel a range
|
||
input's thumb centre is short of each end. */
|
||
margin-top: var(--slider-track-inset);
|
||
margin-bottom: var(--slider-track-inset);
|
||
margin-right: 0;
|
||
/* Puts the trough's centre at the scale's left padding edge plus half a
|
||
trough - local x=14, where the probe painted it. */
|
||
margin-left: calc(
|
||
var(--slider-track-inset) +
|
||
var(--slider-track-height) /
|
||
2 -
|
||
var(--slider-thumb-size) /
|
||
2
|
||
);
|
||
}
|
||
/* The fill runs from the BOTTOM of a vertical scale to the thumb, because
|
||
wxSL_INVERSE puts the maximum at the top. A gradient is resolved in PHYSICAL
|
||
directions whatever the writing mode, and the UA has already turned this
|
||
track's box on its side - so the horizontal rule's `to right` painted from
|
||
the top down, which is why a slider sitting at 0 showed a full orange track
|
||
and one at maximum showed none. */
|
||
.ze-app .ze-slider.vertical > input[type="range"]::-webkit-slider-runnable-track {
|
||
background: linear-gradient(
|
||
to top,
|
||
var(--chrome-active) 0 var(--slider-thumb-x),
|
||
var(--slider-track-bg) var(--slider-thumb-x) 100%
|
||
);
|
||
}
|
||
/* A vertical track is THIN across and long down, so its thickness is a width
|
||
here where the horizontal rule sets a height. Left as a height it took the
|
||
input's whole 20 px and the scale read as a grey slab.
|
||
|
||
The two margins are PHYSICAL on purpose. `margin-inline: auto` centres along
|
||
the inline axis, and the inline axis of a control in `writing-mode:
|
||
vertical-lr` runs DOWN - so it centred the track along the track and left it
|
||
flush against the left edge of the input, ten pixels off from the thumb. */
|
||
.ze-app .ze-slider.vertical > input[type="range"]::-webkit-slider-runnable-track {
|
||
width: var(--slider-track-height);
|
||
height: auto;
|
||
margin-left: auto;
|
||
margin-right: auto;
|
||
}
|
||
/* Same trap on the thumb: the horizontal rule centres it ACROSS its track with
|
||
a margin-top, and that margin slides it ALONG the track once the control is
|
||
turned a quarter. */
|
||
.ze-app .ze-slider.vertical > input[type="range"]::-webkit-slider-thumb {
|
||
margin-top: 0;
|
||
margin-left: calc((var(--slider-track-height) - var(--slider-thumb-size)) / 2);
|
||
}
|
||
.ze-slider.vertical.labelled {
|
||
padding-block: 0;
|
||
}
|
||
/* The value text: GTK draws it inside the scale, one scale-padding to the right
|
||
of the trough, and moves it with the thumb. The thumb's centre travels from
|
||
one padding-plus-half-a-thumb below the top to the same above the bottom,
|
||
counted from the TOP because wxSL_INVERSE puts the maximum there. */
|
||
.ze-slider.vertical .ze-slider-val {
|
||
position: absolute;
|
||
left: calc(2 * var(--slider-track-inset) + var(--slider-track-height));
|
||
width: var(--slider-label-w);
|
||
/* `gtk_scale_draw_value` places the layout at the right edge of the trough
|
||
area whatever the text is, so a one-digit value sits where a three-digit
|
||
one starts rather than being centred under it. */
|
||
text-align: left;
|
||
top: calc(
|
||
var(--slider-track-inset) +
|
||
var(--slider-thumb-size) /
|
||
2 +
|
||
(1 - var(--slider-frac)) *
|
||
(100% - 2 * var(--slider-track-inset) - var(--slider-thumb-size))
|
||
);
|
||
transform: translateY(-50%);
|
||
pointer-events: none;
|
||
}
|
||
/* The two range labels: their own box, to the right of the scale, one at each
|
||
end of the SLIDER's height rather than of the trough's - the probe puts them
|
||
at local y=0 and y=height-18, above and below the trough's 12 px inset.
|
||
`column-reverse` is wxSL_INVERSE: the minimum is first in the DOM and lands
|
||
at the bottom. They are GtkLabels at their default xalign, so centred. */
|
||
.ze-slider.vertical .ze-slider-ends {
|
||
position: absolute;
|
||
top: 0;
|
||
bottom: 0;
|
||
left: calc(2 * var(--slider-track-inset) + var(--slider-track-height) + var(--slider-label-w));
|
||
/* The horizontal rule pins both edges; here the column is placed from the
|
||
left and sized, so the inherited `right` has to be let go of. */
|
||
right: auto;
|
||
width: var(--slider-label-w);
|
||
display: flex;
|
||
flex-direction: column-reverse;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* A wxRadioButton is DRAWN here rather than left to the engine. GTK paints a
|
||
filled disc with a white centre; Chrome's accent-color paints an outline
|
||
ring with a coloured dot inside it, so the two read differently at a glance
|
||
however the accent is set. [px] measured on a live pcb_calculator:
|
||
16x16 overall; unchecked = rgb(57,57,57) inside a 1 px rgb(25,25,25) ring;
|
||
checked = solid rgb(233,84,32), no ring, with a 6 px white dot centred
|
||
(x 676..679 of a control at 670..685). */
|
||
.ze-app input[type="radio"] {
|
||
appearance: none;
|
||
width: var(--check-size);
|
||
height: var(--check-size);
|
||
flex: none;
|
||
border: 1px solid var(--check-border);
|
||
border-radius: 50%;
|
||
background: var(--check-face);
|
||
}
|
||
|
||
.ze-app input[type="radio"]:checked {
|
||
border-color: var(--chrome-active);
|
||
background:
|
||
radial-gradient(
|
||
circle at 50% 50%,
|
||
var(--check-mark) 0,
|
||
var(--check-mark) calc(var(--radio-dot) / 2),
|
||
transparent calc(var(--radio-dot) / 2 + 0.5px)
|
||
),
|
||
var(--chrome-active);
|
||
}
|
||
|
||
.ze-app input[type="radio"]:disabled {
|
||
background: var(--ctl-face-disabled, var(--check-face));
|
||
}
|
||
/* The same Yaru rule, which names the radio alongside the check. The dot stays
|
||
— it is what says "checked" — but it is --ctl-fg-disabled, not white on
|
||
orange. Without this the rule above flattened a checked disabled radio to a
|
||
plain grey disc and the dot vanished entirely. */
|
||
.ze-app input[type="radio"]:checked:disabled {
|
||
border-color: var(--ctl-border);
|
||
background:
|
||
radial-gradient(
|
||
circle at 50% 50%,
|
||
var(--ctl-fg-disabled) 0,
|
||
var(--ctl-fg-disabled) calc(var(--radio-dot) / 2),
|
||
transparent calc(var(--radio-dot) / 2 + 0.5px)
|
||
),
|
||
var(--ctl-face-disabled);
|
||
}
|
||
/* The list a <select> opens is a native popup: `color-scheme` handles most
|
||
engines, and these keep the rows on KiCad's grey where it does not. */
|
||
.ze-app option,
|
||
.ze-app optgroup {
|
||
background: var(--chrome-bg);
|
||
color: var(--chrome-fg);
|
||
}
|
||
|
||
* {
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
/* A `select`'s POPUP is the browser's to paint, and it paints the highlighted
|
||
row its own blue unless the page names an accent. GTK paints it
|
||
`wxSYS_COLOUR_HIGHLIGHT` — Yaru's #e95420, which --chrome-active already
|
||
holds — so that is what the popup gets.
|
||
|
||
Only `select`. A checkbox and a radio are DRAWN in this stylesheet rather
|
||
than accented, for the reason recorded beside them: `accent-color` gets the
|
||
fill right, but the browser picks its own contrast colour for the tick and
|
||
Chrome picks BLACK where GTK strokes white. That was measured against a live
|
||
GerbView; naming an accent for them here would quietly re-open it. */
|
||
.ze-app select {
|
||
accent-color: var(--chrome-active);
|
||
}
|
||
|
||
.ze-app {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
/* The shell root every launcher inherits from, so it must be the TOKEN and
|
||
not a literal. It hardcoded `13px` and a "Segoe UI" stack while
|
||
`--ui-font-size` (11pt = 14.667px, wxSYS_DEFAULT_GUI_FONT) and
|
||
`--ui-font-family` sat unused two hundred lines above — the same shape as
|
||
the drawing sheet's hardcoded metrics, but at the top of the app.
|
||
Nothing renders at 13px today because every launcher overrides it; the
|
||
cost was that anything NEW inheriting the root got 13px and a Windows font
|
||
rather than what KiCad asks GTK for. Measured: `system-ui` resolves to
|
||
Ubuntu Sans here and "General system design" advances 147.5px against
|
||
KiCad's measured 147px ink, so the token is already the right answer. */
|
||
font: var(--ui-font-size) / 1.3 var(--ui-font-family);
|
||
color: var(--chrome-fg);
|
||
user-select: none;
|
||
/* `cursor` inherits, so with no `pointer` left anywhere this one declaration
|
||
is what keeps every descendant on the arrow - including elements that
|
||
would otherwise fall back to `auto` and turn into an I-beam over text. */
|
||
cursor: default;
|
||
}
|
||
/* A `.ze-app` with no box of its own, for a window App opens over whichever frame asked (the
|
||
library tables): the root's font and every element rule under `.ze-app` reach it, while the
|
||
window places itself. */
|
||
.ze-app.ze-app-detached {
|
||
display: contents;
|
||
}
|
||
|
||
/* Menu bar */
|
||
.ze-menubar {
|
||
display: flex;
|
||
align-items: stretch;
|
||
background: var(--chrome-bg);
|
||
/* Sampled off the real frame: the rule under the menu bar is #282828, a
|
||
shade lighter than a window border. --chrome-border read as black here. */
|
||
border-bottom: 1px solid #282828;
|
||
height: 26px;
|
||
position: relative;
|
||
}
|
||
/* GTK draws menu-bar labels at the default GUI font with 8px of padding either
|
||
side: measured against a real KiCad menu bar, that puts every label within a
|
||
pixel or two of where the desktop app has it. [gtk] a live GtkMenuBar and its
|
||
GtkMenuItem both report `get_preferred_height() == 26`, which is --menu-row.
|
||
|
||
NOTE the drop-down INHERITS this. `.ze-dropdown` is rendered inside the
|
||
`.ze-menu` it fell out of (MenuBar.tsx:315-330), so it, `.ze-mitem` and
|
||
`.ze-mitem .sc` all compute at --ui-font-size - and the last two set it
|
||
explicitly besides. The comment that used to sit here said the drop-downs
|
||
"still run at the shell's 13px"; that was stale, and it is what the Drawing
|
||
Sheet audit's "our menubar is 13px" (FINDINGS-A3 D7) repeated. MEASURED, in
|
||
the running app and again in a headless probe of this stylesheet: every one
|
||
of those elements computes 14.6667px. What DOES report 13px is `.ze-menubar`
|
||
itself - the flex container, which holds no text of its own and so inherits
|
||
`.ze-app`'s 13px. Measure the `.ze-menu` child, not the bar. */
|
||
.ze-menubar .ze-menu {
|
||
padding: 0 8px;
|
||
font-size: var(--ui-font-size);
|
||
/* GTK's menu label peaks at 247, not 255 (the tree really is pure white). */
|
||
color: var(--chrome-fg);
|
||
display: flex;
|
||
align-items: center;
|
||
cursor: default;
|
||
}
|
||
/* No hover prelight on a menu bar item: the only state one shows is open (the
|
||
#4a4a4a fill plus the accent rule below). We were tinting it grey the moment
|
||
the pointer crossed it, which reads as a web menu, not a GTK one. */
|
||
/* Branding, menus and window context share one row in the browser workspace. */
|
||
.ze-framechrome {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-menubar-title {
|
||
align-self: center;
|
||
min-width: 0;
|
||
margin-left: auto;
|
||
padding: 0 12px;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
color: var(--chrome-fg-muted);
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
.ze-menubar-right {
|
||
display: flex;
|
||
align-items: center;
|
||
flex: 0 0 auto;
|
||
margin-left: auto;
|
||
padding-right: 8px;
|
||
}
|
||
.ze-titlebar {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
position: relative;
|
||
height: var(--titlebar-height);
|
||
padding: 0 8px;
|
||
background: var(--titlebar-bg);
|
||
border-bottom: 1px solid var(--titlebar-rule);
|
||
/* Pin the line box to the strip so the glyphs sit on a known baseline rather
|
||
than on whatever leading the inherited line-height would add. */
|
||
line-height: var(--titlebar-height);
|
||
}
|
||
/* Centred on the frame, not on the space left over by the home link — a WM
|
||
centres the title on the title bar itself. */
|
||
/* The right end of the title bar. `.ze-titlebar` is a flex row whose title is
|
||
absolutely centred, so this cannot push the title off centre, and `auto` is
|
||
the whole rule -- the row's own 6px gap already spaces whatever sits here. */
|
||
/* Share, and the panel that hangs off it. See `home/ShareButton.tsx`: anchored
|
||
to the button rather than raised in the middle of the screen, so the thing
|
||
you asked for appears where you asked for it.
|
||
|
||
Everything here is stated in `em` and in tokens: the panel tracks
|
||
`--ui-font-size` and takes its ink from the same three chrome variables every
|
||
other popup does, so there is no pixel here for a theme change to leave
|
||
behind. `--titlebar-height` places it clear of the bar it hangs from. */
|
||
.ze-share-anchor {
|
||
position: relative;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.ze-share-pop {
|
||
position: absolute;
|
||
top: 100%;
|
||
/* Right-aligned, because the button is at the right end of the title bar and
|
||
a left-aligned panel would run off the window. */
|
||
right: 0;
|
||
z-index: 200;
|
||
/* Wide enough for a full address beside a role and a remove -- the rows
|
||
ellipsize rather than wrap, and an address cut in half is the one thing a
|
||
roster must not do. */
|
||
width: 29em;
|
||
max-width: 90vw;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0.75em;
|
||
padding: 0.85em 1em;
|
||
color: var(--chrome-fg);
|
||
background: var(--chrome-bg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 0.5em;
|
||
box-shadow: var(--popup-shadow);
|
||
}
|
||
/* The panel's own heading. Weight only, no size: KiCad has no oversized text
|
||
anywhere in its chrome, and a new font-size value here would be the
|
||
thirtieth in a tree that is supposed to key on `--ui-font-size`. */
|
||
.ze-share-title {
|
||
font-weight: 600;
|
||
}
|
||
/* "People with access", "General access" -- the two sections, named the way
|
||
every tool that does this names them. Dim and small, because they label
|
||
rather than say anything. */
|
||
.ze-share-heading {
|
||
font-size: var(--ui-font-size-small);
|
||
font-weight: 600;
|
||
opacity: 0.65;
|
||
}
|
||
.ze-share-invite {
|
||
display: flex;
|
||
gap: 0.4em;
|
||
align-items: center;
|
||
}
|
||
.ze-share-invite input {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.ze-share-people {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0.35em;
|
||
/* A project with twenty people scrolls rather than growing the panel past the
|
||
window. */
|
||
max-height: 14em;
|
||
overflow-y: auto;
|
||
}
|
||
.ze-share-person {
|
||
display: flex;
|
||
gap: 0.6em;
|
||
align-items: center;
|
||
padding: 0.2em 0.35em;
|
||
/* Negative on the row's own inset so a hover reaches the panel's padding
|
||
rather than stopping short of it, the way a menu row does. */
|
||
margin: 0 -0.35em;
|
||
border-radius: 0.3em;
|
||
}
|
||
.ze-share-person:hover {
|
||
background: var(--content-bg);
|
||
}
|
||
/* The same monogram the account button draws, at text size: a person in a list
|
||
is identified the way a person in the corner is. The disc's colour is set
|
||
inline from the address (auth/avatar_color.ts, the reference's palette);
|
||
the initial on it is the reference's white, bold - and at the text size,
|
||
which on a 2em disc is the reference's half. */
|
||
.ze-share-monogram {
|
||
flex: none;
|
||
width: 2em;
|
||
height: 2em;
|
||
border-radius: 50%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--avatar-fg);
|
||
font-weight: bold;
|
||
}
|
||
.ze-share-person .lbl {
|
||
flex: 1;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-share-remove {
|
||
flex: none;
|
||
font: inherit;
|
||
color: var(--chrome-fg);
|
||
background: transparent;
|
||
border: 0;
|
||
cursor: pointer;
|
||
}
|
||
.ze-share-link {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0.5em;
|
||
border-top: 1px solid var(--chrome-border);
|
||
padding-top: 0.85em;
|
||
}
|
||
.ze-share-linkrow {
|
||
display: flex;
|
||
gap: 0.4em;
|
||
}
|
||
.ze-share-linkrow input {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.ze-titlebar-right {
|
||
margin-left: auto;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.ze-titlebar-title {
|
||
position: absolute;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
pointer-events: none;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
color: var(--titlebar-fg);
|
||
font-size: var(--titlebar-font-size);
|
||
font-weight: var(--titlebar-font-weight);
|
||
}
|
||
.ze-titlebar-title b {
|
||
color: var(--titlebar-fg);
|
||
font-weight: var(--titlebar-font-weight);
|
||
}
|
||
/* Toolbars */
|
||
/* An ACTION_TOOLBAR is a wxAuiToolBar, and a wxAuiToolBar fills itself with
|
||
`wxSYS_COLOUR_BTNFACE` — which wxGTK resolves by asking a real GtkButton for
|
||
its background, NOT by reading GTK's own `toolbar` node. Those two disagree
|
||
in Yaru: `toolbar` is #2c2c2c (the same as the menu bar) while `button` is
|
||
`image(#373737)`, so a KiCad toolbar reads a step LIGHTER than the menu bar
|
||
above it. That is --ctl-face, the token the buttons and combos already take.
|
||
|
||
[px] GerbView with no file loaded, 1920x1200: the whole toolbar block —
|
||
both stacked rows AND the left vertical strip — samples #373737, against
|
||
#2c2c2c for the menu bar and the status bar. Ours had --chrome-bg here, so
|
||
the bar vanished into the menu bar and the canvas.
|
||
|
||
The token is --content-bg, the wxAUI FRAME background, not --ctl-face: they
|
||
carry the same #373737, but the strip is a docked pane and the face is a
|
||
button, and conflating them would make a later change to either move the
|
||
other. That reasoning and the pl_editor measurement behind it are D3 below,
|
||
which said the shared change was "waiting on measurements" from a second
|
||
frame. GerbView is that second frame, so the rule moves here and D3's
|
||
`.ze-wks .ze-toolbar` background override goes. */
|
||
.ze-toolbar {
|
||
display: flex;
|
||
align-items: center;
|
||
background: var(--content-bg);
|
||
gap: 1px;
|
||
/*
|
||
* A wxAuiToolBar does not grow past its pane. It keeps its size, drops the
|
||
* tools that do not fit, and shows a chevron
|
||
* (`ACTION_TOOLBAR`'s `SetOverflowVisible( !GetToolBarFits() )`).
|
||
*
|
||
* `min-height: 0` is the load-bearing half for a VERTICAL bar: a flex item
|
||
* defaults to `min-height: auto`, which is its content height, so a column of
|
||
* buttons taller than the window refused to shrink and pushed the whole
|
||
* application into a scroll — with Large icons the right toolbar's last
|
||
* buttons ended up under the status bar. `overflow: hidden` then clips
|
||
* whatever the measurement in `Toolbar.tsx` has not caught up with yet, so
|
||
* there is no frame in which a half-button is drawn.
|
||
*/
|
||
min-width: 0;
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
}
|
||
/* `wxAuiDefaultToolBarArt::DrawOverflowButton`, the chevron that appears at the
|
||
end of a bar that does not fit.
|
||
|
||
[px] `wxAUI_TBART_OVERFLOW_SIZE` is 16 on this machine, read off a live
|
||
`wxAuiToolBar` by `qa/probes/aui_overflow_probe.cpp` — the same probe dumps
|
||
the glyph (a 7px bar over a 7->1 triangle) and shows the hover state is the
|
||
ordinary button highlight, which `.ze-tbtn` already draws.
|
||
|
||
It is 16 ALONG the bar and the button's own width across it, because that is
|
||
what the art provider is given: `wxRect( … , overflowSize, barHeight )`. */
|
||
.ze-toolbar.horizontal > .ze-tb-overflow {
|
||
/* [px] `GetElementSize( wxAUI_TBART_OVERFLOW_SIZE )` = 16. */
|
||
width: 16px;
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-toolbar.vertical > .ze-tb-overflow {
|
||
/* [px] the same 16, along the vertical bar's own axis. */
|
||
height: 16px;
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-tb-overflow > svg {
|
||
/* [px] `m_overflowBmp` is a 16x16 bitmap, drawn centred in that rect. */
|
||
width: 16px;
|
||
/* [px] the same bitmap. */
|
||
height: 16px;
|
||
}
|
||
/* No height: a wxAuiToolBar is as tall as its tallest tool. [px] GerbView's
|
||
TOP_AUX row is 36 px around a 34 px combo (y 135..168 bordered, row 135..170)
|
||
— that is --ctl-height plus one pixel of toolbar above and below. Ours said
|
||
32 px, which SQUEEZED every toolbar combo to 31 px: measured 201..231 where
|
||
KiCad's is 34. The row is its content, the way .ze-modal is Fit(). */
|
||
.ze-toolbar.horizontal {
|
||
flex-direction: row;
|
||
padding: 1px 4px;
|
||
flex-wrap: nowrap;
|
||
overflow-x: auto;
|
||
}
|
||
/* The dock edge, on the LAST horizontal row rather than on each one. Every row
|
||
used to carry `border-bottom: 1px solid var(--chrome-border)`, which drew a
|
||
near-black rule between TOP_MAIN and TOP_AUX that KiCad does not have: its
|
||
two rows are one continuous face. See --aui-pane-border for the sample. */
|
||
.ze-toolbar.horizontal:not(:has(+ .ze-toolbar.horizontal)) {
|
||
border-bottom: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
}
|
||
/* No width either: [px] GerbView's left strip is x 66..99 = 34 px around a
|
||
30 px button at 68..97, i.e. --toolbar-button-size in 2 px of toolbar. Ours
|
||
said 32, one pixel narrower than the button it holds.
|
||
|
||
The -1px covers the horizontal block's dock edge in this strip's own column.
|
||
That edge is real where a toolbar meets CONTENT — [px] a live pl_editor at
|
||
x=1000 (canvas) and x=1850 (properties pane) both show #373737 to y=132 then
|
||
one #292929 at y=133 — and absent where a vertical toolbar is docked under
|
||
it: the same capture at x=84 runs unbroken #373737 through the seam. Two
|
||
docked toolbars butt together; only content is fenced off. Ours drew the
|
||
edge across the full width, so a black rule cut the left strip away from the
|
||
bar above it. */
|
||
.ze-toolbar.vertical {
|
||
margin-top: -1px;
|
||
flex-direction: column;
|
||
padding: 4px 2px;
|
||
}
|
||
/* The same dock edge as the horizontal block's, and for the same reason: a
|
||
vertical strip meets the canvas, not another toolbar. [px] scanned across a
|
||
live GerbView at y=500 — face #373737 to x=99, then ONE #292929, then the
|
||
canvas. Ours drew --chrome-border (#1e1e1e) there, which reads as a black
|
||
rule breaking the strip away from the bars above and below it. */
|
||
.ze-toolbar.vertical.left {
|
||
border-right: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
}
|
||
.ze-toolbar.vertical.right {
|
||
border-left: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
}
|
||
|
||
.ze-tbtn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: var(--toolbar-button-size);
|
||
height: var(--toolbar-button-size);
|
||
border: 1px solid transparent;
|
||
border-radius: 3px;
|
||
color: var(--chrome-fg);
|
||
background: transparent;
|
||
cursor: default;
|
||
flex: 0 0 auto;
|
||
padding: 0;
|
||
}
|
||
/* Hover is the SAME rectangle as checked — `ChangeLightness( 40 )` with a 1px
|
||
accent pen — not a flat grey. We painted `--chrome-hover` #3a3a3a with a grey
|
||
border, which is why our toolbars did not light up the way KiCad's do. */
|
||
.ze-tbtn:not(.disabled):not(:disabled):hover {
|
||
background: var(--accent-fill-checked);
|
||
box-shadow: inset 0 0 0 1px var(--chrome-active);
|
||
border-color: transparent;
|
||
}
|
||
/* "Checked items need a lighter hover rectangle" — bitmap_button.cpp:300-302. */
|
||
.ze-tbtn.active:not(.disabled):not(:disabled):hover,
|
||
.ze-lp-iconbtn.checked:not(:disabled):hover {
|
||
background: var(--accent-fill-hover-checked);
|
||
}
|
||
/* wxCONTROL_PRESSED, the darkest of the three. */
|
||
.ze-tbtn:not(.disabled):not(:disabled):active {
|
||
background: var(--accent-fill-pressed);
|
||
}
|
||
.ze-tbtn.disabled,
|
||
.ze-tbtn:disabled {
|
||
cursor: default;
|
||
}
|
||
/* The bitmap is what is disabled, not the button: a checked tool keeps its
|
||
rectangle. */
|
||
.ze-tbtn.disabled > *,
|
||
.ze-tbtn:disabled > * {
|
||
filter: var(--bitmap-disabled-filter);
|
||
}
|
||
.ze-tbtn.disabled:hover,
|
||
.ze-tbtn:disabled:hover {
|
||
background: transparent;
|
||
}
|
||
/* A checked tool is NOT a solid block of the accent. `BITMAP_BUTTON::OnPaint`
|
||
fills the button with `wxSYS_COLOUR_HIGHLIGHT.ChangeLightness( 40 )` — each
|
||
channel scaled to 40%, so #e95420 becomes #5d220d — and outlines it 1px in
|
||
the highlight colour itself. Measured off a real Schematic Editor with the
|
||
selection tool checked: fill rgb(93,33,12) against our rgb(233,84,32).
|
||
|
||
The same rectangle, from the same wx code, is already derived for the
|
||
project manager's launcher hover (`.ze-launcher .ico:hover`) — this is that
|
||
value shared rather than a second one, which is why it is a token.
|
||
|
||
`.ze-lp-iconbtn` is the bold/italic/alignment bar the text, label and field
|
||
dialogs carry. Upstream those are `BITMAP_BUTTON`s too, so they are painted
|
||
by the same `OnPaint` and get the same rectangle. It had its own rule
|
||
filling the button with `--chrome-active` outright — the raw #e95420, not
|
||
the checked fill — which read as a solid orange block beside every other
|
||
toggle in the app. */
|
||
.ze-tbtn.active,
|
||
.ze-lp-iconbtn.checked {
|
||
background: var(--accent-fill-checked);
|
||
box-shadow: inset 0 0 0 1px var(--chrome-active);
|
||
border-color: transparent;
|
||
}
|
||
.ze-tbtn img {
|
||
width: var(--toolbar-icon-size);
|
||
height: var(--toolbar-icon-size);
|
||
}
|
||
|
||
/* ACTION_TOOLBAR group button: triangle in the bottom-right corner
|
||
(side ≈ button height / 5) marking that a long-press opens a palette. */
|
||
.ze-tb-groupwrap {
|
||
position: relative;
|
||
display: inline-flex;
|
||
flex: 0 0 auto;
|
||
color: var(--chrome-fg);
|
||
}
|
||
.ze-tb-arrow {
|
||
position: absolute;
|
||
right: 1px;
|
||
bottom: 1px;
|
||
width: 6px;
|
||
height: 6px;
|
||
background: currentColor;
|
||
clip-path: polygon(100% 0, 100% 100%, 0 100%);
|
||
pointer-events: none;
|
||
}
|
||
.ze-tb-arrow.disabled {
|
||
opacity: 0.35;
|
||
}
|
||
|
||
/* A toolbar CONTROL slot (TOOLBAR_CONFIGURATION::AppendControl), e.g. the
|
||
symbol viewer's unit / body-style wxChoice, 150 px wide upstream. */
|
||
.ze-tb-control {
|
||
display: inline-flex;
|
||
flex: 0 0 auto;
|
||
align-items: center;
|
||
padding: 0 2px;
|
||
}
|
||
/* PCB_LAYER_BOX_SELECTOR's swatch-and-name pair (pcb_layer_box_selector.cpp:57)
|
||
and the wxCheckBox overrideLocks adds (eda_draw_frame.cpp:240). Both are
|
||
laid out by `.ze-tb-control`, which is already inline-flex and centred, so
|
||
neither states anything here.
|
||
|
||
The gap between a swatch and its label, and between a checkbox indicator and
|
||
its label, are both GTK's. The checkbox one is now measured and is
|
||
--check-inset: Gtk.CheckButton was asked for its style properties and its
|
||
label child's allocation, so the 6px written here on the way past would have
|
||
been wrong by 2. The swatch one is still unmeasured, and sampling it wants a
|
||
rendered menu edge-on, the same probe the menu and tooltip border widths are
|
||
waiting on.
|
||
Neither is stated here regardless: the slot's own padding spaces them, and
|
||
the pair below only needs to sit on one line — which is layout, carrying no
|
||
number at all. */
|
||
.ze-tb-layerbox {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
}
|
||
/* A wxStaticText sitting in a toolbar: GerbView's "Cmp: ", "Net:", "Attr:"
|
||
and "DCode:" labels (`gerbview/toolbars_gerber.cpp:180,201,222,247`). It is a
|
||
plain GTK label, so it states no colour, no size and no face of its own -
|
||
only that it must not wrap or be squeezed by the flex strip. `font: inherit`
|
||
is here because a bare element otherwise takes the user-agent font. */
|
||
.ze-tb-label {
|
||
flex: 0 0 auto;
|
||
font: inherit;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* A read-only wxTextCtrl in a toolbar - GerbView's `m_TextInfo`, created with
|
||
wxTE_READONLY (`gerbview/toolbars_gerber.cpp:161-162`). An entry, so it takes
|
||
the entry tokens.
|
||
|
||
It is NOT greyed, which is what this rule said before. wxTE_READONLY maps to
|
||
`gtk_editable_set_editable( FALSE )`, and that leaves the widget's state flags
|
||
alone - only `set_sensitive( FALSE )` sets GTK_STATE_FLAG_INSENSITIVE. Asked
|
||
directly (~/gerbview-notes/entry_bg.py): a normal entry and a set_editable
|
||
(FALSE) entry both report fg #ffffff, where an insensitive one reports
|
||
#929292, which is --ctl-fg-disabled. So a read-only entry keeps ordinary
|
||
text; only an insensitive one dims.
|
||
|
||
[px] that same measurement puts the entry background at #272727 and the height
|
||
at 34 (= --ctl-height). --field-bg is #282828 and its own comment calls that a
|
||
sample of a live wxTextCtrl; the drawing-sheet session independently sampled
|
||
#272727 off a live GerbView. Two measurements against one, but --field-bg is
|
||
shared by every launcher, so it stays on the token here and the discrepancy is
|
||
raised rather than resolved by one control's evidence. */
|
||
.ze-tb-textinfo {
|
||
flex: 0 0 auto;
|
||
/* [px] built empty and wxDefaultSize (toolbars_gerber.cpp:163-165), so its
|
||
width is wx's own default for an empty read-only wxTextCtrl, not a number
|
||
anybody chose: qa/probes/gerbview_toolbar_probe.cpp reports best 98 x 34,
|
||
and the real GerbView's box measures about 97. It is a FLOOR rather than a
|
||
fixed width — KIUI::EnsureTextCtrlWidth (common/widgets/ui_common.cpp:174)
|
||
widens it to the text plus 10 px when a string does not fit, and never
|
||
shrinks it back. The caller applies that; this is where it starts. */
|
||
width: var(--gbr-textinfo-width);
|
||
/* Everything else - the fill, the border, the radius, the horizontal padding
|
||
and the font - is what a GTK entry already is, so this rule states none of
|
||
it. It used to restate all five and get beaten by `.ze-app input` anyway,
|
||
which is why they were only ever decorative. `height` stays because it is
|
||
this control's, not the entry's: wx built it at wxDefaultSize and the probe
|
||
reports 34 (--ctl-height).
|
||
|
||
Note that the width is a BORDER-box width, which is what makes the tail of
|
||
a long string clip exactly as KiCad's does: EnsureTextCtrlWidth sizes the
|
||
control to the text plus 10 and the entry then spends 8 px of padding on
|
||
each side, so a real GerbView shows `fmt: mm X3.3 Y3.3 no T` with the Z
|
||
cut off. */
|
||
height: var(--ctl-height);
|
||
}
|
||
|
||
/* AddSpacer: blank run along the bar's own axis, sized by the call site. */
|
||
.ze-tb-spacer {
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.ze-tb-choice {
|
||
width: 150px;
|
||
height: 24px;
|
||
padding: 0 4px;
|
||
background: var(--chrome-bg2);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 3px;
|
||
font: inherit;
|
||
font-size: 12px;
|
||
}
|
||
.ze-tb-choice:disabled {
|
||
opacity: 0.5;
|
||
}
|
||
|
||
/* ACTION_TOOLBAR_PALETTE: the flyout with the rest of a group's actions,
|
||
perpendicular to the toolbar. 4px border around the buttons, 1px between. */
|
||
.ze-tb-palette {
|
||
position: fixed;
|
||
z-index: 100;
|
||
display: flex;
|
||
padding: 4px;
|
||
gap: 2px;
|
||
background: var(--chrome-bg);
|
||
border: 1px solid var(--chrome-border);
|
||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
|
||
}
|
||
.ze-tb-palette.horizontal {
|
||
flex-direction: row;
|
||
}
|
||
.ze-tb-palette.vertical {
|
||
flex-direction: column;
|
||
}
|
||
.ze-tb-palette .ze-tbtn {
|
||
width: var(--toolbar-button-size);
|
||
height: var(--toolbar-button-size);
|
||
}
|
||
|
||
/* A wxAuiToolBar separator. Only used by Toolbar.tsx, and the same art in both
|
||
orientations, so the colour lives here rather than on each. */
|
||
.ze-sep {
|
||
flex: 0 0 auto;
|
||
background: var(--toolbar-separator);
|
||
}
|
||
.ze-toolbar.horizontal .ze-sep {
|
||
width: 1px;
|
||
/* [px] sampled off a live GerbView (2026-08-21): all three separators in the
|
||
TOP_MAIN row are one pixel of #5f5f5f running y 102..126 — 25 px, inside a
|
||
row whose face runs y 95..139. Ours drew 20 px of --chrome-border (#1e1e1e),
|
||
which is nearly black on a #373737 face where upstream's reads light. */
|
||
height: 25px;
|
||
margin: 0 3px;
|
||
}
|
||
.ze-toolbar.vertical .ze-sep {
|
||
height: 1px;
|
||
/* The horizontal row is what was measured (25 px); this is the same
|
||
separator turned, so it takes the same length rather than keeping a 20 no
|
||
one measured either. */
|
||
width: 25px;
|
||
margin: 3px 0;
|
||
}
|
||
|
||
/* Body: left tb | left panel | canvas | right panel | right tb */
|
||
.ze-body {
|
||
flex: 1;
|
||
display: flex;
|
||
min-height: 0;
|
||
}
|
||
/* `EDA_PANE().Canvas()` is `PaneBorder( true )` (eda_base_frame.h:975-981), so
|
||
wxAUI fences the canvas off on all four sides with --aui-pane-border. Three
|
||
of those sides are already drawn from the other direction, by the toolbar
|
||
that sits against them (.ze-toolbar.horizontal's bottom and
|
||
.ze-toolbar.vertical's left/right) — the bottom is the one edge with no
|
||
toolbar beside it, so it is stated here.
|
||
|
||
It is on the wrap and not on the message panel below because the border is
|
||
the CANVAS pane's: it stops where the canvas stops. [px] pcbnew at y=1140:
|
||
#292929 from x=405 to x=1631 and #373737 either side of that, over the
|
||
toolbars and the docked panes. */
|
||
.ze-canvas-wrap {
|
||
flex: 1;
|
||
border-bottom: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
min-width: 0;
|
||
/* A flex item defaults to `min-height: auto`, which is its CONTENT height, so
|
||
this refused to shrink: the moment an infobar appeared above the canvas the
|
||
column overflowed downward and carried the status bar off the bottom of the
|
||
window. Only `position: relative` is added here, not `display: flex` - the
|
||
canvas inside is absolutely positioned against this box and laying it out
|
||
as a flex column changes what size it is given. */
|
||
min-height: 0;
|
||
position: relative;
|
||
}
|
||
|
||
/* Panels */
|
||
.ze-panel {
|
||
width: 220px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: var(--panel-bg);
|
||
}
|
||
.ze-panel.left {
|
||
border-right: 1px solid var(--chrome-border);
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-panel.right {
|
||
border-left: 1px solid var(--chrome-border);
|
||
}
|
||
/* A docked pane's caption, drawn by WX_AUI_DOCK_ART (wx_aui_art_providers.cpp).
|
||
It subclasses wxAuiDefaultDockArt and, off Windows, keeps that class's
|
||
defaults: a 17px caption bar and the 8pt *normal weight* caption font. KiCad
|
||
only overrides the text colour (to wxSYS_COLOUR_BTNTEXT, i.e. undimmed) and
|
||
kills the gradient, so the fill is flat. Ours was a 26px bold 12px bar. */
|
||
.ze-panel-header {
|
||
/* [px] wxAUI_DOCKART_CAPTION_SIZE, 17 (qa/probes/aui_sash_probe.cpp), and a
|
||
live pcbnew agrees at three captions: Properties, Appearance and Selection
|
||
Filter all fill y 171..187. It said 18 while it also drew a rule under
|
||
itself; the rule has gone to the control it belongs to, so the strip is
|
||
the caption alone. */
|
||
min-height: 17px;
|
||
display: flex;
|
||
align-items: center;
|
||
/* The caption's close box sits at the far end. Every `EDA_PANE().Palette()`
|
||
asks for one - `.CloseButton( true )` on the hierarchy
|
||
(sch_edit_frame.cpp:264), on Properties and on the Selection Filter
|
||
(eeschema_settings.cpp:100, :120) - and a caption with a single child is
|
||
unaffected by this. */
|
||
justify-content: space-between;
|
||
/* 3px of lead-in, not 8. Measured on the real caption: the pane's left edge
|
||
is x=100 and the caption's first ink is x=103, so the title starts hard
|
||
against the edge. There is no side rule on the caption row either — the
|
||
frame belongs to the control below it (see .ze-lhist-head). */
|
||
padding: 0 3px;
|
||
font-weight: 400;
|
||
font-size: 8pt;
|
||
background: var(--panel-header);
|
||
/* And no rule UNDER it either, for the same reason: the line beneath a
|
||
caption is the top edge of whatever control fills the pane, so it starts
|
||
and stops where that control does. [px] pcbnew 1920x1200, three panes
|
||
down one column each: Properties at x=345, Appearance at x=1900 and
|
||
Selection Filter at x=1900 all go straight from the caption's #2e2e2e to
|
||
the pane body with nothing between. This carried
|
||
`border-bottom: 1px solid var(--ctl-border)`, so a pane whose control is
|
||
inset — the Properties pane, whose wxPropertyGrid sits 28px below the
|
||
caption behind the wxStaticText — drew the control's frame in the wrong
|
||
place, one line high on the caption and none around the grid. */
|
||
}
|
||
.ze-panel-body {
|
||
padding: 6px 8px;
|
||
overflow: auto;
|
||
flex: 1;
|
||
/* Let the body shrink below its content height so it scrolls internally
|
||
instead of pushing the pane (and the docked panels below it) taller. */
|
||
min-height: 0;
|
||
}
|
||
|
||
/* A row in a wxTreeCtrl takes the CONTROL font and nothing else.
|
||
`m_treebook->SetFont( KIUI::GetControlFont( this ) )`
|
||
(common/widgets/paged_dialog.cpp:72) is `getGUIFont( win, 0 )` - 11 pt /
|
||
14.67 px, the same font as everything else in the dialog - and that file has
|
||
no `SetItemBold`, no per-item font and no per-item colour. Parent rows, child
|
||
rows and the selected row are all one font at one weight.
|
||
|
||
This stated `font-size: 13px`, which is why our whole tree read smaller than
|
||
KiCad's, and `.root` / `.active` below each added a `font-weight: 700` that
|
||
upstream does not have. Measured on Akshay's capture, the selected row is
|
||
17.2% ink against 19.7-20.8% for the unselected ones - bold cannot cover
|
||
LESS, so the selection is not emboldened. */
|
||
.ze-tree-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 3px 5px;
|
||
border-radius: 3px;
|
||
cursor: default;
|
||
color: var(--view-fg);
|
||
white-space: nowrap;
|
||
}
|
||
.ze-tree-item img {
|
||
width: 18px;
|
||
height: 18px;
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-tree-item:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-tree-item.active {
|
||
background: var(--chrome-active);
|
||
color: #fff;
|
||
}
|
||
.ze-tree-item.root {
|
||
font-weight: inherit;
|
||
}
|
||
/* KiCad's native GTK/Adwaita disclosure arrow: a thin chevron outline (not a
|
||
filled triangle) that rotates from pointing right (collapsed) to down. */
|
||
/* The disclosure chevron. Declared without an ancestor so every tree-ish
|
||
expander in the app is the same mark — the project tree, the net navigator and
|
||
the fields table's group rows — rather than a mix of chevrons and solid
|
||
triangles. */
|
||
.twisty {
|
||
position: relative;
|
||
display: inline-block;
|
||
width: 12px;
|
||
height: 12px;
|
||
flex: 0 0 auto;
|
||
}
|
||
/* GTK's expander, measured off the real tree: the arms span 11px and stand 6px
|
||
proud - 6x11 collapsed, 11x6 open. The 5px square we had rendered 8x5, a
|
||
visibly smaller and thinner chevron than the one KiCad draws. GTK paints one
|
||
expander for every tree, so the two scoped copies below match. */
|
||
.twisty.expandable::before {
|
||
content: "";
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
width: 7px;
|
||
height: 7px;
|
||
border-top: 1.5px solid #b8bcc2;
|
||
border-right: 1.5px solid #b8bcc2;
|
||
transform: translate(-65%, -50%) rotate(45deg);
|
||
transition: transform 0.1s ease;
|
||
}
|
||
.twisty.expandable.open::before {
|
||
transform: translate(-50%, -70%) rotate(135deg);
|
||
}
|
||
|
||
.ze-tree-spacer {
|
||
display: inline-block;
|
||
width: 12px;
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.ze-prop-row {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
padding: 3px 2px;
|
||
border-bottom: 1px solid var(--chrome-border);
|
||
}
|
||
.ze-prop-row .k {
|
||
color: #9a9ca0;
|
||
}
|
||
.ze-prop-row .v {
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* Message panel + status bar */
|
||
/* EDA_MSG_PANEL: two rows (upper label / lower value), each one control-font
|
||
line high. Items are packed left-to-right, no fixed columns, no separators
|
||
- offset from the left by ~one character and spaced by ~one character plus
|
||
the item padding (updateItemPos: m_last_x += textExtent + m_fontSize.x). */
|
||
/* EDA_MSG_PANEL is a wxPanel, not part of the status bar, and it does not look
|
||
like one: it paints wxSYS_COLOUR_BTNFACE while the status bar below it is a
|
||
KISTATUSBAR on --chrome-bg. Akshay caught the two reading as one strip.
|
||
|
||
Both numbers are wx's own (qa/probes/aui_sash_probe.cpp):
|
||
SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) )
|
||
common/widgets/msgpanel.cpp:51
|
||
-> rgb(55, 55, 55)
|
||
DoGetBestSize() = wxSize( wxDefaultCoord, 2 * m_fontSize.y ) :78
|
||
m_fontSize = GetTextExtent( "W" ) :72
|
||
-> 14 x 18, so 36
|
||
Corroborated by sampling a real GerbView capture down x=400: rgb(55,55,55)
|
||
from 1141 to 1176 - 36 rows - and rgb(44,44,44) from 1177, the status bar.
|
||
Two methods that share no step.
|
||
|
||
The 1px rule above y=1141 in that sample is NOT this panel's. x=400 is a
|
||
canvas column, and the rule is the canvas pane's own border; [px] the same
|
||
row of a pcbnew capture reads #292929 only from x=405 to x=1631, and runs
|
||
straight through as #373737 over the two vertical toolbars and both docked
|
||
panes. We had it as a `border-top` here, which drew it across the whole
|
||
window and cut every toolbar off from the panel below it. It lives on
|
||
.ze-canvas-wrap now, with the other three sides of the same border.
|
||
|
||
The colour equals --content-bg and --aui-sash because GTK maps BTNFACE and
|
||
3DFACE to one colour; they are three roles, not one value with three names. */
|
||
.ze-msgpanel {
|
||
display: flex;
|
||
align-items: stretch;
|
||
min-height: 36px;
|
||
overflow: hidden;
|
||
background: var(--msgpanel-bg);
|
||
/* The text is drawn with KIUI::GetControlFont (msgpanel.cpp:121), which off
|
||
macOS is getGUIFont( win, 0 ) — the plain GTK UI font, the same size as the
|
||
menu bar and the trees. There is no smaller "info" size here. Ours said
|
||
12px and #f0f2f4, which is the same mistake the status bar had and which
|
||
the note below it already records. */
|
||
color: var(--chrome-fg);
|
||
font-size: var(--ui-font-size);
|
||
/* `if( m_last_x == 0 ) m_last_x = m_fontSize.x` (msgpanel.cpp:143): the first
|
||
cell is inset by one 'W' and nothing else. The gap between cells is not the
|
||
same number - it is written per item, below, because the padding varies. */
|
||
padding-left: var(--msgpanel-gutter);
|
||
}
|
||
.ze-msgpanel-item {
|
||
display: grid;
|
||
grid-template-rows: 1fr 1fr;
|
||
align-content: center;
|
||
/* A cell is exactly as wide as its own text, whatever the panel's width.
|
||
`updateItemPos` hands each item an absolute `m_X` accumulated from the
|
||
items before it and `showItem` draws the whole string there
|
||
(msgpanel.cpp:130-190) — there is no shrinking, and the panel's right edge
|
||
CLIPS what does not fit. Left to flex's default `1` shrink factor these
|
||
cells squeezed, and each row's ellipsis then ate the labels: "Board Side"
|
||
became "Boa...", "Attributes:" became "Attr...", on a panel where KiCad
|
||
shows every label in full and cuts only the last cell at the window edge. */
|
||
flex: 0 0 auto;
|
||
/* `m_last_x += GetTextExtent( text ).x; m_last_x += m_fontSize.x`
|
||
(msgpanel.cpp:151-154) where `text` already carries the item's padding
|
||
spaces (:140). So a cell advances by its own width plus padding spaces plus
|
||
one 'W', which is a trailing space on the cell rather than a gap between
|
||
cells - and it applies to the last cell too, exactly as upstream keeps
|
||
advancing m_last_x past it. MsgPanel.tsx overrides the 6 when an item asks
|
||
for a different padding. */
|
||
padding-right: calc(6 * var(--msgpanel-space) + var(--msgpanel-gutter));
|
||
}
|
||
.ze-msgpanel-upper,
|
||
.ze-msgpanel-lower {
|
||
/* No ellipsis. `showItem` draws the text and the window clips it; nothing in
|
||
EDA_MSG_PANEL shortens a string. (`KIUI::EllipsizeStatusText` is the STATUS
|
||
BAR's, and `.ze-statusbar` is where it belongs.) */
|
||
white-space: nowrap;
|
||
/* The two rows sit at m_UpperY = drawSize.y/2 - m_fontSize.y = 0 and
|
||
m_LowerY = drawSize.y - m_fontSize.y = 18 (msgpanel.cpp:147-148), i.e. one
|
||
m_fontSize.y each, exactly filling the 2 * m_fontSize.y panel. */
|
||
line-height: var(--ui-line-height);
|
||
}
|
||
.ze-msgpanel-lower {
|
||
color: var(--chrome-fg);
|
||
}
|
||
/* KIUI::GetStatusFont() is getGUIFont( win, 0 ) off macOS - the same
|
||
wxSYS_DEFAULT_GUI_FONT at the same size as the menus and trees, drawn in the
|
||
normal foreground colour. Ours was a size down and dimmed to #b6b8bb, which
|
||
made the one line telling you which project is open the faintest thing on
|
||
screen. */
|
||
.ze-statusbar {
|
||
display: flex;
|
||
align-items: center;
|
||
/* The bar's height is a property of the FRAME, not a constant: KiCad's two
|
||
kinds of status bar do not measure the same. See --statusbar-height. */
|
||
height: var(--statusbar-height);
|
||
background: var(--chrome-bg);
|
||
/* No border. A KISTATUSBAR is a wxStatusBar and GTK gives it no top rule;
|
||
[px] pcbnew 1920x1200, straight down x=1660 and x=1700: #373737 through
|
||
y=1176, then #2c2c2c from y=1177 with nothing between. Ours wrote a
|
||
literal #292929 here — a value the theme never asked for, and one pixel
|
||
that pushed the whole bar down out of alignment with KiCad's. */
|
||
font-size: var(--ui-font-size);
|
||
/* Not pure white. Same font (system-ui resolves to Ubuntu here, which is what
|
||
KiCad draws with), same size - measured glyph-for-glyph, "Project:" is 51px
|
||
in KiCad and 49px in ours - but we were painting it #fff where GTK's status
|
||
label peaks at 243. On a #2c2c2c bar that extra contrast is what reads as a
|
||
bigger, heavier font: same widths, 10% more ink (222 lit pixels against
|
||
201). Dropping the white is the whole fix. */
|
||
color: #f3f3f3;
|
||
}
|
||
.ze-statusbar .cell {
|
||
/* The real bar's first field starts 6px in, not 10. */
|
||
padding: 0 6px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
/* KiCad's KISTATUSBAR has three stretching fields, and updateStatusBarWidths
|
||
(common/eda_draw_frame.cpp:792) states their weights exactly: field 0 (the
|
||
message area) is -3, field 6 (the "current tool" panel) and field 7 (the
|
||
constraint mode) are -2 each. So the leftover width splits 3:2:2 and that,
|
||
not a 1:1 guess, is what positions the fixed cluster in the middle. In the
|
||
dark theme the field separators are invisible, so we draw none. */
|
||
.ze-statusbar .cell.stretch3 {
|
||
flex: 3 1 0;
|
||
min-width: 0;
|
||
}
|
||
.ze-statusbar .cell.stretch2 {
|
||
flex: 2 1 0;
|
||
min-width: 0;
|
||
}
|
||
/* EDA_3D_VIEWER_STATUSBAR and the frames that are not EDA_DRAW_FRAMEs state a
|
||
single stretch field instead (kicad_manager_frame.cpp:395 makes field 0 "the
|
||
only stretchable field"). */
|
||
.ze-statusbar .cell.msg,
|
||
.ze-statusbar .cell.grow {
|
||
flex: 1 1 0;
|
||
min-width: 0;
|
||
}
|
||
/* A pane whose width KiCad states in pixels rather than deriving from a
|
||
template string — EDA_3D_VIEWER_FRAME's status_dims { -1, 170, 130, 130,
|
||
130 }. The width comes from the element's own style attribute. */
|
||
.ze-statusbar .cell.pane {
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
/* The two panes KISTATUSBAR appends after the frame's own,
|
||
FIELD::BGJOB_LABEL and FIELD::BGJOB_GAUGE
|
||
(common/widgets/kistatusbar.cpp, updateAuxFieldWidths :368-405). The label
|
||
is width -1 (stretch) and right-aligned (wxALIGN_RIGHT, :127-129); the gauge
|
||
is a fixed 75. Both are rendered only while a job runs, which is the DOM
|
||
equivalent of collapsing them to width 0 when idle. */
|
||
.ze-statusbar .cell.bgjob-label {
|
||
/* Upstream this field is width -1, a stretch field (kistatusbar.cpp:127-129).
|
||
Content-width here renders IDENTICALLY in KiCad's own field set - the label
|
||
is right-aligned and the only thing to its right is the 75px gauge, so
|
||
stretching it changes nothing that is drawn. It changes plenty in ours,
|
||
because this bar carries a field KiCad has no equivalent of ("Saved in
|
||
browser"): a second stretch field halves the leftover the project path was
|
||
taking, and that field slides from the right edge to the middle the moment
|
||
a job starts. Same pixels where upstream can be compared, and nothing
|
||
wanders where it cannot. */
|
||
flex: 0 1 auto;
|
||
min-width: 0;
|
||
text-align: right;
|
||
}
|
||
.ze-statusbar .cell.bgjob-gauge {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
align-items: center;
|
||
/* The gauge fills its field's height (`SetSize( …, h )`, :406). */
|
||
padding-right: 0;
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* wxGauge. GTK draws a trough and a fill; <progress> is the same two parts, so
|
||
the colours come from the tokens rather than from a restated palette. */
|
||
.ze-bgjob-gauge {
|
||
appearance: none;
|
||
width: 100%;
|
||
/* The gauge is sized to its field, `m_backgroundProgressBar->SetSize(
|
||
w - buttonSize.GetWidth() - padding, h )` where h is the field rect's own
|
||
height (kistatusbar.cpp:405-406) — so it states no height of its own. */
|
||
height: 100%;
|
||
border: 0;
|
||
background: var(--chrome-bg2);
|
||
}
|
||
.ze-bgjob-gauge::-webkit-progress-bar {
|
||
background: var(--chrome-bg2);
|
||
}
|
||
.ze-bgjob-gauge::-webkit-progress-value {
|
||
background: var(--chrome-active);
|
||
}
|
||
.ze-bgjob-gauge::-moz-progress-bar {
|
||
background: var(--chrome-active);
|
||
}
|
||
|
||
/* BACKGROUND_JOB_LIST (common/background_jobs_monitor.cpp:93-171). A
|
||
wxFRAME_NO_TASKBAR | wxBORDER_SIMPLE frame, so no caption is drawn — see the
|
||
note in BackgroundJobList.tsx. Size and the 75px row height come from
|
||
KiCad's own literals and live on the component. */
|
||
.ze-bgjob-list {
|
||
position: fixed;
|
||
z-index: 60;
|
||
/* wxBORDER_SIMPLE. */
|
||
border: 1px solid var(--chrome-border);
|
||
background: var(--chrome-bg);
|
||
overflow: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.ze-bgjob-list:focus {
|
||
outline: none;
|
||
}
|
||
/* The wxScrolledWindow, wxVSCROLL only (:101-103). */
|
||
.ze-bgjob-scroll {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
/* [data] `m_contentSizer->Add( panel, 0, wxEXPAND | wxALL, 2 )` (:139) — a
|
||
2 px sizer border on all four sides of every panel. */
|
||
padding: 2px;
|
||
/* [data] the same 2, on the two facing sides of adjacent panels. */
|
||
gap: 4px;
|
||
}
|
||
/* wx Panel background="3dlight": wxSYS_COLOUR_3DLIGHT, which measures the same as 3DFACE here
|
||
(see BACKGROUND_JOB_PANEL below), so --content-bg. */
|
||
.ze-panel.bg-3dlight {
|
||
background: var(--content-bg);
|
||
}
|
||
/* StaticText minWidthText: an invisible line of the stated text, so the label is at least that
|
||
wide (`SetMinSize( GetTextExtent( text ) )`). */
|
||
/* A wxTextCtrl nobody sized is its best width, --ctl-entry-width - the token said so, but
|
||
nothing read it, so every unsized entry was the browser's 20-character <input> (263 px
|
||
here), and a dialog of entries, Fit() to them, came out ~2.7x KiCad's width (Footprint
|
||
Properties' Position box set its three proportion-1 columns, and so the dialog).
|
||
A sizer still widens it: along a slot it grows with the item (`.ze-szi-fill > *`);
|
||
across one, wxEXPAND, `min-width: 100%` - a percentage that is 0 while the dialog is
|
||
being sized and the slot once it is laid out, the best size and then the stretch. */
|
||
.ze-textctrl {
|
||
width: var(--ctl-entry-width);
|
||
box-sizing: border-box;
|
||
}
|
||
.ze-szi-across > .ze-textctrl {
|
||
min-width: 100%;
|
||
}
|
||
/* TextCtrl minWidthText: the entry and an invisible line of the stated text share one grid cell,
|
||
so the cell is the text's width and the entry fills it. */
|
||
.ze-textctrl-minw {
|
||
display: inline-grid;
|
||
}
|
||
.ze-textctrl-minw > * {
|
||
grid-area: 1 / 1;
|
||
min-width: 0;
|
||
}
|
||
.ze-textctrl-minw > input {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
.ze-textctrl-minw > span {
|
||
height: 0;
|
||
overflow: hidden;
|
||
visibility: hidden;
|
||
white-space: pre;
|
||
}
|
||
.ze-statictext-minw {
|
||
display: block;
|
||
height: 0;
|
||
overflow: hidden;
|
||
visibility: hidden;
|
||
white-space: pre;
|
||
}
|
||
/* BACKGROUND_JOB_PANEL: wxBORDER_SIMPLE, SetBackgroundColour(
|
||
wxSYS_COLOUR_3DLIGHT ) (:41-53). [px] 3DLIGHT measures #373737 on this
|
||
machine (qa/probes/syscolour_probe.cpp) — the same value as 3DFACE, which is
|
||
already --content-bg. */
|
||
.ze-bgjob-panel {
|
||
border: 1px solid var(--chrome-border);
|
||
background: var(--content-bg);
|
||
color: var(--chrome-fg);
|
||
display: flex;
|
||
flex-direction: column;
|
||
/* Every child is added with `wxALL | wxEXPAND, 1` (:59, :64, :69). */
|
||
padding: 1px;
|
||
/* [data] the same 1, on the two facing sides of adjacent children. */
|
||
gap: 2px;
|
||
flex: 0 0 auto;
|
||
box-sizing: border-box;
|
||
}
|
||
/* wxFont( wxNORMAL_FONT->GetPointSize(), …, wxFONTWEIGHT_BOLD ) (:56-58) —
|
||
bold at the SAME size as everything else, not a larger heading. */
|
||
.ze-bgjob-name {
|
||
font-weight: bold;
|
||
}
|
||
.ze-bgjob-status {
|
||
min-height: 1em;
|
||
}
|
||
|
||
/* Non-fatal open-error banner (dismiss on click). */
|
||
.ze-error-banner {
|
||
padding: 6px 12px;
|
||
background: #6e2020;
|
||
color: #ffd9d9;
|
||
font-size: 12px;
|
||
cursor: default;
|
||
border-bottom: 1px solid #8a2a2a;
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
Cursor.
|
||
|
||
KiCad is a native GTK app and the pointer stays the plain arrow across the
|
||
whole frame - the menu bar, an open menu, the launchers, the tree, dialog
|
||
buttons, the status bar. It never becomes a hand over something clickable,
|
||
because GTK does not do that for a button. Ours did, in about a hundred
|
||
places, and it is one of the loudest "this is a web page" tells there is.
|
||
|
||
So the rule is a policy rather than a selector: nothing in this app declares
|
||
`cursor: pointer`. What may still declare a cursor is anything that is a real
|
||
affordance rather than a hint that a thing is clickable -
|
||
|
||
- col-resize / row-resize on a sash,
|
||
- move on a drag handle,
|
||
- progress while something is working,
|
||
- text inside a text field (GTK does show an I-beam there),
|
||
|
||
and the drawing canvases, which swap cursor per tool exactly as the desktop
|
||
app does. Those set theirs inline from JS, so no rule here can reach them. */
|
||
|
||
/* STATUS_POPUP / STATUS_TEXT_POPUP (common/status_popup.ts), measured by
|
||
qa/probes/status_popup_probe.cpp with KiCad's own construction: a
|
||
wxPopupWindow with wxBORDER_NONE (outer = client = panel size, so no frame
|
||
at all), the panel and window BTNFACE, the text BTNTEXT in the default GUI
|
||
font at an 18 px line, added with wxALL 5 - "Click on new member..." is
|
||
163 x 28, text at (5, 5). BTNFACE is the same wx colour as 3DFACE. */
|
||
.ze-status-popup {
|
||
position: fixed;
|
||
/* Above the frame, like the top-level window it is; below a tooltip. */
|
||
z-index: 400; /* [css] */
|
||
pointer-events: none;
|
||
background: var(--content-bg);
|
||
}
|
||
|
||
.ze-status-popup-panel {
|
||
display: flex;
|
||
background: var(--content-bg);
|
||
color: var(--chrome-fg);
|
||
font-family: var(--ui-font-family);
|
||
font-size: var(--ui-font-size);
|
||
line-height: var(--ui-line-height);
|
||
}
|
||
|
||
.ze-status-popup-text {
|
||
/* m_topSizer->Add( m_statusLine, 1, wxALL | wxEXPAND, 5 ) */
|
||
margin: 5px; /* [px] the sizer border KiCad states */
|
||
white-space: pre;
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
Tooltip (see ui/Tooltip.tsx).
|
||
|
||
Measured off a real GTK tooltip over a launcher: a 46px-tall box for one
|
||
line of 11pt text, filled #0b0b0b and outlined 1px #4b4b4b. Chrome's native
|
||
`title` box is 28px tall with a white outline, which is why this is drawn
|
||
rather than delegated. */
|
||
.ze-tooltip {
|
||
position: fixed;
|
||
z-index: 500;
|
||
pointer-events: none;
|
||
background: #0b0b0b;
|
||
border: 1px solid #4b4b4b;
|
||
border-radius: 5px;
|
||
padding: 13px 10px;
|
||
font-size: var(--ui-font-size);
|
||
line-height: 1.15;
|
||
color: var(--chrome-fg);
|
||
/* Toolbar tooltips are two lines separated by \n, with a tab before the
|
||
hotkey (TOOL_ACTION::GetButtonTooltip). */
|
||
white-space: pre;
|
||
tab-size: 4;
|
||
max-width: 60vw;
|
||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
|
||
}
|
||
|
||
/* ---- Project manager (home) ---- */
|
||
.ze-home-body {
|
||
flex: 1;
|
||
display: flex;
|
||
min-height: 0;
|
||
background: var(--content-bg);
|
||
}
|
||
/* Draggable sash between the project tree and the launchers (KiCad wxAUI pane). */
|
||
.ze-splitter {
|
||
flex: 0 0 auto;
|
||
width: 5px;
|
||
cursor: col-resize;
|
||
background: transparent;
|
||
z-index: 2;
|
||
}
|
||
/* A wxAUI sash does not light up under the pointer; the resize cursor is the
|
||
whole affordance. */
|
||
/* Horizontal variant: the sash between stacked panes in a dock column
|
||
(Properties / Net Navigator / Schematic Hierarchy). */
|
||
.ze-splitter.horizontal {
|
||
width: auto;
|
||
height: 5px;
|
||
margin-top: -1px;
|
||
cursor: row-resize;
|
||
}
|
||
.ze-launchers {
|
||
flex: 1;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
/* PANEL_KICAD_LAUNCHER_BASE: bSizerInner->Add( m_toolsSizer, 1,
|
||
wxALL|wxEXPAND, 5 ) - 5px of border on every side of the tool grid. */
|
||
padding: 5px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: var(--content-bg);
|
||
/* The notebook's own edge, on the far side of the sash. */
|
||
border-left: 1px solid #292929;
|
||
}
|
||
/* m_toolsSizer is a wxFlexGridSizer( 0, 2, 2, 10 ): 2 columns, a 2px vertical
|
||
gap between rows and a 10px horizontal one between the icon and its text. */
|
||
.ze-tiles {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
}
|
||
.ze-launcher {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
width: 100%;
|
||
max-width: 760px;
|
||
/* The row *is* the grid row: the 4px of padding around the icon belongs to
|
||
the BITMAP_BUTTON (see .ico below), not to the row, so putting it here
|
||
would double-count it. 56px button + the sizer's 2px vgap = the 58px row
|
||
pitch the desktop app lays these out on. */
|
||
padding: 0;
|
||
margin: 0;
|
||
border: none;
|
||
border-radius: 4px;
|
||
background: transparent;
|
||
cursor: default;
|
||
text-align: left;
|
||
color: var(--chrome-fg);
|
||
font: inherit;
|
||
}
|
||
/* Square: every hover and selection KiCad paints in this frame goes through
|
||
dc.DrawRectangle. */
|
||
.ze-launcher,
|
||
.ze-launcher .ico {
|
||
border-radius: 0;
|
||
}
|
||
/* BITMAP_BUTTON::OnPaint draws dc.DrawRectangle( rect ) over the *button* -
|
||
the 48px bitmap plus its 4px padding - and nothing over the label or help
|
||
text. The fill is wxSYS_COLOUR_HIGHLIGHT.ChangeLightness( 40 ) in dark mode,
|
||
which scales each channel to 40% (#e95420 -> #5d220d), outlined in the
|
||
highlight colour itself. We were painting a 4px-rounded bar across the whole
|
||
760px row, which is most of what read as "rounded" next to the real thing. */
|
||
.ze-launcher:not(:disabled) .ico:hover {
|
||
/* Sampled off a hovered launcher: fill rgb(93,33,12), outlined 1px in the
|
||
highlight colour itself. That fill is
|
||
wxSYS_COLOUR_HIGHLIGHT.ChangeLightness( 40 ) - each channel to 40%, so
|
||
#e95420 -> (93,34,13) - which lands within one level of the measurement.
|
||
|
||
Keyed off the icon's own :hover, not the row's. Upstream this rectangle is
|
||
painted by BITMAP_BUTTON::OnPaint for the button it belongs to; the title
|
||
and help text beside it are separate wxStaticTexts and moving over them
|
||
does nothing to the button. */
|
||
background: var(--accent-fill-checked);
|
||
box-shadow: inset 0 0 0 1px var(--chrome-active);
|
||
}
|
||
.ze-launcher:disabled {
|
||
opacity: 0.45;
|
||
cursor: default;
|
||
}
|
||
/* The BITMAP_BUTTON itself: a 48px bitmap inside BITMAP_BUTTON::SetPadding( 4 ),
|
||
so the button - and therefore the hover rectangle it paints - is 56x56, not
|
||
48x48. Measured on a hovered launcher, the real outline is exactly 56 tall. */
|
||
.ze-launcher .ico {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 56px;
|
||
height: 56px;
|
||
}
|
||
.ze-launcher .ico img {
|
||
width: 48px;
|
||
height: 48px;
|
||
}
|
||
.ze-launcher .txt {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* CreateLaunchers() builds both labels from wxSYS_DEFAULT_GUI_FONT and only
|
||
ever changes weight and slant: the title is that font bolded (the +2 point
|
||
bump is #ifndef __WXGTK__, so it does not apply here) and the help line is
|
||
the same size in italic, at the same undimmed colour. Ours had the title a
|
||
size up and the help line a size down in grey. */
|
||
.ze-launcher .name {
|
||
font-weight: 700;
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
.ze-launcher .desc {
|
||
font-size: var(--ui-font-size);
|
||
font-style: italic;
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
Project Template Selector (dialogs/dialog_template_selector.tsx).
|
||
|
||
Geometry from dialog_template_selector_base.cpp: SetSizeHints( 500, 400 ),
|
||
an m_panelMRU of min width 220, a splitter at sash gravity 0.35, and 5px of
|
||
border on everything inside the right panel. Colours sampled off the real
|
||
window: the dialog is #2c2c2c, the card list and the cards themselves
|
||
#373737, ruled #181818, and the search field #272727. */
|
||
/* `dialog_template_selector_base.cpp:14` states a MINIMUM and nothing else —
|
||
`SetSizeHints( wxSize( 500, 400 ), wxDefaultSize )` — and the dialog is then
|
||
fitted to its content. The 652 x 440 that stood here was that minimum with
|
||
our own border and project-name row added back by hand; the row is real, but
|
||
it should push the dialog out by existing, not by being counted into a
|
||
number. */
|
||
.ze-modal.ze-tplsel {
|
||
/* [data] `SetSizeHints( wxSize( 500, 400 ), wxDefaultSize )`. */
|
||
min-width: 500px;
|
||
/* [data] the same call. It said 439, which was 400 plus the project-name row
|
||
measured once and frozen. */
|
||
min-height: 400px;
|
||
max-width: 94vw;
|
||
max-height: 90vh;
|
||
}
|
||
/* No padding of its own: bmainSizer->Add( m_mainContent, 1, wxEXPAND, 5 ) has
|
||
no wxALL, so wx ignores that border. The 5px belongs to m_mainContent's
|
||
children, which carry it individually. Ours had it here as well, which cost
|
||
the template list 12 of its 400px. */
|
||
.ze-tplsel-body {
|
||
flex-direction: row;
|
||
padding: 0;
|
||
gap: 0;
|
||
}
|
||
/* m_panelMRU: SetMinSize( 220, -1 ). */
|
||
.ze-tplsel-mru {
|
||
flex: 0 0 220px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-width: 0;
|
||
margin: 5px;
|
||
}
|
||
.ze-tplsel-mru-head {
|
||
padding: 5px;
|
||
font-size: var(--ui-font-size);
|
||
/* The dialog's own label colour, measured at 243, not the shell's pure white. */
|
||
color: var(--chrome-fg);
|
||
}
|
||
/* m_scrolledMRU is wxVSCROLL with SetScrollRate( 0, 25 ) too. */
|
||
.ze-tplsel-mru-list {
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
margin: 5px;
|
||
/* m_sizerMRU adds each row with wxBOTTOM, 2. */
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
}
|
||
/* TEMPLATE_MRU_WIDGET: a 16px icon and a KIUI::GetInfoFont label, 6px borders. */
|
||
.ze-tplsel-mru-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 6px;
|
||
font-size: 10pt;
|
||
flex: 0 0 auto;
|
||
}
|
||
/* icon->SetMinSize( FromDIP( wxSize( 16, 16 ) ) ) in TEMPLATE_MRU_WIDGET. Every
|
||
row has a bitmap now: without meta/icon.png it is KiCad's own app icon, so
|
||
there is no iconless case to style. */
|
||
.ze-tplsel-mru-row img {
|
||
width: 16px;
|
||
height: 16px;
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-tplsel-mru-row .nm {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
/* OnEnter paints HIGHLIGHT.ChangeLightness( 150 ), i.e. half way to white. */
|
||
.ze-tplsel-mru-row:hover:not(.active) {
|
||
background: #f4a98f;
|
||
color: #1a1a1a;
|
||
}
|
||
.ze-tplsel-mru-row.active {
|
||
background: var(--chrome-active);
|
||
color: #fff;
|
||
}
|
||
/* m_splitter, sash position 300 with the preview taking the rest. */
|
||
.ze-tplsel-splitter {
|
||
flex: 1 1 auto;
|
||
min-width: 0;
|
||
display: flex;
|
||
margin: 5px;
|
||
gap: 4px;
|
||
}
|
||
/* The sash lands at 300, and the `width / 3` in EnsurePreviewSplit is a
|
||
fallback that never runs. Reading that function alone gives the wrong answer:
|
||
|
||
int sashPos = m_previewSashPos;
|
||
if( sashPos <= 0 ) { ... sashPos = width / 3; }
|
||
|
||
m_previewSashPos is not 0 by the time a template is first clicked. The base
|
||
class splits at 300 in its constructor -
|
||
SplitVertically( m_panelTemplates, m_panelPreview, 300 ) - and SetState(
|
||
Initial ), which the dialog's constructor calls, reads that position back
|
||
before it unsplits:
|
||
|
||
m_previewSashPos = m_splitter->GetSashPosition(); // 300
|
||
m_splitter->Unsplit( m_panelPreview );
|
||
|
||
so the preview always re-splits at 300. m_splitterOnIdle sets the same 300 on
|
||
the first idle event. A third of 640 is 213, which is why the list looked
|
||
too narrow.
|
||
|
||
0 1 300px, not 0 0: 200 is SetMinimumPaneSize( 200 ) and the pane has to be
|
||
able to give way to it once the dialog is near its 500px floor. */
|
||
.ze-tplsel-templates {
|
||
flex: 0 1 300px;
|
||
min-width: 200px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* Unsplit, the list is the whole splitter - the preview pane starts Hidden and
|
||
only SplitVertically brings it in. */
|
||
.ze-tplsel-splitter > .ze-tplsel-templates:only-child {
|
||
flex-basis: 100%;
|
||
}
|
||
/* Both are 34px tall, measured. m_searchCtrl is a text entry so it is faced in
|
||
the entry colour and added wxEXPAND - 400px, the width of the list below it.
|
||
m_filterChoice is a wxChoice, faced like a button, added *without* wxEXPAND
|
||
so it keeps its own 160. */
|
||
/* Prefixed with .ze-app so these outrank the shell's blanket
|
||
`.ze-app input` / `.ze-app select` rules, which are (0,1,1) and were quietly
|
||
winning: the filter was coming out --chrome-bg2 (#262626) instead of the
|
||
button face the real wxChoice has. */
|
||
.ze-tplsel-searchwrap,
|
||
.ze-app .ze-tplsel-filter {
|
||
box-sizing: border-box;
|
||
height: 34px;
|
||
color: var(--view-fg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: 4px;
|
||
font: inherit;
|
||
margin: 5px;
|
||
/* Never let the column's flex shrink these: they are fixed-height controls,
|
||
and a shrink here is what silently turned the 34px search box into 21. */
|
||
flex: 0 0 auto;
|
||
}
|
||
/* m_searchCtrl is added wxEXPAND; m_filterChoice is not, so it keeps its own
|
||
width instead of stretching. */
|
||
/* m_searchCtrl is a text entry: the entry face, #272727. The wrapper carries the
|
||
frame because the control owns two painted buttons inside it - the magnifier
|
||
from ShowSearchButton and the ✕ from ShowCancelButton. */
|
||
.ze-tplsel-searchwrap {
|
||
width: calc(100% - 10px);
|
||
background: var(--panel-bg);
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0 8px;
|
||
gap: 7px;
|
||
}
|
||
.ze-app .ze-tplsel-search {
|
||
flex: 1 1 auto;
|
||
min-width: 0;
|
||
height: 100%;
|
||
background: none;
|
||
border: none;
|
||
border-radius: 0;
|
||
padding: 0;
|
||
margin: 0;
|
||
color: inherit;
|
||
font: inherit;
|
||
}
|
||
.ze-app .ze-tplsel-search:focus {
|
||
outline: none;
|
||
}
|
||
/* GTK renders both as symbolic icons in the entry's own text colour, dimmed. */
|
||
.ze-tplsel-searchwrap .mag,
|
||
.ze-tplsel-searchwrap .cancel {
|
||
flex: 0 0 auto;
|
||
width: 16px;
|
||
height: 16px;
|
||
opacity: 0.65;
|
||
background: currentColor;
|
||
}
|
||
/* Adwaita's system-search-symbolic and edit-clear-symbolic, the two GTK hands
|
||
wxSearchCtrl, traced as paths so they tint with currentColor. */
|
||
.ze-tplsel-searchwrap .mag {
|
||
-webkit-mask:
|
||
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.6' d='M7 2.2a4.8 4.8 0 1 0 0 9.6 4.8 4.8 0 0 0 0-9.6zm3.6 8.4L14 14'/%3E%3C/svg%3E")
|
||
center / 16px 16px no-repeat;
|
||
mask:
|
||
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.6' d='M7 2.2a4.8 4.8 0 1 0 0 9.6 4.8 4.8 0 0 0 0-9.6zm3.6 8.4L14 14'/%3E%3C/svg%3E")
|
||
center / 16px 16px no-repeat;
|
||
}
|
||
.ze-tplsel-searchwrap .cancel {
|
||
-webkit-mask:
|
||
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 .8a7.2 7.2 0 1 0 0 14.4A7.2 7.2 0 0 0 8 .8zm3 9.1-1.1 1.1L8 9.1l-1.9 1.9L5 9.9 6.9 8 5 6.1 6.1 5 8 6.9 9.9 5 11 6.1 9.1 8z'/%3E%3C/svg%3E")
|
||
center / 16px 16px no-repeat;
|
||
mask:
|
||
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 .8a7.2 7.2 0 1 0 0 14.4A7.2 7.2 0 0 0 8 .8zm3 9.1-1.1 1.1L8 9.1l-1.9 1.9L5 9.9 6.9 8 5 6.1 6.1 5 8 6.9 9.9 5 11 6.1 9.1 8z'/%3E%3C/svg%3E")
|
||
center / 16px 16px no-repeat;
|
||
}
|
||
.ze-tplsel-searchwrap .cancel:hover {
|
||
opacity: 1;
|
||
}
|
||
/* Carried on the input's own class rather than as `.ze-tplsel-searchwrap input`: a
|
||
descendant type selector has to be qualified with .ze-app to outrank the
|
||
shell's blanket `.ze-app input`, and that lands high enough to make every
|
||
later plain `input` rule in this file report as descending specificity. */
|
||
/* A bare entry, drawn by whatever frames it rather than by itself; the search
|
||
boxes (the template selector's and PANEL_HOTKEYS_EDITOR's filter) sit inside
|
||
`.ze-tplsel-searchwrap` and wear this. `.ze-bare` on the element is what
|
||
keeps the shell's blanket entry rule off it - see that rule for why a class
|
||
alone could not. */
|
||
.ze-tplsel-nameinput {
|
||
box-sizing: border-box;
|
||
/* Fills the box it is framed by, rather than sizing to its own content. */
|
||
flex: 1 1 auto;
|
||
min-width: 0;
|
||
height: 100%;
|
||
padding: 0;
|
||
margin: 0;
|
||
font: inherit;
|
||
color: var(--chrome-fg);
|
||
background: none;
|
||
border: none;
|
||
border-radius: 0;
|
||
outline: none;
|
||
}
|
||
/* No width or height. `dialog_hotkey_list.cpp:79` states a MINIMUM and nothing
|
||
else — `main_sizer->SetMinSize( 600, 400 )` — and the dialog is then fitted
|
||
to its content, whose width is the four columns the hotkey list declares.
|
||
The 1000 x 560 here was derived from those column totals rather than stated
|
||
by anyone, so it is the list that should set the width, not a number. */
|
||
.ze-modal.ze-hotkeys {
|
||
/* [data] `main_sizer->SetMinSize( 600, 400 )`, dialog_hotkey_list.cpp:79. */
|
||
min-width: 600px;
|
||
/* [data] the same call. */
|
||
min-height: 400px;
|
||
resize: both;
|
||
max-width: 96vw;
|
||
max-height: 92vh;
|
||
}
|
||
.ze-hotkeys-body {
|
||
flex-direction: column;
|
||
/* The panel is added with KIUI::GetStdMargin(), which is 5 on GTK. */
|
||
padding: 5px;
|
||
gap: 5px;
|
||
}
|
||
/* PANEL_HOTKEYS_EDITOR's own mainSizer, which both the Hotkey List and the
|
||
Preferences page host. Its three children are the filter box, the tree, and
|
||
the button row - and only the tree grows, so the buttons stay put as the
|
||
window resizes. */
|
||
.ze-hotkeys-panel {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
/* bMargins carries wxTOP|wxRIGHT 5 on both children. */
|
||
gap: 5px;
|
||
}
|
||
.ze-hotkeys-filter {
|
||
flex: 0 0 auto;
|
||
margin: 0;
|
||
width: auto;
|
||
}
|
||
/* Scrolls BOTH ways, and its own size is neither of its content's.
|
||
|
||
The columns total 1590 and the list is ~200 rows long; a wxTreeListCtrl is a
|
||
scrolled control whose best size is its own, which is the whole point of
|
||
giving column 3 a width of 900 and of a list this long having a scrollbar.
|
||
`PAGED_DIALOG` therefore comes out ~1095 x 713 on this theme whichever page
|
||
is showing, because `GetBestSize()` never sees those 1590 px or those rows.
|
||
|
||
A CSS scroll container is the opposite by default: it offers its content's
|
||
max-content size to its parent's intrinsic sizing in both axes, so this page
|
||
pushed the dialog to BOTH of its caps — 1500 px wide from the columns, 900 px
|
||
tall from the rows.
|
||
|
||
`contain: size` says the size is the control's own. The two pairs beside it
|
||
are what every engine acts on: a definite `width: 0` contributes nothing and
|
||
`min-width: 100%` stretches the control back over the page, and a flex basis
|
||
of 0 does the same job on the block axis, where `flex: 1 1 auto` had handed
|
||
the whole list's height up as the item's hypothetical main size. */
|
||
.ze-hotkeys-list {
|
||
flex: 1 1 0;
|
||
min-height: 0;
|
||
contain: size;
|
||
width: 0;
|
||
min-width: 100%;
|
||
overflow: auto;
|
||
background: var(--panel-bg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: 4px;
|
||
}
|
||
/* The wxTreeListCtrl's column header. */
|
||
.ze-hotkeys-head {
|
||
display: flex;
|
||
width: max-content;
|
||
min-width: 100%;
|
||
position: sticky;
|
||
top: 0;
|
||
z-index: 1;
|
||
/* [css] `treeview.view header button`: `background-color: #272727` (the same
|
||
ground as the rows — `--panel-bg`), `color: #8f8f8f`, `font-weight: bold`,
|
||
`padding: 0 6px`, and `border-style: none solid solid none` in `#2c2c2c`,
|
||
which is the dialog's own ground. This said `--content-bg` (#373737) and
|
||
`--chrome-fg` at normal weight, so the header read lighter and flatter than
|
||
the rows instead of dimmer and heavier. No font-size: a treeview takes the
|
||
GUI font, and stating one is what made this list smaller than KiCad's. */
|
||
background: var(--panel-bg);
|
||
border-bottom: 1px solid var(--chrome-bg);
|
||
/* [css] `treeview.view header button { padding: 0 6px }`; the 2 above and
|
||
below is [px] the 24 px header the capture shows, against a 20 px line. */
|
||
padding: 2px 6px;
|
||
font-weight: bold;
|
||
color: var(--tree-header-fg);
|
||
}
|
||
/* AppendColumn's widths, verbatim: 450 / 120 / 120 / 900. A wxTreeListCtrl
|
||
keeps its column widths and scrolls sideways when the window is narrower than
|
||
their sum (1590), which is why a real Hotkey List truncates "Show 3D Models
|
||
even if..." in the Command column and carries a horizontal scrollbar. Ours
|
||
shrank the columns to fit instead, so nothing ever truncated and the
|
||
proportions were never upstream's. */
|
||
.ze-hotkeys-head .cmd,
|
||
.ze-hotkeys-row .cmd {
|
||
flex: 0 0 450px;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-hotkeys-head .key,
|
||
.ze-hotkeys-row .key,
|
||
.ze-hotkeys-head .alt,
|
||
.ze-hotkeys-row .alt {
|
||
flex: 0 0 120px;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
}
|
||
/* No colour of its own. Every cell of a wxTreeListCtrl is drawn in the view's
|
||
foreground — `.view { color: white }` — and `WIDGET_HOTKEY_LIST` sets an
|
||
attribute on exactly one thing, the bold on a rebound key. This dimmed the
|
||
whole Description column to #9a9a9a, which is a shade nothing in the theme
|
||
states. */
|
||
.ze-hotkeys-head .desc,
|
||
.ze-hotkeys-row .desc {
|
||
flex: 0 0 900px;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
/* A section is a top-level tree row: bold, and its children indented under it. */
|
||
/* A top-level tree row: the twisty, then the section name. */
|
||
.ze-hotkeys-sectionhead {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
cursor: default;
|
||
padding: 6px 8px 4px;
|
||
font-size: var(--ui-font-size);
|
||
font-weight: 700;
|
||
color: var(--chrome-fg);
|
||
}
|
||
/* A row of the tree. NO font-size: `wxTreeListCtrl` calls SetFont nowhere, so
|
||
it draws in the GUI font — 11 pt / 14.67 px — and this said 10 pt, which is
|
||
why every row of the list read a size smaller than KiCad's. The ink is the
|
||
VIEW's, `.view { color: white }` = `--view-fg`, not the dialog chrome's
|
||
#F7F7F7; and [px] the 2 px above and below is GtkCellRendererText's `ypad`,
|
||
which puts the rows 24 px apart as the capture shows. */
|
||
.ze-hotkeys-row {
|
||
display: flex;
|
||
width: max-content;
|
||
min-width: 100%;
|
||
/* [px] GtkCellRendererText's `ypad` of 2 above and below, which puts the rows
|
||
the 24 px apart the capture measures; the 24 px indent is the expander
|
||
column a child row sits after. */
|
||
padding: 2px 8px 2px 24px;
|
||
color: var(--view-fg);
|
||
}
|
||
.ze-hotkeys-row:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
/* wxTL_SINGLE's selected row, painted in wxSYS_COLOUR_HIGHLIGHT - the same
|
||
orange the project tree and the template cards select with. */
|
||
.ze-hotkeys-row.selected,
|
||
.ze-hotkeys-row.selected:hover {
|
||
/* [css] `treeview.view:selected { background-color: #E95420 }` and, in the
|
||
rule under it, `color: #FFFFFF` — which is --chrome-active and --view-fg.
|
||
A selected row has ONE foreground; the #ffe6d9 that was here for the
|
||
Description column is not in the stylesheet at all. */
|
||
background: var(--chrome-active);
|
||
color: var(--view-fg);
|
||
}
|
||
/* updateFromClientData paints a rebound row's key in bold:
|
||
|
||
if( changed ) SetItemText( i, 1, ... ) with a bold attr
|
||
|
||
so a user can see at a glance which bindings are theirs rather than KiCad's,
|
||
without comparing every row against a default they cannot see. */
|
||
.ze-hotkeys-row.changed .key {
|
||
font-weight: 600;
|
||
}
|
||
/* A combo the browser reserves - Ctrl+N, Ctrl+W - which reaches the app only in
|
||
fullscreen. Struck through rather than hidden: the binding is real and is
|
||
what upstream uses, and a row with an empty Hotkey cell would read as a
|
||
command with no key at all. */
|
||
.ze-hotkeys-row .key.taken {
|
||
text-decoration: line-through;
|
||
/* The ink GTK gives text that cannot be acted on:
|
||
`treeview.view:disabled { color: #929292 }`, which --ctl-fg-disabled
|
||
already carries. This stated #9a9a9a and #7a7a7a, neither of them a colour
|
||
the theme names. */
|
||
color: var(--ctl-fg-disabled);
|
||
text-decoration-color: var(--ctl-fg-disabled);
|
||
}
|
||
.ze-hotkeys-row.selected .key.taken {
|
||
/* [css] `treeview.view:disabled:selected { color: #f4aa90 }`. */
|
||
color: #f4aa90;
|
||
text-decoration-color: #f4aa90;
|
||
}
|
||
/* Double-click to rebind is the editable panel's gesture, so the rows say so
|
||
with the cursor; the read-only list keeps the arrow. */
|
||
.ze-hotkeys-row[title] {
|
||
cursor: default;
|
||
}
|
||
/* BUTTON_ROW_PANEL (widgets/button_row_panel.tsx): every button bordered
|
||
wxTOP|wxBOTTOM and on each side but the row's outer ends, at
|
||
KIUI::GetStdMargin(); a stretch spacer between the left and right groups. */
|
||
.ze-button-row {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.ze-button-row > .ze-btn {
|
||
/* [data] KIUI::GetStdMargin() returns 5 (ui_common.cpp:49-53) */
|
||
margin: 5px;
|
||
}
|
||
.ze-button-row > .ze-btn.first-left {
|
||
margin-left: 0;
|
||
}
|
||
.ze-button-row > .ze-btn.last-right {
|
||
margin-right: 0;
|
||
}
|
||
.ze-button-row-spacer {
|
||
flex: 1 1 0;
|
||
}
|
||
/* The two button groups: the panel's own row on the left, the dialog's
|
||
wxStdDialogButtonSizer on the right.
|
||
|
||
Qualified with .ze-modal-footer deliberately. That rule sets
|
||
`justify-content: flex-end` and sits ~2400 lines further down this file; at
|
||
equal specificity the later one wins, so a bare .ze-hotkeys-foot lost and
|
||
both groups packed right - which is what they were still doing. */
|
||
.ze-modal-footer.ze-hotkeys-foot {
|
||
justify-content: space-between;
|
||
}
|
||
.ze-hotkeys-foot .left,
|
||
.ze-hotkeys-foot .right {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
/* What an import did. Upstream drops an unmatched name silently, which it can
|
||
afford because the file it reads was written by the same action names; a file
|
||
from a real KiCad names actions we do not have, and a button that quietly
|
||
changes nothing reads as a broken one. */
|
||
.ze-hotkeys-imported {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
.ze-hotkeys-empty {
|
||
padding: 14px;
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* A wxMenu takes the pointer grab, so a click anywhere else dismisses it. */
|
||
.ze-tplsel-ctxscrim {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 999;
|
||
}
|
||
/* m_filterChoice is a wxChoice: the *button* face, #373737. */
|
||
.ze-app .ze-tplsel-filter {
|
||
align-self: flex-start;
|
||
width: 160px;
|
||
background: var(--content-bg);
|
||
}
|
||
/* m_scrolledTemplates is created wxVSCROLL and given SetScrollRate( 0, 25 ):
|
||
a zero rate on x means it never scrolls sideways. A card keeps its
|
||
SetMinSize( FromDIP( wxSize( 200, -1 ) ) ) and is simply clipped when the
|
||
pane is narrower - which it is once the preview takes two thirds, and again
|
||
at the dialog's 500px minimum. Without this the min-width pushed a
|
||
horizontal scrollbar into a list that has never had one. */
|
||
.ze-tplsel-list {
|
||
flex: 1 1 auto;
|
||
min-height: 200px;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
background: var(--content-bg);
|
||
margin: 5px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
}
|
||
/* TEMPLATE_WIDGET_BASE: wxBORDER_THEME, an icon with wxTOP|wxBOTTOM|wxLEFT 5,
|
||
then the title over the description with wxALL 5. SetMinSize( 200, -1 ). */
|
||
.ze-tplsel-card {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
background: var(--content-bg);
|
||
border: 1px solid var(--ctl-border);
|
||
/* wxBORDER_THEME draws the GTK frame, which is rounded: tracing the border on
|
||
a real card, it arcs over about 5px at every corner. */
|
||
border-radius: 5px;
|
||
min-width: 200px;
|
||
flex: 0 0 auto;
|
||
}
|
||
/* c_bitmapSizes[0] = 48, and the icon's border is wxTOP|wxBOTTOM|wxLEFT, 5. */
|
||
.ze-tplsel-card img {
|
||
width: 48px;
|
||
height: 48px;
|
||
flex: 0 0 auto;
|
||
margin: 5px 0 5px 5px;
|
||
}
|
||
.ze-tplsel-card .txt {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-width: 0;
|
||
margin: 5px;
|
||
}
|
||
/* Both labels are KIUI::GetInfoFont - one point down - the title bolded. */
|
||
.ze-tplsel-card .name {
|
||
font-size: 10pt;
|
||
font-weight: 700;
|
||
}
|
||
.ze-tplsel-card .desc {
|
||
font-size: 10pt;
|
||
}
|
||
.ze-tplsel-card.active {
|
||
background: var(--chrome-active);
|
||
color: #fff;
|
||
}
|
||
|
||
/* m_panelPreview, split in only from the Preview states. */
|
||
.ze-tplsel-preview {
|
||
/* Whatever the sash leaves; see .ze-tplsel-templates. */
|
||
flex: 1 1 auto;
|
||
min-width: 200px;
|
||
display: flex;
|
||
overflow: auto;
|
||
background: var(--panel-bg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: 4px;
|
||
margin: 5px;
|
||
}
|
||
/* The WEBVIEW_PANEL. The page paints its own background once OnWebViewLoaded's
|
||
stylesheet is in - see template_preview_styles.ts - so the frame only needs
|
||
to match --bg-primary for the moment before that lands. */
|
||
.ze-tplsel-html {
|
||
flex: 1 1 auto;
|
||
min-width: 0;
|
||
border: none;
|
||
background: #1e1e1e;
|
||
}
|
||
.ze-tplsel-info {
|
||
padding: 18px 20px;
|
||
line-height: 1.55;
|
||
}
|
||
.ze-tplsel-info h2 {
|
||
margin: 0 0 10px;
|
||
font-size: 1.25em;
|
||
font-weight: 600;
|
||
}
|
||
.ze-tplsel-info p {
|
||
margin: 0 0 12px;
|
||
color: #c9cbce;
|
||
}
|
||
.ze-tplsel-info ul {
|
||
margin: 0;
|
||
padding-left: 18px;
|
||
color: #9a9ca0;
|
||
font-size: 10pt;
|
||
}
|
||
.ze-tplsel-info.welcome {
|
||
margin: auto;
|
||
text-align: center;
|
||
}
|
||
|
||
.ze-home-link {
|
||
padding: 0 12px;
|
||
display: flex;
|
||
align-items: center;
|
||
/* The gap between the mark and the name. [px] the menubar's own item padding
|
||
halved: 12px on the outside, 6px between two things that read as one. */
|
||
gap: 6px;
|
||
cursor: default;
|
||
font-weight: 700;
|
||
color: #4a86c5;
|
||
}
|
||
.ze-home-link:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
/* In the project manager the mark is a label: there is nowhere to go from home,
|
||
so it must not light up under the pointer like the launchers' link does. */
|
||
.ze-home-link-static:hover {
|
||
background: none;
|
||
}
|
||
|
||
/* The project manager's own tree (PROJECT_TREE, kicad/project_tree.cpp).
|
||
Scoped to this pane because its two metrics are set on the control itself and
|
||
are not shared with the editors' trees: SetFont( KIUI::GetControlFont() ),
|
||
which is wxSYS_DEFAULT_GUI_FONT at its default size, and LoadIcons()'s
|
||
c_fileDefSize = 22 for the per-row file icons (18px here before). The 1px
|
||
row padding is what keeps the pitch at the 24px the real tree lays out on
|
||
once the icon is 22px tall. */
|
||
/* The wxTreeCtrl's own GTK frame, and the reason the pane looks subtly
|
||
*curved* next to ours: the control is not a flush panel, it is a box filling
|
||
the pane under the caption with a 1px #181818 outline and ~6px rounded
|
||
corners. Traced off the real frame - the top rule stops at x=105 and the
|
||
left rule starts at y=117, a 6x6 arc, mirrored at all four corners.
|
||
The pane therefore carries no border of its own and the caption no rule
|
||
under it; both of those lines *are* this box's top and side edges. */
|
||
.ze-panel.left.ze-projecttree {
|
||
border-right: none;
|
||
}
|
||
.ze-projecttree .ze-panel-header {
|
||
border-bottom: none;
|
||
}
|
||
.ze-projecttree .ze-panel-body {
|
||
/* Square, not rounded. Measured across a running pane at y=300: a 1px
|
||
rgb(24,24,24) rule at x=100 and x=494 with rgb(39,39,39) between, running
|
||
straight into the corners — the tree control's own frame, edge to edge
|
||
under the caption. The 6px radius here made the body read as a floating
|
||
card and left the caption looking detached from it. */
|
||
border: 1px solid var(--ctl-border);
|
||
/* Vertically the rows butt straight onto the frame - the first row starts on
|
||
the pixel after the top rule. The 9px of lead-in puts the root row's
|
||
twisty 15px from the frame, where the real control's root indent puts it. */
|
||
padding: 0 0 0 9px;
|
||
}
|
||
.ze-projecttree .ze-tree-item {
|
||
/* A 24px row holding a 22px icon: the icon centres with a pixel either side,
|
||
and the highlight - which is the full row height in the real tree - can
|
||
stretch to all 24 rather than to the 22 a padded row would leave it. */
|
||
height: 24px;
|
||
padding-top: 0;
|
||
padding-bottom: 0;
|
||
/* Measured: the highlight begins 4px past the icon's right edge. */
|
||
gap: 4px;
|
||
border-radius: 0;
|
||
background: none;
|
||
}
|
||
/* PROJECT_TREE is built with PLATFORM_STYLE | wxTR_HAS_BUTTONS |
|
||
wxTR_MULTIPLE. wxTR_FULL_ROW_HIGHLIGHT is absent - and appears nowhere in
|
||
KiCad at all - so the highlight is not the row. Measured on a real selected
|
||
row: it starts 4px *after* the icon ends and runs to just past the text,
|
||
square, first=171 last=425 on every one of its 24 rows. So it belongs to the
|
||
label alone; the icon and the twisty stay on the tree background. */
|
||
.ze-projecttree .ze-tree-name {
|
||
align-self: stretch;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0 3px;
|
||
}
|
||
.ze-projecttree .ze-tree-item.active {
|
||
background: none;
|
||
}
|
||
.ze-projecttree .ze-tree-item.active .ze-tree-name {
|
||
background: var(--chrome-active);
|
||
/* Not bold, and nothing here has to say so any more: `.ze-tree-item.active`
|
||
used to carry a `font-weight: 700` this rule existed to escape. The
|
||
measurement that disproved it stands - "…kicad_sym" selected is 246px
|
||
against "…kicad_sch" unselected at 242px, and that 4px is 'm' against 'h';
|
||
bold would have cost about ten. (Trees elsewhere really do bold a row, but
|
||
via SetItemBold on the *active* item, which is a different thing to
|
||
selection.) */
|
||
font-weight: 400;
|
||
/* 2px of highlight.ChangeLightness( 120 ) - each channel to 80% toward
|
||
white, so #e95420 -> #ed764d - inset so the box stays exactly one row. */
|
||
box-shadow: inset 0 0 0 2px #ed764d;
|
||
color: #fff;
|
||
}
|
||
/* wxTreeCtrl marks selection and nothing else - moving the pointer over a row
|
||
leaves it exactly as it was. Both the row and the label are pinned to no
|
||
background here so the shared .ze-tree-item:hover rule cannot reach them. */
|
||
.ze-projecttree .ze-tree-item:hover:not(.active),
|
||
.ze-projecttree .ze-tree-item:hover:not(.active) .ze-tree-name {
|
||
background: none;
|
||
}
|
||
.ze-projecttree .ze-tree-item img {
|
||
width: 22px;
|
||
height: 22px;
|
||
}
|
||
|
||
/* Project-manager left toolbar (narrow vertical strip) */
|
||
/* An EDA_PANE().VToolbar() docked on the frame, so it sits on the frame
|
||
background rather than the menu/status bar grey. */
|
||
.ze-mgrbar {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
/* Measured off the real pane: 34px wide, 32px button pitch (so no gap
|
||
between them), 4px of lead-in at the top. */
|
||
width: 34px;
|
||
padding: 4px 0;
|
||
gap: 0;
|
||
background: var(--content-bg);
|
||
border-right: 1px solid var(--chrome-border);
|
||
}
|
||
.ze-mgrbar button {
|
||
width: 32px;
|
||
height: 32px;
|
||
padding: 0;
|
||
border: 1px solid transparent;
|
||
border-radius: 0;
|
||
background: transparent;
|
||
cursor: default;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
.ze-mgrbar button:hover {
|
||
background: var(--accent-fill-checked);
|
||
border-color: var(--chrome-active);
|
||
}
|
||
/* common_settings.cpp: appearance.toolbar_icon_size defaults to 24. */
|
||
.ze-mgrbar img {
|
||
width: 24px;
|
||
height: 24px;
|
||
}
|
||
/* wxAuiToolBar draws its separators a good deal lighter than a window border -
|
||
#5f5f5f on the #373737 bar. Ours used --chrome-border, which read as a black
|
||
gouge across the strip rather than a hairline. */
|
||
.ze-mgrbar .sep {
|
||
width: 22px;
|
||
height: 1px;
|
||
background: var(--toolbar-separator);
|
||
margin: 3px 0;
|
||
}
|
||
|
||
/* Editor left dock: stacked Properties / Hierarchy / Selection Filter */
|
||
.ze-leftdock {
|
||
display: flex;
|
||
flex-direction: column;
|
||
width: 240px;
|
||
}
|
||
/* What separates a dock from the toolbar beside it is wxAUI's SASH, not a
|
||
rule. Every pane docked here is added with `PaneBorder( false )` —
|
||
pcbnew's Properties and Appearance (pcb_edit_frame.cpp:345,382), GerbView's
|
||
Layers Manager (gerbview_frame.cpp:170), the project tree
|
||
(kicad_manager_frame.cpp:236) — so wxAUI draws no border at all and the only
|
||
thing between the pane and its neighbour is `wxAUI_DOCKART_SASH_SIZE` of
|
||
`wxAUI_DOCKART_SASH_COLOUR`: 5px of #373737, the same face as the toolbar,
|
||
which is why the two read as one strip.
|
||
|
||
[px] pcbnew 1920x1200, scanned at y=1000: the Properties pane ends at x=365,
|
||
then #373737 through x=370, then the 34px left toolbar at 371..404. Ours
|
||
drew 1px of --chrome-border there and rendered the sash into a column, where
|
||
a `width`-only rule collapses it to nothing — so our strip measured 35px
|
||
against KiCad's 40 and had a black rule down its outer edge.
|
||
|
||
The rule survives only for a dock that has NOT been given its sash yet
|
||
(SymbolEditor, SchematicEditor, FootprintEditor, the project manager);
|
||
without it those butt straight into the canvas. Scoped rather than restated
|
||
so that giving one of them a `<DockSash>` is the whole change. */
|
||
.ze-leftdock:not(:has(+ .ze-dock-sash)) {
|
||
border-right: 1px solid var(--chrome-border);
|
||
}
|
||
/* The same dock column on the other side, for pl_editor's Props pane —
|
||
`.Right().Layer( 3 )`, outside the RightToolbar's `.Layer( 2 )`
|
||
(pl_editor_frame.cpp:197-204). Only the edge that carries the separator
|
||
differs, because that edge is the one facing the canvas.
|
||
|
||
Deliberately NOT `.ze-rightdock`: that is pcbnew's Appearance + Selection
|
||
Filter stack, which stacks two panes in one dock and clips them so only the
|
||
notebook scrolls.
|
||
|
||
`min-width` is the pane's `.MinSize( m_propertiesPagelayout->GetMinSize() )`
|
||
(pl_editor_frame.cpp:203) — the panel's own content minimum, which wxAUI
|
||
takes over BestSize whenever it is larger. The width is content, the way
|
||
`.ze-modal` is `Fit()`.
|
||
|
||
This one keeps its border where the docks above lose theirs, because this
|
||
pane is the one that asked for it: `EDA_PANE().Palette()` sets
|
||
`PaneBorder( true )` (eda_base_frame.h:965-970) and pl_editor never turns it
|
||
back off, unlike pcbnew and GerbView. So the colour is wxAUI's border, not
|
||
--chrome-border, and it sits INSIDE the sash: canvas, toolbar, 5px sash,
|
||
1px #292929, pane. */
|
||
.ze-leftdock.on-right {
|
||
border-right: none;
|
||
border-left: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
min-width: min-content;
|
||
}
|
||
/* The centre pane and whatever wxAUI puts in LAYER 0 around it.
|
||
|
||
A `.Bottom()` pane with no `.Layer()` call takes the default layer 0, and
|
||
wxAUI nests docks outward by layer, so it is the innermost ring: it spans
|
||
only the width of the canvas, and the left/right docks (layer 3) and the
|
||
toolbars (layer 2) run their full height alongside it. That is why this is a
|
||
column of its own rather than a rule on `.ze-canvas-wrap` — the wrap is the
|
||
centre pane, and the layer-0 docks are its siblings, not its children.
|
||
|
||
`.ze-canvas-wrap` keeps its `flex: 1` here and grows down the column instead
|
||
of across the row; `min-height: 0` is what lets it shrink when the dock
|
||
below it is dragged taller. */
|
||
.ze-canvas-col {
|
||
flex: 1;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* A pane docked at the bottom of that column — eeschema's and pcbnew's Search
|
||
panes (`sch_edit_frame.cpp:290-300`). Height comes from the pane's own
|
||
`BestSize`/`MinSize` and is set on the element, the way the left dock's width
|
||
is.
|
||
|
||
No edge of its own: the Search pane is `.PaneBorder( false )`
|
||
(pcb_edit_frame.cpp:403-405), so the only line between it and the canvas is
|
||
the canvas pane's own border, which .ze-canvas-wrap draws. This carried a
|
||
--chrome-border of its own, which doubled that line the moment the pane was
|
||
opened. */
|
||
.ze-bottomdock {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
}
|
||
/* ---- The eeschema left dock and HIERARCHY_PANE ------------------------------
|
||
|
||
Three of the four panes in this column are `EDA_PANE().Palette()` —
|
||
`PaneBorder( true )` (eda_base_frame.h:965-970): the hierarchy
|
||
(sch_edit_frame.cpp:260), Properties and the Net Navigator
|
||
(eeschema_settings.cpp:74, :96). wxAUI draws that border as 1px of
|
||
wxAUI_DOCKART_BORDER_COLOUR round caption and content together, and puts
|
||
wxAUI_DOCKART_SASH_SIZE of wxAUI_DOCKART_SASH_COLOUR between neighbouring
|
||
panes. The Selection Filter alone is `PaneBorder( false )`
|
||
(eeschema_settings.cpp:118), so its caption sits straight on the sash.
|
||
|
||
[px] eeschema 10.0.5, 1920x1200, one column at x=200 top to bottom:
|
||
Properties' grid ends, #181818 (the grid's own frame), #292929 (pane border),
|
||
5px #373737 (sash), #292929 (pane border), 17px #2E2E2E (caption), #181818
|
||
(the tree's own frame), tree #272727 … #181818, #292929, 5px #373737, then
|
||
17px #2E2E2E (the Selection Filter's caption) straight into #373737, the
|
||
panel face, with no #292929 either side of it. Across at y=900: #292929 at
|
||
the dock's left edge, the tree frame, the tree, the frame, #292929, then the
|
||
5px sash and the 34px left toolbar.
|
||
|
||
Ours drew every pane in --panel-bg with a #1e1e1e rule under it, a
|
||
transparent 5px sash and no pane border, and the Selection Filter's body in
|
||
--panel-header, so it read as a box of its own instead of running into the
|
||
frame below. */
|
||
.sch-leftdock {
|
||
background: var(--aui-sash);
|
||
}
|
||
.sch-leftdock > .ze-panel.grow {
|
||
border: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
}
|
||
.sch-leftdock > .ze-splitter.horizontal {
|
||
margin-top: 0;
|
||
background: var(--aui-sash);
|
||
}
|
||
/* The caption is the 17px strip `.ze-panel-header` already states. This
|
||
carried `padding: 3px`, which stacked 6px on the 8pt line and made every
|
||
caption in the column 20px — the shared rule is right, so nothing is said
|
||
here. */
|
||
|
||
/* HIERARCHY_TREE (eeschema/widgets/hierarchy_pane.h:13-21):
|
||
|
||
wxTreeCtrl( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS | wxTR_HIDE_ROOT, ... )
|
||
|
||
On GTK that is wxGenericTreeCtrl, which paints every row itself
|
||
(src/generic/treectlg.cpp, PaintLevel :2765 / PaintItem :2556), so the
|
||
layout below is its arithmetic, not a flex approximation of it — every
|
||
number is either wx's own or read off the realised widget by
|
||
`qa/probes/hierarchy_tree_probe.cpp`:
|
||
|
||
m_indent 15, m_spacing 18 (Init, :984-985)
|
||
row height 24: char height 18 + 4, + 2 (CalculateLineHeight, :2427-2472)
|
||
first row at y = 2 (OnPaint, :3052)
|
||
level L x = 15L; item X = x + 18; icon 16px at X, y + 4; text at
|
||
X + 16 + MARGIN_BETWEEN_IMAGE_AND_TEXT(4) (:2801, :2716)
|
||
lead-in y_mid, from x - m_indent (x itself at level 1) to X (:2864-2870)
|
||
trunk at x, from y_mid + 5 ("if (HasButtons) y_mid += 5") to the
|
||
last child's y_mid (:2928-2952)
|
||
button a 9x9 DrawTreeItemButton centred on (x, y_mid) (:2895-2913)
|
||
selection from X + 17 to the text's end + 3, the full row height, and
|
||
nothing under the icon (:2632-2648)
|
||
current SetItemBold + SetFocusedItem (hierarchy_pane.cpp:145-190),
|
||
and SetFocusedItem is SelectItem in this control (:2020), so
|
||
the current sheet is the selected row and shows its selected
|
||
image, tree_sel, where the rest show tree_nosel
|
||
|
||
The control's origin is the frame line itself — [px] the trunk is at
|
||
x=15 and the first row at y=2 counted from the #181818 pixel — so the
|
||
content box, which starts one pixel in, sees every wx x as x - 1. That is
|
||
the "- 1px" in --x, and the 1px of padding-top is wx's y = 2 less the same.
|
||
|
||
The dotted pen is `wxPen( wxSYS_COLOUR_GRAYTEXT, 1, wxPENSTYLE_DOT )`
|
||
(:1084). What lands on screen is not GRAYTEXT's #929292 nor a 1-on-1-off
|
||
dot: [px] two pixels of #858585 then two of the tree's #272727, in phase
|
||
with the line's start, on both the lead-ins and the trunk. So the guides
|
||
are drawn as that pattern rather than with `border-style: dotted`, whose
|
||
round 1px dots are a different mark. */
|
||
.ze-hiertree {
|
||
/* [data] wx paints from y = 2 (treectlg.cpp:3052) inside the frame's own
|
||
pixel; see above. */
|
||
padding: 1px 0 0;
|
||
border: 1px solid var(--ctl-border);
|
||
background: var(--chrome-bg2);
|
||
overflow: auto;
|
||
position: relative;
|
||
/* [px] the on-pixels of the dotted guides, measured on the tree. */
|
||
--hier-guide: #858585;
|
||
}
|
||
.ze-hier-node {
|
||
position: relative;
|
||
/* wx's x for this level, in the content box's coordinates. `--lvl` is set
|
||
inline per node; 1 is the top-level sheet, the hidden root being level 0. */
|
||
--x: calc(var(--lvl) * 15px - 1px);
|
||
--X: calc(var(--x) + 18px);
|
||
}
|
||
.ze-hier-row {
|
||
position: relative;
|
||
/* [px] GetLineHeight(): 18 + 4 + 2 with this machine's 11pt font, read
|
||
back by qa/probes/hierarchy_tree_probe.cpp (every row h=24). */
|
||
height: 24px;
|
||
white-space: nowrap;
|
||
cursor: default;
|
||
}
|
||
/* The lead-in: from the parent's trunk to the icon, at y_mid. A top-level
|
||
sheet has no parent trunk; its line starts at its own x, under the button. */
|
||
.ze-hier-guide {
|
||
position: absolute;
|
||
top: 12px;
|
||
height: 1px;
|
||
left: calc(var(--x) - 15px);
|
||
width: 34px;
|
||
background: repeating-linear-gradient(to right, var(--hier-guide) 0 2px, transparent 2px 4px);
|
||
}
|
||
.ze-hiertree > .ze-hier-node > .ze-hier-row > .ze-hier-guide {
|
||
left: var(--x);
|
||
width: 19px;
|
||
}
|
||
/* The trunk, one segment per child so it also runs past an expanded child's
|
||
own subtree: the full node for a middle child, down to y_mid for the last.
|
||
The first child's segment reaches 7px above its row — the parent's y_mid + 5
|
||
— and the dash phase is counted from there, which is what the two
|
||
background-position values keep in step across 24px rows. */
|
||
.ze-hier-children > .ze-hier-node::before {
|
||
content: "";
|
||
position: absolute;
|
||
left: calc(var(--x) - 15px);
|
||
top: 0;
|
||
bottom: 0;
|
||
width: 1px;
|
||
background:
|
||
linear-gradient(var(--hier-guide) 0 2px, transparent 2px 4px) 0 1px / 1px 4px repeat-y;
|
||
}
|
||
.ze-hier-children > .ze-hier-node.first::before {
|
||
top: -7px;
|
||
background-position: 0 0;
|
||
}
|
||
.ze-hier-children > .ze-hier-node.last::before {
|
||
bottom: auto;
|
||
/* [data] to y_mid, half the row (treectlg.cpp:2803, 2931). */
|
||
height: 12px;
|
||
}
|
||
.ze-hier-children > .ze-hier-node.first.last::before {
|
||
/* [data] the same 12, plus the 7 above the row. */
|
||
height: 19px;
|
||
}
|
||
/* DrawTreeItemButton's 9x9 rect. GTK renders its expander arrow into it:
|
||
[px] a 9px-wide chevron, peak #B4B4B4 on the tree's ground, 4 rows deep with
|
||
its point one row below y_mid. Collapsed, the same arrow points right. */
|
||
.ze-hier-button,
|
||
.ze-gentree-button {
|
||
position: absolute;
|
||
left: calc(var(--x) - 4px);
|
||
top: 8px;
|
||
width: 9px;
|
||
/* [data] FromDIP(9) (treectlg.cpp:2895-2896). */
|
||
height: 9px;
|
||
background:
|
||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpolyline points='0.5,2.5 4.5,6.5 8.5,2.5' fill='none' stroke='%23c0c0c0' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E")
|
||
center / 9px 9px no-repeat;
|
||
}
|
||
.ze-hier-button:not(.open),
|
||
.ze-gentree-button:not(.open) {
|
||
transform: rotate(-90deg);
|
||
}
|
||
/* [data] BITMAPS::tree_nosel / tree_sel, the dark set (resources/bitmaps_png/
|
||
sources/dark/tree_nosel.svg, tree_sel.svg): a circle r=10 in a 24-unit box,
|
||
#8f8f8f and #42B8EB, rasterised at 16px as the 16px PNGs are. */
|
||
.ze-hier-icon {
|
||
position: absolute;
|
||
left: var(--X);
|
||
top: 4px;
|
||
width: 16px;
|
||
/* [art] tree_nosel_dark_16.png / tree_sel_dark_16.png, the 16px raster. */
|
||
height: 16px;
|
||
background:
|
||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%238f8f8f'/%3E%3C/svg%3E")
|
||
center / 16px 16px no-repeat;
|
||
}
|
||
.ze-hier-icon.sel {
|
||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2342B8EB'/%3E%3C/svg%3E");
|
||
}
|
||
/* In flow rather than absolute so a long name still widens the row and the
|
||
tree scrolls. The 3px each side is the selection band's reach past the
|
||
text (rect.x -= 1, width += 2 on top of the -2/+2 at :2632-2640), which
|
||
also puts the text at X + 20. */
|
||
.ze-hier-label {
|
||
display: inline-block;
|
||
/* [data] the band starts at X + 17 (treectlg.cpp:2632-2640). */
|
||
margin-left: calc(var(--X) + 17px);
|
||
/* [px] the row, as above. */
|
||
height: 24px;
|
||
/* [px] the row again: DrawText centres text_h in total_h (:2722-2725). */
|
||
line-height: 24px;
|
||
/* [data] rect.x -= 1, width += 2 over the -2/+2 (treectlg.cpp:2632-2640). */
|
||
padding: 0 3px;
|
||
color: var(--view-fg);
|
||
vertical-align: top;
|
||
}
|
||
/* DrawItemSelectionRect: GTK's selected-row fill — flat, square-cornered,
|
||
[px] #E95420 whether or not the tree has focus — under HIGHLIGHTTEXT, and
|
||
the row is the bold one. */
|
||
.ze-hier-label.sel {
|
||
background: var(--chrome-active);
|
||
color: #fff;
|
||
font-weight: 700;
|
||
}
|
||
|
||
/* The same wxGenericTreeCtrl with the Net Navigator's style word
|
||
(createHighlightedNetNavigator, sch_edit_frame.cpp:2540):
|
||
`wxTR_DEFAULT_STYLE | wxNO_BORDER` - buttons, no lines, the root SHOWN, no
|
||
frame - and no image list. The arithmetic is HIERARCHY_TREE's above; only the
|
||
flags move it. `qa/probes/net_navigator_probe.cpp` reads it back:
|
||
|
||
row height 22: char height 18 + 4, nothing taller than the text
|
||
first row at y = 2
|
||
level L (the root is level 0, and shown, so it costs an indent)
|
||
x = 15(L + 1); item X = x + 18; the text at X - no image
|
||
(root 33, level 1 48, level 2 63)
|
||
button the 9x9 DrawTreeItemButton centred on (x, y_mid)
|
||
selection the text's start - 3 to its end + 3, the full row
|
||
lines none (wxTR_NO_LINES), and no frame (wxNO_BORDER), so the
|
||
content box is the control's own origin */
|
||
.ze-gentree {
|
||
/* [data] wx paints from y = 2 (treectlg.cpp:3052). */
|
||
padding-top: 2px;
|
||
background: var(--chrome-bg2);
|
||
overflow: auto;
|
||
position: relative;
|
||
}
|
||
.ze-gentree-node {
|
||
/* `--lvl` is set inline per node: 0 for the root. */
|
||
--x: calc((var(--lvl) + 1) * 15px);
|
||
--X: calc(var(--x) + 18px);
|
||
}
|
||
.ze-gentree-row {
|
||
position: relative;
|
||
/* [px] GetLineHeight(): 18 + 4, every row h=22 in qa/probes/net_navigator_probe.cpp. */
|
||
height: 22px;
|
||
white-space: nowrap;
|
||
cursor: default;
|
||
}
|
||
.ze-gentree-button {
|
||
/* [data] y_mid - 4 for the 9px button in a 22px row. */
|
||
top: 7px;
|
||
}
|
||
.ze-gentree-label {
|
||
display: inline-block;
|
||
/* [data] the band starts 3 before the text, which starts at X (treectlg.cpp:2632-2640). */
|
||
margin-left: calc(var(--X) - 3px);
|
||
/* [px] the row, as above. */
|
||
height: 22px;
|
||
/* [px] DrawText centres the text in the row. */
|
||
line-height: 22px;
|
||
/* [data] rect.x -= 1, width += 2 over the -2/+2 (treectlg.cpp:2632-2640). */
|
||
padding: 0 3px;
|
||
color: var(--view-fg);
|
||
vertical-align: top;
|
||
}
|
||
/* DrawItemSelectionRect: GTK's selected-row fill under HIGHLIGHTTEXT. */
|
||
.ze-gentree-label.sel {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
|
||
/* Right dock (LayersManager + SelectionFilter panes): at the window edge,
|
||
outside the right toolbar, like pcbnew's AUI Right().Layer(4). It fills the
|
||
body height; the Appearance pane grows and scrolls internally while the
|
||
Selection Filter stays pinned at the bottom (fixed height), matching KiCad's
|
||
AUI layout where only the notebook scrolls. */
|
||
.ze-rightdock {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
}
|
||
/* The mirror of `.ze-leftdock:not(:has(+ .ze-dock-sash))`, and for the same
|
||
reason: where the sash is there, it is the separation. The sash precedes
|
||
this dock rather than following it, because it is the pane's canvas-facing
|
||
edge that carries it. */
|
||
:not(.ze-dock-sash) + .ze-rightdock {
|
||
border-left: 1px solid var(--chrome-border);
|
||
}
|
||
/* In the dock the panes stack vertically, so drop the fixed 220px width.
|
||
|
||
The pane is a plain wxPanel and takes wxSYS_COLOUR_3DFACE like any other.
|
||
`m_layerPanelColour` is NOT the pane: it is
|
||
`m_panelLayers->GetBackgroundColour().ChangeLightness( 110 )` and
|
||
APPEARANCE_CONTROLS sets it on `m_windowLayers` and on each row's panel
|
||
(appearance_controls.cpp:1240-1269), i.e. on the LIST inside the notebook.
|
||
Painting the whole pane with it made the tab strip, the Presets/Viewports
|
||
block and the Selection Filter read as one flat sheet of #4b4b4b where
|
||
KiCad has #373737 around a #4b4b4b list — [px] pcbnew down x=1915: pane
|
||
face 188..192, tab strip 194..229, list 250..808, then #373737 again from
|
||
835 through the Selection Filter.
|
||
|
||
No border between the two panes either. They share a dock row, so what
|
||
wxAUI puts between them is a sash, and a sash is the same #373737 as the
|
||
panes — invisible, where our rule drew a black rule above the Selection
|
||
Filter caption. */
|
||
.ze-rightdock .ze-panel {
|
||
width: auto;
|
||
background: var(--content-bg);
|
||
}
|
||
/* Appearance pane: grows to fill and clips, so its notebook body scrolls. */
|
||
.ze-rightdock .ze-panel.grow {
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
}
|
||
/* Selection Filter pane: fixed at the bottom, sized to its content —
|
||
`m_auimgr.GetPane( "SelectionFilter" ).dock_proportion = 0`
|
||
(pcbnew/pcb_edit_frame.cpp:422). Same class as the left dock's, because it is
|
||
the same statement upstream; see the note there for why it is opt-in. */
|
||
.ze-rightdock .ze-panel.fixed {
|
||
flex: 0 0 auto;
|
||
border-bottom: none;
|
||
}
|
||
/* Layer Display Options / Presets / Viewports sit below the scroll, fixed. */
|
||
.ze-rightdock .ze-collapsepane,
|
||
.ze-rightdock .ze-appearance-bottom {
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
/* APPEARANCE_CONTROLS layer row: [indicator][swatch][eye][name] */
|
||
/* KIUI::GetInfoFont — getGUIFont( win, -1 ), the GUI font less one point, so
|
||
10 pt (ui_common.cpp:155). APPEARANCE_CONTROLS sets it on the layers panel,
|
||
the objects panel, both Nets labels and the presets/viewports labels
|
||
(appearance_controls.cpp:444-453), and PANEL_SELECTION_FILTER sets it on
|
||
every checkbox (panel_selection_filter.cpp:36-49). One font upstream, so one
|
||
token here — these rules used to write 12px and 13px between them. */
|
||
.ze-layer-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
padding: 1px 5px 1px 2px;
|
||
font-size: var(--ui-font-size-info);
|
||
line-height: 1.35;
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-layer-row:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-layer-row.active {
|
||
background: var(--panel-list-row-active);
|
||
}
|
||
.ze-ellipsis {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
/* INDICATOR_ICON, the marker on the active layer row - the ONE thing
|
||
LAYER_WIDGET::SelectLayerRow changes, so it is all that says which layer is
|
||
active.
|
||
|
||
The box is KIUI::c_IndicatorSizeDIP, 10 (`include/widgets/ui_common.h:52`).
|
||
The arrow inside it is not the whole box: `createArrow( size, scale, 1, ... )`
|
||
(`common/widgets/indicator_icon.cpp:93-121`) plots an UP triangle one pixel
|
||
wider each row from `startX = ( size - 1 ) / 2`, `startY = aDirection % 2`,
|
||
for `size / 2` rows - x=4..4, 3..5, 2..6, 1..7, 0..8 over y=1..5 - and then
|
||
`image.Rotate90()` turns it right, mapping (x,y) to (H-1-y, x). That lands a
|
||
triangle with its flat edge at x=4 spanning y=0..8 and its apex at (8,4):
|
||
5 across, 9 down, inside a 10 px box. A live GerbView pane measures exactly
|
||
that, at exactly those offsets from the list edge.
|
||
|
||
[data] rgb(64, 72, 255) is KiCad's own literal at `indicator_icon.cpp:216` -
|
||
a colour it picks itself rather than asking the theme for, which is why it is
|
||
this saturated blue and not a chrome tone. Ours was #4d7fc4. */
|
||
.ze-layer-indicator {
|
||
width: var(--indicator-size);
|
||
height: var(--indicator-size);
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-layer-indicator.on {
|
||
background: rgb(64 72 255); /* [data] indicator_icon.cpp:216 */
|
||
clip-path: polygon(4px 0, 4px 9px, 9px 4.5px);
|
||
}
|
||
/* COLOR_SWATCH (SWATCH_SMALL) */
|
||
/* COLOR_SWATCH::RenderToDC fills the rect with DrawRectangle under
|
||
`aDC->SetPen( *wxTRANSPARENT_PEN )` (`common/widgets/color_swatch.cpp:72`):
|
||
no outline and no rounding anywhere in that function. The 1 px #444 border
|
||
and the 2 px radius here were ours, and they ate two of the swatch's
|
||
fourteen rows. */
|
||
/* `COLOR_SWATCH::RenderToDC` opens with `aDC->SetPen( *wxTRANSPARENT_PEN )`
|
||
(`common/widgets/color_swatch.cpp:72`) and paints nothing but the colour: no
|
||
outline, and the white margin rectangles at :136-148 only appear when a
|
||
caller passes aMargins, which LAYER_WIDGET does not. Ours is a <button>, and
|
||
a bare button takes the user agent's 2px OUTSET border - which rendered as
|
||
the white-and-grey bevel Akshay saw around every swatch, where KiCad has a
|
||
flat rectangle of colour. Same class of defect as the notebook tabs coming
|
||
out in Arial: an element inherits chrome from the UA unless told not to. */
|
||
.ze-layer-swatch {
|
||
width: var(--swatch-small-w);
|
||
height: var(--swatch-small-h);
|
||
flex: 0 0 auto;
|
||
border: none;
|
||
padding: 0;
|
||
}
|
||
/* BITMAP_TOGGLE visibility eye: an inline-SVG button that always renders,
|
||
drawn in a light grey that stays visible on the grey list background. */
|
||
.ze-eye-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 18px;
|
||
height: 16px;
|
||
flex: 0 0 auto;
|
||
padding: 0;
|
||
border: none;
|
||
background: transparent;
|
||
cursor: default;
|
||
color: #d6d8db;
|
||
}
|
||
.ze-eye-btn:hover {
|
||
color: #ffffff;
|
||
}
|
||
.ze-eye {
|
||
display: block;
|
||
}
|
||
|
||
/* Objects tab row: [swatch|spacer][eye|spacer][label][opacity slider] */
|
||
/* Objects tab row, spaced like KiCad's appendObject:
|
||
[swatch] 5px [eye] 5px [label] [slider], 2px between rows. */
|
||
/* The gap `RR()` leaves between Objects groups: m_pointSize / 2, where
|
||
m_pointSize is wxSYS_DEFAULT_GUI_FONT's point size — 11 pt, so 5 px
|
||
(appearance_controls.cpp:2461). Ours was a round 8. */
|
||
.ze-object-sep {
|
||
/* [data] m_objectsOuterSizer->AddSpacer( m_pointSize / 2 ), where m_pointSize
|
||
is wxSYS_DEFAULT_GUI_FONT's point size — 11, so 5 (appearance_controls.cpp:2461). */
|
||
height: 5px;
|
||
}
|
||
.ze-object-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
padding: 1px 5px 1px 2px;
|
||
font-size: var(--ui-font-size-info);
|
||
line-height: 1.35;
|
||
white-space: nowrap;
|
||
}
|
||
/* A row is as tall as its tallest child, and on the six rows that carry an
|
||
opacity control that child is the wxSlider. `qa/probes/appearance_row_probe.cpp`
|
||
builds one and asks: 34 px, the same answer wx gives for a wxTextCtrl, which
|
||
is why this is --ctl-height and not a number of its own. [px] pcbnew's
|
||
Objects page confirms it from the other side — Tracks, Vias, Pads, Zones,
|
||
Filled Shapes and Images repeat every 34 px while the rows below them, which
|
||
have no slider, repeat every 20. Ours was 22 for both. */
|
||
.ze-object-row.has-slider {
|
||
height: var(--ctl-height);
|
||
box-sizing: border-box;
|
||
}
|
||
/* Label column: opacity rows fix its width so the sliders align (KiCad's
|
||
label->SetMinSize(labelWidth)); other rows let the label fill. */
|
||
.ze-obj-label {
|
||
flex: 1;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.ze-obj-label.fixed {
|
||
flex: 0 0 auto;
|
||
width: 80px;
|
||
}
|
||
/* Opacity slider: KiCad's compact wxSlider, a thin track with a small round
|
||
thumb, not the browser's tall default control. The filled left portion is
|
||
set inline as a gradient so it shows the current value. */
|
||
/* The opacity control on an Objects row. The WIDGET is `ui/Slider` — a
|
||
wxSlider is a wxSlider wherever KiCad opens one — so all that belongs here is
|
||
where this call site puts it: `ctl_opacity->SetMinSize` gives it a fixed
|
||
width and the row's sizer right-aligns it.
|
||
|
||
This used to be a `<input type="range">` of its own, with a `#55585d`
|
||
trough, an 11px `#d0d3d7` thumb and `--slider-fill`'s #e8912b — three
|
||
colours and two sizes GTK draws nowhere. [px] the real control on pcbnew's
|
||
Tracks row: a 4px trough, #e95420 left of the knob and #4b4b4b right of it,
|
||
under a 20px #fcfcfc circle. Every one of those is already a token, and
|
||
`.ze-slider` already consumes them. */
|
||
.ze-opacity {
|
||
flex: 0 0 auto;
|
||
/* [px] the slider box measured x 1806..1905 on a pane whose content ends at
|
||
1918, i.e. 100 wide — which is also what wx answers for a wxSlider built
|
||
with wxDefaultSize (qa/probes/appearance_row_probe.cpp: best 100 x 34). */
|
||
width: 100px;
|
||
}
|
||
|
||
/* Color swatch that opens a picker (COLOR_SWATCH): the native color input is
|
||
hidden inside the swatch label so clicking the square opens the dialog. */
|
||
.ze-layer-swatch.picker {
|
||
cursor: default;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
.ze-layer-swatch.picker input[type="color"] {
|
||
position: absolute;
|
||
inset: 0;
|
||
opacity: 0;
|
||
cursor: default;
|
||
padding: 0;
|
||
border: none;
|
||
}
|
||
/* A net/netclass with no custom color: a plain empty swatch (dark with a
|
||
border), like KiCad's uncolored COLOR_SWATCH, click it to assign a color. */
|
||
/* COLOR_SWATCH holding COLOR4D::UNSPECIFIED — an Objects row with no theme
|
||
colour, a net or a netclass with no override. It is not a flat grey; it is a
|
||
checkerboard, and on a dark parent COLOR_SWATCH::RenderToDC takes the branch
|
||
`black = COLOR4D::BLACK; white = black.Brightened( 0.15 )`
|
||
(`common/widgets/color_swatch.cpp:79-93`).
|
||
|
||
[data] KiCad's own constants, not the theme's: 0.15 * 255 = 38 = #262626,
|
||
and that is exactly what a live pcbnew paints — sampled off the Objects tab
|
||
of KiCad 10.0.5 on this machine, whose Tracks swatch reads #262626/#000000
|
||
in 6x7 px cells across the 16x14 swatch, top-left cell #262626 (the loop
|
||
opens with `colCycle = rowCycle`, which is false on a dark ground).
|
||
CHECKERBOARD_SIZE_DU is (3,3) and converts asymmetrically, which is why the
|
||
cell is 6 wide and 7 tall rather than square. */
|
||
.ze-layer-swatch.unset {
|
||
/* [data] COLOR4D::BLACK.Brightened( 0.15 ): 0.15 * 255 = 38 = #262626
|
||
(color_swatch.cpp:79-93). [px] a live pcbnew's Tracks swatch reads #262626. */
|
||
background-color: #262626;
|
||
/* [data] the same pair, black first so the top-left cell is the brightened
|
||
one — the loop opens with `colCycle = rowCycle`, false on a dark ground. */
|
||
background-image: conic-gradient(#000000 0 25%, #262626 0 50%, #000000 0 75%, #262626 0);
|
||
/* [px] twice the cell. CHECKERBOARD_SIZE_DU is (3,3) and converts
|
||
asymmetrically; the sampled cell is 6 px wide and 7 px tall. */
|
||
background-size: 12px 14px;
|
||
}
|
||
|
||
/* Nets tab: the Nets grid and the Net Classes list each sit in their own
|
||
boxed section (KiCad splits them into two panels of the notebook). */
|
||
/* `m_panelNets` and `m_panelNetclasses`, the two halves of the Nets tab's
|
||
splitter. Each is a bare `wxPanel` (appearance_controls_base.cpp:54, :111):
|
||
no border, no corner radius and no background of its own — [px] pcbnew's
|
||
Nets tab is an unbroken #272727 from the tab strip's rule at y=230 down to
|
||
the sash at y=511, with the two headers sitting straight on it. This drew a
|
||
rounded #313438 box with a --chrome-border frame around each, none of which
|
||
GTK paints anywhere.
|
||
|
||
They scroll inside their own half rather than pushing each other: that is
|
||
what the splitter is for, and `max-height: 40vh` was standing in for it. */
|
||
.ze-nets-box {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
}
|
||
/* The lower half takes what the sash leaves it. */
|
||
.ze-nets-box.grow {
|
||
flex: 1 1 auto;
|
||
}
|
||
/* `m_netsGrid`, and a wxGrid is a CONTROL: it paints its own cell background
|
||
over the panel's, which is what makes the net list read as a box inside the
|
||
Nets panel while the netclass list below it does not. [px] pcbnew's Nets
|
||
tab, panel face #272727: the grid is an unbroken #373737 from x=1677 to
|
||
x=1912 and from just under the header down to the sash, with the selected
|
||
row #181818 inside it. Ours drew the rows straight on the panel, so there
|
||
was no box at all — and before that a rounded #313438 one, which is neither.
|
||
|
||
[data] `bSizer192->Add( m_netsGrid, 0, wxALL|wxEXPAND, 5 )`
|
||
(appearance_controls_base.cpp:105) — the 5px inset on all four sides. */
|
||
.ze-nets-list {
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
overflow-y: auto;
|
||
background: var(--content-bg);
|
||
/* [data] wxALL, 5 (appearance_controls_base.cpp:105). */
|
||
margin: 5px;
|
||
}
|
||
/* `m_netclassScrolledWindow` is a wxScrolledWindow, not a grid: no background
|
||
of its own, just the same 5px — [data] `bSizerNetClasses->Add(
|
||
m_netclassScrolledWindow, 1, wxEXPAND | wxALL, 5 )` (:138). */
|
||
.ze-nets-box.grow > .ze-netclass-list {
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
overflow-y: auto;
|
||
/* [data] wxALL, 5 (appearance_controls_base.cpp:138). */
|
||
margin: 5px;
|
||
}
|
||
|
||
/* Nets tab headers ("Nets" / "Net Classes"): a label that takes the row and a
|
||
BITMAP_BUTTON at its right. Both labels take KIUI::GetInfoFont like the rest
|
||
of the panel (appearance_controls.cpp:445-446), and neither is bold — they
|
||
are plain wxStaticText. */
|
||
.ze-nets-header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-size: var(--ui-font-size-info);
|
||
/* [data] `bSizer17->Add( m_staticTextNets, 1, wxALIGN_CENTER_VERTICAL |
|
||
wxRIGHT | wxLEFT, 5 )` and the same flags on the button
|
||
(appearance_controls_base.cpp:63, :73), then `bSizer192->Add( bSizer17, 0,
|
||
wxEXPAND, 5 )` (:76) — wxEXPAND with no wxTOP, so the row sits hard
|
||
against the top of the panel. Ours added 2px above and 4px below, which is
|
||
why our "Nets" title sat lower than KiCad's. */
|
||
margin: 0;
|
||
/* [data] wxRIGHT|wxLEFT, 5 on both children (appearance_controls_base.cpp:63, :73). */
|
||
padding: 0 5px;
|
||
}
|
||
.ze-nets-header span {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
/* BITMAP_BUTTON with SetPadding( 2 ) (appearance_controls.cpp:472, :475). */
|
||
.ze-bitmap-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
/* [data] BITMAP_BUTTON::SetPadding( 2 ) (appearance_controls.cpp:472, :475). */
|
||
padding: 2px;
|
||
flex: 0 0 auto;
|
||
border: none;
|
||
background: transparent;
|
||
color: inherit;
|
||
cursor: default;
|
||
}
|
||
.ze-bitmap-btn:disabled {
|
||
opacity: 0.4;
|
||
}
|
||
|
||
/* WX_COLLAPSIBLE_PANE ("Layer Display Options" / "Net Display Options") */
|
||
/* WX_COLLAPSIBLE_PANE. No rule above it: it changes colour instead, taking the
|
||
notebook's theme background where the list above it wears m_layerPanelColour
|
||
— [px] pcbnew down x=1915, #4b4b4b through y=808 and #272727 from 809, with
|
||
no line between. The colour is stated where the widget puts the pane; this
|
||
is only its sizer inset. */
|
||
.ze-collapsepane {
|
||
padding: 4px 6px;
|
||
}
|
||
.ze-collapse-toggle {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
width: 100%;
|
||
background: transparent;
|
||
border: none;
|
||
color: inherit;
|
||
font-size: var(--ui-font-size-info);
|
||
cursor: default;
|
||
padding: 2px 0;
|
||
}
|
||
/* Disable(): GTK's label:disabled ink. */
|
||
.ze-collapse-toggle:disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
.ze-collapse-arrow {
|
||
width: 8px;
|
||
height: 8px;
|
||
background: currentColor;
|
||
clip-path: polygon(0 0, 100% 50%, 0 100%);
|
||
transition: transform 0.1s;
|
||
}
|
||
.ze-collapse-arrow.open {
|
||
transform: rotate(90deg);
|
||
}
|
||
.ze-collapse-body {
|
||
padding: 2px 2px 4px 14px;
|
||
font-size: var(--ui-font-size-info);
|
||
}
|
||
.ze-collapse-body label {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
cursor: default;
|
||
}
|
||
.ze-info {
|
||
font-size: var(--ui-font-size-info);
|
||
opacity: 0.85;
|
||
margin-bottom: 2px;
|
||
}
|
||
.ze-hr {
|
||
border: none;
|
||
border-top: 1px solid var(--chrome-border);
|
||
margin: 6px 0 4px;
|
||
}
|
||
.ze-disabled {
|
||
opacity: 0.4;
|
||
cursor: default;
|
||
}
|
||
|
||
/* Presets / Viewports row under the Appearance notebook */
|
||
/* bBottomMargin, the Presets / Viewports block. It sits OUTSIDE the notebook
|
||
(`m_sizerOuter->Add( bBottomMargin, 0, wxEXPAND|wxTOP|wxBOTTOM, 4 )`,
|
||
appearance_controls_base.cpp:192), so the line above it is the notebook's own
|
||
bottom edge and not a rule of its own. Ours drew both, which put two lines
|
||
there. */
|
||
.ze-appearance-bottom {
|
||
padding: 6px;
|
||
font-size: var(--ui-font-size-info);
|
||
}
|
||
/* `bPresets->Add( m_cbLayerPresets, 0, wxALL|wxEXPAND, 2 )`
|
||
(appearance_controls_base.cpp:169, :186): both choices EXPAND to the block's
|
||
width and carry 2px on every side. `.ze-combo` brings its own look; only the
|
||
sizer flags belong here. */
|
||
.ze-appearance-bottom .ze-combo {
|
||
/* [data] wxALL, 2 (appearance_controls_base.cpp:169, :186). */
|
||
margin: 2px;
|
||
/* wxEXPAND, less the border the line above puts on each side. */
|
||
width: calc(100% - 4px);
|
||
}
|
||
|
||
/* Native <select> comboboxes default to the OS light theme (white box on
|
||
Linux/GTK). Give KiCad's dark combobox look to every AppendControl combo —
|
||
.ze-tb-control is the slot Toolbar renders one into, so this covers the pcb
|
||
aux bar's five and the top bar's variant choice without naming a launcher —
|
||
plus the drop-down list itself. The .ze-select / .ze-cell-select classes
|
||
handle dialogs. The Presets / Viewports pair used to be here; they are
|
||
wxChoices (appearance_controls_base.cpp:165, :185) and are the shared
|
||
`Combo` now, which is what a wxChoice is.
|
||
|
||
It was scoped to `.ze-auxbar`, a class only the pcb editor's hand-rolled aux
|
||
div carried; when that div became a real toolbar the rule matched nothing. */
|
||
.ze-tb-control select {
|
||
background: var(--chrome-bg2);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 4px;
|
||
padding: 2px 6px;
|
||
font: inherit;
|
||
font-size: 12px;
|
||
outline: none;
|
||
}
|
||
/* A drop-down is a GTK button, which has no :focus border — only the dashed
|
||
keyboard rectangle. See the note on `.ze-app …:focus` above. */
|
||
.ze-tb-control select:focus {
|
||
outline: none;
|
||
}
|
||
.ze-tb-control select:focus-visible {
|
||
outline: 1px dashed var(--field-focus-border);
|
||
outline-offset: -3px;
|
||
}
|
||
.ze-tb-control select:disabled {
|
||
opacity: 0.55;
|
||
cursor: default;
|
||
}
|
||
/* The drop-down list items the browser paints when the combo is open. */
|
||
.ze-app select option {
|
||
background: var(--chrome-bg);
|
||
color: var(--chrome-fg);
|
||
}
|
||
/* A docked pane is sized by its dock, not by .ze-panel's own 220px default. */
|
||
.ze-leftdock .ze-panel,
|
||
.ze-bottomdock .ze-panel {
|
||
width: auto;
|
||
border-right: none;
|
||
}
|
||
/* Stacked panes are divided from each other; the bottom dock holds one. */
|
||
.ze-leftdock .ze-panel {
|
||
border-bottom: 1px solid var(--chrome-border);
|
||
}
|
||
.ze-bottomdock .ze-panel {
|
||
flex: 1;
|
||
min-height: 0;
|
||
}
|
||
/* A DOCKED PANE GROWS. wxAUI divides a dock row's length between the panes
|
||
sharing it in `wxAuiPaneInfo::dock_proportion` ("proportion while docked",
|
||
wx/aui/framemanager.h:391), and every `AddPane` in KiCad leaves it at the
|
||
value `DefaultPane()` gives it — so filling the dock is what a pane does
|
||
unless the frame says otherwise.
|
||
|
||
Saying otherwise is written out, and in the whole of KiCad 10.0.5 it is
|
||
written exactly four times, all of them the same pane:
|
||
|
||
eeschema/sch_edit_frame.cpp:324-325
|
||
// The selection filter doesn't need to grow in the vertical direction
|
||
// when docked
|
||
selectionFilterPane.dock_proportion = 0;
|
||
eeschema/symbol_editor/symbol_edit_frame.cpp:245
|
||
pcbnew/pcb_edit_frame.cpp:422
|
||
pcbnew/footprint_edit_frame.cpp:267
|
||
|
||
Nothing else in the tree zeroes it. The project manager's tree certainly
|
||
does not — `EDA_PANE().Palette().Name( "ProjectTree" ).Left().Layer( 1 )
|
||
.Caption( PROJECT_FILES_CAPTION ).PaneBorder( false ).MinSize( m_leftWinWidth,
|
||
-1 ).Floatable( false ).Movable( false )` (kicad/kicad_manager_frame.cpp:236-239)
|
||
sets a WIDTH and leaves the height to the dock — so it runs the full column.
|
||
|
||
`.fixed` is our `dock_proportion = 0`, and like upstream's it is opt-in. It
|
||
used to be `:not(.grow)`, the opposite polarity, which made every unmarked
|
||
pane fixed: at (0,3,0) that outranked `.ze-leftdock > .ze-panel` below and
|
||
collapsed the project tree to the height of its rows. */
|
||
.ze-leftdock .ze-panel {
|
||
flex: 1 1 0;
|
||
min-height: 0;
|
||
}
|
||
/* `MinSize( 240, 60 )` — `defaultPropertiesPaneInfo` (eeschema_settings.cpp:101)
|
||
and the panes that copy it. A growing pane may not be squeezed below it. */
|
||
.ze-leftdock .ze-panel.grow {
|
||
flex: 1;
|
||
min-height: 60px;
|
||
}
|
||
/* Selection Filter: a FIXED-SIZE pane, sized to its content.
|
||
`defaultSchSelectionFilterPaneInfo` (eeschema/eeschema_settings.cpp:109-125)
|
||
gives it `MinSize( 180, -1 )` and `BestSize( 180, -1 )` under its own comment,
|
||
"Fixed-size pane; -1 for MinSize height is required" - so it takes the height
|
||
its checkboxes need and the two growing panes above it share the rest. */
|
||
.ze-leftdock .ze-panel.fixed {
|
||
flex: 0 0 auto;
|
||
}
|
||
/* ...and it reads as ONE body with the frame around it, not a boxed pane.
|
||
`PANEL_SCH_SELECTION_FILTER` is a plain wxPanel, so its face is
|
||
wxSYS_COLOUR_3DFACE — --content-bg, the same face as the toolbar beside it
|
||
and the sash above it — under the ordinary 17px caption. [px] eeschema at
|
||
x=200: 17px of #2E2E2E then #373737 straight down to the status bar, and
|
||
pcbnew's right dock (`.ze-rightdock .ze-panel`) already says the same.
|
||
This stated --panel-header for BOTH caption and body, on the belief that
|
||
the two carried one colour; they do not, and the darker body was the box
|
||
that stood off the frame. */
|
||
.ze-leftdock .ze-panel.fixed {
|
||
background: var(--content-bg);
|
||
border-bottom: none;
|
||
}
|
||
/* PANEL_SCH_SELECTION_FILTER is the AUI pane's client area itself — the grid
|
||
sizer is set on the panel and `m_gridSizer->Fit( this )` sizes the panel to
|
||
it, so nothing sits between the pane edge and the sizer's own 5px borders.
|
||
`.ze-panel-body`'s 6px/8px is our generic pane inset and it does not belong
|
||
here: it stacked on top of the 5, putting the indicator 12px from the pane
|
||
edge where a running eeschema has it at 9. */
|
||
.ze-panel-body:has(> .ze-selfilter) {
|
||
padding: 0;
|
||
}
|
||
/* A docked pane whose wxPanel IS the sizer (PANEL_SELECTION_FILTER): no pane inset of ours. */
|
||
.ze-panel-body.no-inset {
|
||
padding: 0;
|
||
}
|
||
/* ONE rule for both editors' filter panels, because upstream states the same
|
||
layout twice: eeschema's panel_sch_selection_filter_base.cpp:14-66 and
|
||
pcbnew's panel_selection_filter_base.cpp:15-71 differ only in which
|
||
categories they list, and both set KIUI::GetInfoFont on every checkbox
|
||
(panel_sch_selection_filter.cpp:36, panel_selection_filter.cpp:36). The three
|
||
structural rules below read off DOM position, and both panels' markup emits
|
||
the cells in the sizer's row-major order, so each one lands on the same item
|
||
the sizer gives the border to — including pcbnew's, where the wxBOTTOM is on
|
||
"Points" alone in row 6 rather than on the last cell of the last full row.
|
||
|
||
The grid is `wxGridBagSizer( 0, 0 )` — vgap 0, hgap 0. So there is no gap
|
||
anywhere in this panel: every pixel of space between the checkboxes is a
|
||
per-item BORDER, and only three of the eleven items carry one vertically.
|
||
|
||
(0,0) All items wxLEFT|wxTOP 5 <- no wxRIGHT
|
||
(0,1) Rule Areas wxLEFT|wxRIGHT|wxTOP 5
|
||
rows 1-3, (4,0) wxLEFT|wxRIGHT 5
|
||
(4,1) Other items wxBOTTOM|wxLEFT|wxRIGHT 5
|
||
|
||
The rows therefore TOUCH — the row pitch is just the checkbox's own height —
|
||
and 5px of air exists above the first row and below the last, nowhere else.
|
||
Ours had `gap: 1px 12px` over `padding: 2px 0`, which made the pitch 27px
|
||
against KiCad's 21 and stretched the pane 24px taller than the real one.
|
||
|
||
A gridbag column is as wide as the widest item in it, so `1fr 1fr` was wrong
|
||
in two ways at once: it divided the PANE rather than the content, and it
|
||
moved whenever the pane's width did. `max-content` is the sizer's own rule.
|
||
It comes out at 90px for column 0 — "Graphics", the widest label at 80px,
|
||
plus its 5+5 — and a running eeschema draws its two indicator columns exactly
|
||
90px apart, where ours had them 148 apart. */
|
||
.ze-selfilter {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content;
|
||
gap: 0;
|
||
justify-content: start;
|
||
}
|
||
.ze-selfilter label {
|
||
display: flex;
|
||
align-items: center;
|
||
/* The label is the check BUTTON, so it carries GTK's own inset on both edges
|
||
and between the indicator and the text. That is what makes its width come
|
||
out at text + 28, the number wx measures, and so what makes the
|
||
max-content column above land on the sizer's 90px. */
|
||
gap: var(--check-inset);
|
||
padding: 0 var(--check-inset);
|
||
/* wxLEFT|wxRIGHT, 5. A wx border sits OUTSIDE the item, so it is margin here,
|
||
which is also what makes the max-content column above measure the same
|
||
thing the sizer measures. */
|
||
margin: 0 5px;
|
||
/* vgap is 0, so the row IS the control, and the control is the info-font one
|
||
because the panel sets that font on all eleven. */
|
||
height: var(--check-row-info);
|
||
font-size: var(--ui-font-size-info);
|
||
cursor: default;
|
||
}
|
||
/* wxTOP, 5 — on row 0 only, which is both of the first two cells. */
|
||
.ze-selfilter > :nth-child(-n + 2) {
|
||
margin-top: 5px;
|
||
}
|
||
/* wxBOTTOM, 5 — carried by exactly one cell, the one that closes the grid:
|
||
"Other items" (4,1) in eeschema, "Points" (6,0) in pcbnew. */
|
||
.ze-selfilter > :last-child {
|
||
margin-bottom: 5px;
|
||
}
|
||
/* (0,0) is the one cell added without wxRIGHT. It does not move column 0 here
|
||
(84px against the 90 "Graphics" asks for) but it is what the sizer says, and
|
||
a longer translation of "All items" would make it show. */
|
||
.ze-selfilter > :first-child {
|
||
margin-right: 0;
|
||
}
|
||
.ze-muted {
|
||
color: #9a9ca0;
|
||
padding: 4px 2px;
|
||
}
|
||
|
||
/* Symbol chooser search box */
|
||
/* A wxTextCtrl is a GTK `entry`, and GTK gives it its whole appearance —
|
||
KiCad styles no dialog anywhere (`DIALOG_SHIM`, common/dialog_shim.cpp, sets
|
||
no font and no colour; its only appearance method is `finishDialogSettings`
|
||
at :310-317, which is `SetSizeHints`). Every control is a native GTK widget,
|
||
which is the entire reason KiCad's dialogs look like each other. So a dialog
|
||
file may carry layout and nothing else, and this rule — the one `entry` in
|
||
the app — carries the look, out of the tokens already derived above:
|
||
|
||
entry { min-height: 32px; border: 1px } -> --ctl-height 34
|
||
entry { padding-left/right: 8px } -> --field-pad-x 8
|
||
entry { border-radius: 6px } -> --ctl-radius 6
|
||
entry { border-color: #181818 } -> --ctl-border
|
||
entry:focus { border-color: rgba(239,134,97,.7) } -> --field-focus-border
|
||
entry:disabled { color:#929292; background:#2a2a2a }
|
||
-> --ctl-fg-disabled / --ctl-face-disabled
|
||
|
||
Two of those were structural rather than cosmetic. The height is GTK's, and
|
||
it is the SAME 34 as a button and a combo — which is why a KiCad row of mixed
|
||
controls lines up and ours did not: we let the height fall out of
|
||
`padding: 5px 8px` and it landed short. And there was no `:disabled` rule at
|
||
all, so a greyed-out field rendered as a live one.
|
||
|
||
The five other places in this file that name `.ze-search` set only flex,
|
||
width or margin — layout, which is each dialog's own business. None restates
|
||
a colour, a radius or a height, and none may: that is the specificity trap,
|
||
and it is why this one rule is worth getting right. */
|
||
.ze-search {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
min-height: var(--ctl-height);
|
||
padding: 0 var(--field-pad-x);
|
||
background: var(--field-bg);
|
||
color: var(--view-fg); /* an entry is a view: wxSYS_COLOUR_WINDOWTEXT */
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: var(--ctl-radius);
|
||
font: inherit;
|
||
outline: none;
|
||
}
|
||
.ze-search:focus {
|
||
border-color: var(--field-focus-border);
|
||
box-shadow: inset 0 0 0 1px var(--field-focus-border);
|
||
}
|
||
/* GTK dims by COLOUR, never by opacity — an opacity fade washes out the
|
||
background and the border with the text. */
|
||
.ze-search:disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
background: var(--ctl-face-disabled);
|
||
border-color: var(--ctl-border);
|
||
}
|
||
|
||
/* Menu bar dropdowns */
|
||
.ze-menubar {
|
||
position: relative;
|
||
z-index: 50;
|
||
}
|
||
.ze-menu {
|
||
position: relative;
|
||
}
|
||
/* An open menu bar item. GTK marks it with a lighter background and a 2px
|
||
accent rule along the bottom edge - measured on a real open menu: the item
|
||
fills #4a4a4a and rows 23-24 of the 26px bar are #e95420, with one row of
|
||
grey left below them. We were flooding the whole item with the accent
|
||
colour, which is why opening a menu read as a flash rather than a state. */
|
||
.ze-menubar .ze-menu.open {
|
||
background: #4a4a4a;
|
||
position: relative;
|
||
}
|
||
.ze-menubar .ze-menu.open::after {
|
||
content: "";
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 1px;
|
||
height: 2px;
|
||
background: var(--chrome-active);
|
||
}
|
||
/* A GTK popup menu, which is a different surface from the menu *bar* it drops
|
||
out of - the bar is #2c2c2c, the popup is darker, framed and rounded. Every
|
||
number here is sampled from a real KiCad menu open beside ours:
|
||
|
||
background #1d1d1d (the bar is #2c2c2c, and we had used that for both)
|
||
border #4b4b4b 1px
|
||
radius ~6px the corner arc runs about six pixels
|
||
hover #3e3e3e
|
||
|
||
It applies to every popup in the app, which is right: GTK draws a menu the
|
||
same whether it fell out of the menu bar or a right-click. */
|
||
.ze-dropdown {
|
||
position: absolute;
|
||
top: 100%;
|
||
left: 0;
|
||
/* No minimum width. GTK sizes a menu to its widest row and nothing else, so
|
||
a short menu is a short menu: KiCad's Edit, with the same three entries
|
||
ours has, is about 151px. There used to be a 250px floor here, which meant
|
||
Edit and View were not sized at all - they sat on it, 99px wider than the
|
||
desktop app's, while the menus with more in them came out narrower. Both
|
||
complaints, opposite directions, one cause. */
|
||
background: #1d1d1d;
|
||
border: 1px solid #4b4b4b;
|
||
border-radius: 6px;
|
||
box-shadow: var(--popup-shadow);
|
||
z-index: 100;
|
||
padding: 4px 0;
|
||
cursor: default;
|
||
/* The rows are square and run the full width, so a hovered first or last row
|
||
would paint over the rounding. It is rounded per row rather than clipped
|
||
with `overflow: hidden`: a flyout submenu is a child of its row positioned
|
||
at `left: 100%`, i.e. wholly outside this box, so ANY overflow clip erases
|
||
it. `overflow: hidden` here made every submenu in the app invisible -
|
||
View > Panels, Preferences > Set Language, File > Open Recent - while the
|
||
rows still rendered in the DOM, which is why it read as "the menu opens and
|
||
there is nothing in it". */
|
||
overflow: visible;
|
||
/* Four columns shared by every row - icon, label, accelerator, submenu arrow -
|
||
so each is as wide as the widest thing in it *across the menu*, which is how
|
||
GTK lays a menu out and why its popups are wider than ours were.
|
||
|
||
Ours right-aligned the accelerator inside its own row, so it never widened
|
||
the popup: the popup was the widest *label* plus padding, and the
|
||
accelerator just sat in the slack. Measured against a real KiCad menu with
|
||
the same labels, that made ours 265px against 316px - the whole 51px being
|
||
the accelerator column upstream reserves and we did not. The longest label
|
||
itself renders within a pixel of KiCad's, so the font was never the part
|
||
that was wrong here. */
|
||
display: grid;
|
||
grid-template-columns: auto 1fr auto;
|
||
}
|
||
/* A flyout is `position: fixed` (see MenuBar.tsx) so a tall one cannot extend
|
||
the page's scroll height — the 45-row Set Language menu used to scroll the
|
||
whole frame, title bar and all. It is a column: an optional scroll arrow, the
|
||
rows, an optional scroll arrow.
|
||
|
||
The icon/label/accelerator grid moves down onto the scroll container with the
|
||
rows, because `.ze-dropdown`'s `grid-template-columns` only aligns its DIRECT
|
||
children and the rows are now one level deeper. */
|
||
.ze-submenu {
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
/* The only thing that limits a menu's height is the monitor, so the cap lives
|
||
here as a constant. It used to be measured in JS from the flyout's own
|
||
height, which already carried the previous clamp — a feedback loop that
|
||
shrank a one-row menu to 34px and put a scroll arrow over its only row. */
|
||
max-height: calc(100vh - 8px);
|
||
}
|
||
.ze-submenu-scroll {
|
||
display: grid;
|
||
grid-template-columns: auto 1fr auto;
|
||
overflow-y: auto;
|
||
min-height: 0;
|
||
/* GTK gives a menu scroll arrows, never a scrollbar. Redundant against the
|
||
universal rule above and kept deliberately: this pane must stay bar-less
|
||
whatever the app-wide default becomes, and it is also the one scroll
|
||
container opted out of the overlay indicator (see MenuBar.tsx). */
|
||
scrollbar-width: none;
|
||
}
|
||
.ze-submenu-scroll::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
/* The arrows GTK grows on a menu too tall for the monitor: a centred triangle
|
||
on a full-width strip, which scrolls while the pointer rests on it. */
|
||
/* The app's own chevron, not a solid triangle. `.twisty.expandable` is the same
|
||
arrow the tree expander and the submenu marker draw, so a scroll arrow here
|
||
is the same weight and size as every other arrow in the app — the file
|
||
already says as much where the submenu marker is drawn. It points right at
|
||
rest, so rotate it a quarter turn each way. */
|
||
.ze-submenu-arrow {
|
||
flex: 0 0 16px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: #1d1d1d;
|
||
}
|
||
.ze-submenu-arrow.up .twisty.expandable::before {
|
||
transform: translate(-50%, -30%) rotate(-45deg);
|
||
}
|
||
.ze-submenu-arrow.down .twisty.expandable::before {
|
||
transform: translate(-50%, -70%) rotate(135deg);
|
||
}
|
||
.ze-submenu-arrow:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
/* What `overflow: hidden` used to do, without eating the flyouts: only the
|
||
first and last rows can reach the rounding, so only they need it. 5px is the
|
||
6px outer radius less the 1px border. */
|
||
.ze-dropdown > :first-child {
|
||
border-top-left-radius: 5px;
|
||
border-top-right-radius: 5px;
|
||
}
|
||
.ze-dropdown > :last-child {
|
||
border-bottom-left-radius: 5px;
|
||
border-bottom-right-radius: 5px;
|
||
}
|
||
/* The row pitch is one number, stated here, and everything inside the row is
|
||
sized off it.
|
||
|
||
It used to fall out of the font — padding around whatever line box the
|
||
inherited size produced, and the page declares no font-size at all, so that
|
||
was the browser's 16px default. Adjusting the padding barely moved it,
|
||
because the 18px icon box was the real floor: a row could not be shorter than
|
||
its icon however little padding it had. That is why two rounds of padding
|
||
tweaks changed nothing anyone could see.
|
||
|
||
Pitch matters here out of proportion to its size, because these menus are
|
||
long: the schematic's selection menu over a symbol is 27 entries, so every
|
||
pixel a row is another 27 down the screen. */
|
||
.ze-mitem {
|
||
/* Inherits the popup's four columns, so the label and accelerator line up
|
||
down the whole menu. The cells are assigned explicitly because a row can
|
||
be missing its accelerator or its arrow, and auto-placement would then
|
||
slide the arrow into the accelerator's column. */
|
||
display: grid;
|
||
grid-template-columns: subgrid;
|
||
grid-column: 1 / -1;
|
||
align-items: center;
|
||
box-sizing: border-box;
|
||
gap: 8px;
|
||
height: var(--menu-row, 26px);
|
||
padding: 0 12px;
|
||
/* wxSYS_DEFAULT_GUI_FONT, the same 11pt the menu bar above already used. The
|
||
drop-downs had been left at the shell's 13px, so a menu shrank the moment
|
||
it opened. */
|
||
font-size: var(--ui-font-size);
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-mitem:hover {
|
||
background: #3e3e3e;
|
||
}
|
||
.ze-mitem.disabled {
|
||
opacity: 0.4;
|
||
cursor: default;
|
||
}
|
||
.ze-mitem.disabled:hover {
|
||
background: transparent;
|
||
}
|
||
/* The icon is what sets the floor on the row height, so it is derived from the
|
||
row rather than fixed: at 18px in a 22px row the icons would touch the rows
|
||
above and below. 16px is also what a wx menu bitmap is. */
|
||
.ze-mitem .mico {
|
||
width: 16px;
|
||
height: 16px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-mitem .mico img {
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
.ze-mitem .mico {
|
||
grid-column: 1;
|
||
}
|
||
.ze-mitem .lbl {
|
||
grid-column: 2;
|
||
}
|
||
/* The accelerator and the submenu arrow share the right-hand column, because
|
||
no row ever has both: a row that opens a submenu has no accelerator of its
|
||
own. Giving them a column each reserved both widths on every row and made the
|
||
popup ~50px wider than KiCad's rather than matching it. */
|
||
.ze-mitem .sc {
|
||
grid-column: 3;
|
||
}
|
||
.ze-mitem .sub-arrow {
|
||
grid-column: 3;
|
||
justify-self: end;
|
||
margin-left: 0;
|
||
}
|
||
/* The accelerator column. GTK dims it but does not shrink it: measured on a
|
||
real menu, "Ctrl+F1" and the label beside it are the same 11pt, and only the
|
||
colour separates them. Ours was two points smaller. */
|
||
.ze-mitem .sc {
|
||
color: #8a8c90;
|
||
font-size: var(--ui-font-size);
|
||
padding-left: 20px;
|
||
/* Flush RIGHT, against the same edge the submenu arrow sits on. The column is
|
||
as wide as the widest accelerator in the whole menu (that is how GTK sizes
|
||
it), so a stretched span left-aligns every SHORT accelerator against the
|
||
widest one's left edge: "M" and "D" ended up in the middle of the popup
|
||
with a ragged left column, which is not what a menu looks like anywhere.
|
||
|
||
[px] measured on the installed pcbnew's selection menu (2026-08-31 capture,
|
||
PCB editor, one footprint selected): the popup's right border is x=910, and
|
||
"M", "Shift+X" and "Backspace" all end at x=899-900 - one right edge, the
|
||
12px row padding less the glyph's own side bearing. Ours had every one of
|
||
them starting at x=1749, the column's left edge. */
|
||
justify-self: end;
|
||
}
|
||
/* A separator costs its own line plus both margins, so on a menu with six of
|
||
them the margins alone were most of a row. GTK's are not thin - they are ONE
|
||
PIXEL, margins included.
|
||
|
||
[px] measured twice, independently, on the same 2026-08-31 capture:
|
||
|
||
- the rendered menu. Text tops inside a group run at a 26px pitch (830, 856,
|
||
882...); across a drawn separator the next text top is 27, not 31. So the
|
||
rule's whole vertical footprint is 1px. The installed pcbnew's selection
|
||
menu comes to 32 rows + 7 rules = 31*26 + 7*1 = 813px, and its first and
|
||
last text tops measure y=365 and y=1178. Ours came to 33*26-26 + 6*5 =
|
||
862px against KiCad's 813 - most of the gap the user was looking at.
|
||
- the theme. `menu separator` in yaru_dark_gtk.css:5947 sets background-color
|
||
only; it inherits the generic `separator { min-height: 1px }` and declares
|
||
no margin or padding anywhere.
|
||
|
||
Two derivations, one from pixels and one from the stylesheet, so they
|
||
corroborate. The row's own 26px height is what gives a rule its air. */
|
||
/* Spans every column, or it would be laid into the icon column alone.
|
||
|
||
#4b4b4b, the same grey as the popup's own frame - sampled off a real menu,
|
||
where the rule above "About KiCad" is one row of rgb(75,75,75) edge to edge.
|
||
It was --chrome-border (#1e1e1e), which had been picked against the #2c2c2c
|
||
the popup used to be. Darkening the popup to #1d1d1d left the separator one
|
||
value away from its background: still drawn, and invisible. */
|
||
.ze-msep {
|
||
grid-column: 1 / -1;
|
||
height: 1px;
|
||
background: var(--menu-separator);
|
||
margin: 0;
|
||
}
|
||
|
||
/* Modeless Find dialog (DIALOG_SCH_FIND): floats over the canvas, top-right. */
|
||
/* PCB Find dialog (DIALOG_FIND). Layout mirrors dialog_find_base.cpp:
|
||
topSizer[ leftSizer | buttonSizer(vertical) ] / staticline / sizerStatus. */
|
||
/* A modeless DIALOG_SHIM (common/dialog_shim.tsx, `Show()`): the window chrome and
|
||
the placement are DialogShim's; all this says is that it has no backdrop and sits
|
||
above the frame's panes. */
|
||
/* DialogShim's window: placed at the left/top it computes (Centre( wxBOTH ), a saved
|
||
"__geometry", or where the user dragged it), not by the backdrop's centring. */
|
||
.ze-shim {
|
||
position: fixed;
|
||
}
|
||
/* wxRESIZE_BORDER: the window's edges and corners resize it. GTK draws no grip, so these are
|
||
invisible bands straddling the frame's edge, every size derived from --resize-grip. */
|
||
.ze-shim-grip {
|
||
position: absolute;
|
||
z-index: 1;
|
||
touch-action: none;
|
||
}
|
||
.ze-shim-grip.n,
|
||
.ze-shim-grip.s {
|
||
left: var(--resize-grip);
|
||
right: var(--resize-grip);
|
||
height: var(--resize-grip);
|
||
}
|
||
.ze-shim-grip.e,
|
||
.ze-shim-grip.w {
|
||
top: var(--resize-grip);
|
||
bottom: var(--resize-grip);
|
||
width: var(--resize-grip);
|
||
}
|
||
.ze-shim-grip.n {
|
||
top: calc(var(--resize-grip) / -2);
|
||
cursor: n-resize;
|
||
}
|
||
.ze-shim-grip.s {
|
||
bottom: calc(var(--resize-grip) / -2);
|
||
cursor: s-resize;
|
||
}
|
||
.ze-shim-grip.e {
|
||
right: calc(var(--resize-grip) / -2);
|
||
cursor: e-resize;
|
||
}
|
||
.ze-shim-grip.w {
|
||
left: calc(var(--resize-grip) / -2);
|
||
cursor: w-resize;
|
||
}
|
||
.ze-shim-grip.ne,
|
||
.ze-shim-grip.nw,
|
||
.ze-shim-grip.se,
|
||
.ze-shim-grip.sw {
|
||
width: calc(var(--resize-grip) * 1.5);
|
||
height: calc(var(--resize-grip) * 1.5);
|
||
}
|
||
.ze-shim-grip.ne {
|
||
top: calc(var(--resize-grip) / -2);
|
||
right: calc(var(--resize-grip) / -2);
|
||
cursor: ne-resize;
|
||
}
|
||
.ze-shim-grip.nw {
|
||
top: calc(var(--resize-grip) / -2);
|
||
left: calc(var(--resize-grip) / -2);
|
||
cursor: nw-resize;
|
||
}
|
||
.ze-shim-grip.se {
|
||
bottom: calc(var(--resize-grip) / -2);
|
||
right: calc(var(--resize-grip) / -2);
|
||
cursor: se-resize;
|
||
}
|
||
.ze-shim-grip.sw {
|
||
bottom: calc(var(--resize-grip) / -2);
|
||
left: calc(var(--resize-grip) / -2);
|
||
cursor: sw-resize;
|
||
}
|
||
/* A title bar is the window manager's: its text does not select, and a drag on it moves. */
|
||
.ze-shim > .ze-modal-header {
|
||
user-select: none;
|
||
touch-action: none;
|
||
}
|
||
.ze-modeless {
|
||
z-index: 60;
|
||
}
|
||
/* A dialog's own wxStatusBar (external/wx/controls.tsx StatusBar), as DIALOG_DRC adds one. */
|
||
.ze-wxstatusbar {
|
||
display: flex;
|
||
align-items: center;
|
||
height: 22px; /* [px] a GtkStatusbar row on the dialog font, as `.ze-statusbar` measures */
|
||
border-top: 1px solid var(--chrome-border);
|
||
color: var(--chrome-fg);
|
||
}
|
||
/* wxListCtrl in report mode (external/wx/controls.tsx ListCtrl): the generic GTK list the
|
||
Local History pane measured - its frame, its 3/5 cell padding, its hover and selection. */
|
||
.ze-listctrl {
|
||
border: 1px solid var(--ctl-border);
|
||
background: var(--panel-bg);
|
||
overflow: auto;
|
||
}
|
||
/* A report-mode wxListCtrl's best size is 400 x 180 whatever it holds - empty, 13 rows or 300
|
||
(qa/probes/listctrl_best_size_probe.cpp, asked of wx on GTK): its rows never size the dialog,
|
||
they scroll inside the slot. DRC's Ignored Tests list gained its 13 rows when a run started, and
|
||
the dialog grew 49px with them - or, held at a stated size, pushed its status bar out of the
|
||
frame. A SetMinSize() the base states replaces either axis (ListCtrl's `minSize`). The list a
|
||
wrapper already contains - EDA_LIST_DIALOG's - fills that wrapper instead. */
|
||
.ze-listctrl:not(.ze-dataview-window > .ze-listctrl) {
|
||
contain: size;
|
||
contain-intrinsic-size: 400px 180px; /* [measured] listctrl_best_size_probe.cpp */
|
||
}
|
||
.ze-listctrl-row {
|
||
display: grid;
|
||
padding: 3px 5px; /* [px] the Local History wxListCtrl's cell: "Title" ink 5px in from the frame */
|
||
color: var(--chrome-fg);
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-listctrl-row > span {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.ze-listctrl-row:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
/* wxLC_REPORT's column header, in the grid's label colours; a wxLC_SINGLE_SEL row, the grid's. */
|
||
.ze-listctrl-header {
|
||
background: var(--grid-label-bg);
|
||
border-bottom: 1px solid var(--grid-line);
|
||
}
|
||
/* SetItemFont( row, font.Bold() ). */
|
||
.ze-listctrl-row.bold {
|
||
font-weight: bold;
|
||
}
|
||
|
||
.ze-listctrl-row.selected {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
/* RC_TREE_NODE::COMMENT rows are plain text under the excluded marker. */
|
||
.ze-erc-subrow.comment {
|
||
font-style: italic;
|
||
}
|
||
|
||
/* WX_HTML_REPORT_PANEL: the message list, the "Show:" severity filters with
|
||
their NUMBER_BADGEs, and Save... */
|
||
.ze-report-panel {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 225px; /* [data] wx_html_report_panel_base.cpp:14, SetMinSize( wxSize( -1,225 ) ) */
|
||
gap: 4px;
|
||
border: 1px solid var(--chrome-border);
|
||
padding: 6px 8px 8px;
|
||
min-width: 0;
|
||
}
|
||
/* A wxStaticBox label takes the DIALOG's foreground - KiCad states no colour
|
||
on any of these. Measured off a capture of Update PCB from Schematic, whose
|
||
"Changes to Be Applied" and "Update Fields" labels both ink 241-247, which is
|
||
--chrome-fg; ours stated #8a8c90 and read visibly darker. Stating nothing is
|
||
the fix: the colour then comes from the one place that holds it. */
|
||
.ze-report-panel > legend {
|
||
padding: 0 4px;
|
||
}
|
||
.ze-report-view {
|
||
flex: 1;
|
||
overflow: auto;
|
||
/* A wxHtmlWindow is a scrolled window: the dialog is Fit() to its controls before a
|
||
line of the report exists, and the report wraps and scrolls inside what that
|
||
leaves. Its text must size the dialog in NEITHER direction: across, Update PCB from
|
||
Schematic grew with every long footprint name; down, a long report ran off the
|
||
bottom of the screen instead of scrolling. And since the dialog's minimum is what
|
||
its content asks for, a report that asked for its lines kept a remembered size
|
||
from ever being dragged back down (DIALOG_SHIM::Show's SetMinSize( GetBestSize() )
|
||
is the Fit() size, not the report's). */
|
||
contain: size;
|
||
background: var(--chrome-bg2);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 2px;
|
||
padding: 4px 6px;
|
||
/* A wxHtmlWindow is a VIEW, so its text is wxSYS_COLOUR_WINDOWTEXT and not
|
||
the dialog's wxSYS_COLOUR_BTNTEXT. Inheriting the dialog's left it at
|
||
--chrome-fg, #F7F7F7: measured against a capture of Update PCB from
|
||
Schematic, KiCad's report ink is 255 and ours was 247. Eight levels, and
|
||
the reason the box still read slightly darker after the severity fix. */
|
||
color: var(--view-fg);
|
||
/* No font-size: the message view takes the dialog's, like everything else in
|
||
the panel.
|
||
|
||
`m_htmlView->SetFont( KIUI::GetInfoFont( m_htmlView ) )`
|
||
(wx_html_report_panel.cpp:47) says otherwise and I followed it, setting
|
||
--ui-font-size-info (10pt) here. That reading is wrong: SetFont sets the
|
||
WINDOW's font, while a wxHtmlWindow lays its content out through the
|
||
parser's standard font sizes — which this panel never sets, since it calls
|
||
no SetStandardFonts — and generateHtml emits every line at `<font size=3>`,
|
||
the parser's "normal". So the rendered size is the default GUI font, not
|
||
the info font.
|
||
|
||
[px] measured against Akshay's capture of the real dialog: KiCad's line
|
||
inks a 15 px band, ours inked 13 at 10pt. Ubuntu Sans 11pt = 14.67 px, and
|
||
ascender-to-descender on that face lands at 15. The C++ predicted a size
|
||
the build does not render, so the measurement wins — and it agrees with the
|
||
rule the rest of this file already follows: a dialog has ONE font size. */
|
||
line-height: 1.45;
|
||
/* How a wxHtmlWindow lays out a page (qa/probes/html_window_best_size_probe.cpp, a 390px
|
||
window): a word has no break inside it, so a long footprint id makes the page 697 wide and
|
||
the window scrolls across; every other line wraps at its spaces to that same 697. One
|
||
column as wide as the view or the widest word, whichever is more. */
|
||
display: grid;
|
||
grid-template-columns: minmax(min-content, 1fr);
|
||
align-content: start;
|
||
}
|
||
/* generateHtml's dark-theme colours. */
|
||
.ze-report-line {
|
||
white-space: pre-wrap;
|
||
}
|
||
.ze-report-line .tag {
|
||
color: var(--error-ink);
|
||
}
|
||
.ze-report-line.warning .tag {
|
||
color: inherit;
|
||
}
|
||
/* No `.info` rule. `generateHtml` writes `<font color=#909090 …>` for
|
||
RPT_SEVERITY_INFO, but the value is UNQUOTED and the shipped build does not
|
||
apply it: measured off a capture of Update PCB from Schematic, whose lines
|
||
are all INFO, every text pixel is 255 where ours was 144. An INFO line takes
|
||
the panel's own foreground. */
|
||
.ze-report-line.action {
|
||
color: #60d060;
|
||
}
|
||
/* bSizerBottom: a wxStaticText and five wxCheckBoxes, every one of them the
|
||
ordinary GUI font. It stated 12px, which is why "Show: All Errors Warnings
|
||
Actions Infos" came out visibly smaller than the dialog around it. A dialog
|
||
has ONE font size unless upstream asks for another by name. */
|
||
.ze-report-filters {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
flex-wrap: wrap;
|
||
}
|
||
.ze-report-filters label {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
}
|
||
/* "Show:" is a wxStaticText on the dialog, so it takes the dialog's own
|
||
foreground. The #8a8c90 here was ours, and it is why the word read dimmer
|
||
than the checkbox labels beside it. */
|
||
.ze-report-show {
|
||
color: var(--chrome-fg);
|
||
}
|
||
.ze-report-spacer {
|
||
flex: 1;
|
||
}
|
||
/* NUMBER_BADGE (widgets/number_badge.tsx) paints its own pill and picks both
|
||
colours from the severity it is handed (number_badge.cpp:43-92). Every pair
|
||
below is that table, so each carries [data] on its own line. `computeSize`
|
||
sizes it to "m" + the digits in the bold 10pt badge font, never narrower
|
||
than it is tall, and `DrawRoundedRectangle( rect, rect.height / 2 )` makes
|
||
the ends round. */
|
||
.ze-badge {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-width: 20px;
|
||
padding: 1px 6px;
|
||
border-radius: 9px;
|
||
/* `m_textSize( 10 )` (number_badge.cpp:33), a POINT size: it draws with
|
||
`wxFont( m_textSize, ... )` (:141). The 10pt is the token's value. */
|
||
font-size: var(--ui-font-size-info);
|
||
/* [data] BADGE_FONTWEIGHT is wxFONTWEIGHT_BOLD off macOS (:118-124). */
|
||
font-weight: bold;
|
||
}
|
||
.ze-badge.err {
|
||
background: #f04040; /* [data] IsDarkTheme() ? wxColour( 240, 64, 64 ) : *wxRED */
|
||
color: #ffffff; /* [data] *wxWHITE */
|
||
}
|
||
.ze-badge.warn {
|
||
background: #ffff00; /* [data] *wxYELLOW */
|
||
color: #000000; /* [data] *wxBLACK */
|
||
}
|
||
/* aNumber == 0 with an error or warning severity: the "all clear" badge; and
|
||
any RPT_SEVERITY_ACTION count. */
|
||
.ze-badge.zero {
|
||
background: #008400; /* [data] KIGFX::COLOR4D( GREEN ), color4d.cpp:59 */
|
||
color: #ffffff; /* [data] *wxWHITE */
|
||
}
|
||
.ze-badge.excl {
|
||
background: #c0c0c0; /* [data] *wxLIGHT_GREY */
|
||
color: #000000; /* [data] *wxBLACK */
|
||
}
|
||
|
||
.ze-mitem .mcheck {
|
||
font-size: 12px;
|
||
line-height: 1;
|
||
}
|
||
/* The flyout marker is `.twisty`, so it is drawn by the same rule as the
|
||
project tree's expander; only the gap to the label is menu-specific. It never
|
||
opens in place, so it never takes the `.open` rotation. */
|
||
.ze-mitem .sub-arrow {
|
||
margin-left: 20px;
|
||
}
|
||
.ze-msub {
|
||
position: relative;
|
||
}
|
||
.ze-subdropdown {
|
||
top: -5px;
|
||
left: 100%;
|
||
}
|
||
|
||
/* DisplayErrorMessage's box: a short message with optional developer detail. */
|
||
.ze-message-dialog {
|
||
height: auto;
|
||
max-height: 80vh;
|
||
}
|
||
.ze-message-body {
|
||
padding: 12px 14px;
|
||
overflow: auto;
|
||
font-size: 13px;
|
||
}
|
||
.ze-message-body pre {
|
||
margin: 10px 0 0;
|
||
padding: 8px;
|
||
background: var(--chrome-bg2);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 3px;
|
||
font-size: 12px;
|
||
white-space: pre-wrap;
|
||
max-height: 40vh;
|
||
overflow: auto;
|
||
}
|
||
|
||
/* Symbol chooser modal (KiCad-style centered dialog) */
|
||
.ze-modal-backdrop {
|
||
position: fixed;
|
||
inset: 0;
|
||
background: rgba(0, 0, 0, 0.5);
|
||
z-index: 200;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
/* A dialog Enable( false )d while a tool picks on the canvas for it: the frame shows through and
|
||
takes the clicks. */
|
||
.ze-modal-backdrop.ze-disabled-dialog {
|
||
background: transparent;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* WX_PROGRESS_REPORTER's dialog (ui/ProgressDialog.tsx), a wxProgressDialog:
|
||
the message, a gauge, the elapsed clock, Cancel. Every number is off the
|
||
real dialog on this theme (qa/probes/progress_dialog_probe.py); the face,
|
||
caption, font and button are the shared dialog's and are not restated.
|
||
|
||
The parent is under a `wxWindowDisabler`: it stops taking input, and that
|
||
is ALL that happens to it. GTK draws nothing over a window behind a modal
|
||
dialog, so the frame — menus, toolbars, the grid on its blank sheet — stays
|
||
exactly as bright as it was, and the dialog simply sits on it. The shared
|
||
backdrop's dim is not something KiCad has, and it is not wanted here. The
|
||
pointer over the disabled frame is the busy one. */
|
||
.ze-progress-backdrop {
|
||
background: transparent;
|
||
cursor: progress;
|
||
z-index: 300;
|
||
}
|
||
.ze-progress-dialog .ze-modal-body {
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
}
|
||
/* wxStaticText at (16,16): Add( m_msg, 0, wxLEFT | wxRIGHT | wxTOP, 2*LAYOUT_MARGIN ).
|
||
A single line: the message is a filename and wx never wraps a wxStaticText
|
||
that was not asked to. */
|
||
.ze-progress-dialog .msg {
|
||
/* [data] wxGenericProgressDialog's LAYOUT_MARGIN is 8 (generic/progdlgg.cpp),
|
||
and the message takes twice it on three sides. */
|
||
margin: 16px 16px 0;
|
||
/* [px] the room `wxString( ' ', 80 )` reserves (wx_progress_reporters.cpp:37):
|
||
80 spaces of the dialog font, 240 asked of Pango. `min-width`, because the
|
||
dialog only ever grows; the latch in the component is the other half. */
|
||
min-width: 240px;
|
||
white-space: nowrap;
|
||
}
|
||
/* wxGauge at (16,50), 300 x 4: Add( m_gauge, 0, wxLEFT | wxRIGHT | wxTOP | wxEXPAND,
|
||
2*LAYOUT_MARGIN ), so EXPAND lets a wider message widen it. */
|
||
.ze-progress-dialog .ze-gauge {
|
||
/* [data] 2*LAYOUT_MARGIN, as the message above. */
|
||
margin: 16px 16px 0;
|
||
/* [data] created wxSize( wxMin( displayWidth/3, 300 ), -1 ): 300 is its floor. */
|
||
min-width: 300px;
|
||
}
|
||
/* wxFlexGridSizer( 2 ): Add( sizerLabels, 0, wxALIGN_CENTER_HORIZONTAL | wxTOP,
|
||
LAYOUT_MARGIN ), holding the label with wxALIGN_RIGHT | wxTOP | wxRIGHT, 8 and
|
||
the value with wxTOP, 8: the pair centred, 8 between, 16 under the gauge. */
|
||
.ze-progress-dialog .times {
|
||
display: flex;
|
||
justify-content: center;
|
||
/* [data] the sizer's own LAYOUT_MARGIN. */
|
||
margin-top: 8px;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-progress-dialog .times .lbl {
|
||
/* [data] the label's wxTOP | wxRIGHT, LAYOUT_MARGIN. */
|
||
margin: 8px 8px 0 0;
|
||
}
|
||
.ze-progress-dialog .times .val {
|
||
/* [data] the value's wxTOP, LAYOUT_MARGIN. */
|
||
margin-top: 8px;
|
||
}
|
||
/* Without PR_CAN_ABORT the button sizer is empty but still added with its
|
||
wxALL border, so the clock row keeps 16 under it: the dialog is 104 tall on
|
||
the probe (`--no-abort`) against 138 with the button. */
|
||
.ze-progress-dialog .ze-modal-body:last-child {
|
||
/* [data] 2 * LAYOUT_MARGIN: the empty sizer's top and bottom borders. */
|
||
padding-bottom: 16px;
|
||
}
|
||
/* wxStdDialogButtonSizer, Add( …, 0, wxEXPAND | wxALL, LAYOUT_MARGIN ): the
|
||
85 x 34 Cancel sits 96..130 of 138. */
|
||
.ze-progress-dialog .ze-modal-footer {
|
||
/* [px] its right edge is 20 from the dialog's on the probe — 8 (the sizer's
|
||
border) + 9 (GTK's trailing spacer in the standard button sizer) + 3 (the
|
||
button's own) — and the row is 8 above and below. */
|
||
padding: 8px 20px 8px 17px;
|
||
}
|
||
|
||
/* wxGauge, as GTK draws it (qa/probes/progress_bar_probe.py). <progress> has the same two
|
||
parts, the trough and the fill. */
|
||
.ze-gauge {
|
||
appearance: none;
|
||
box-sizing: border-box;
|
||
display: block;
|
||
/* <progress> keeps the user agent's 10em (160px) width even as a block, so a gauge added with
|
||
wxEXPAND - DRC's and ERC's m_gauge, the progress dialog's - sat at 147px in a 685px slot. A
|
||
wxGauge has no width of its own; its sizer gives it the slot's. */
|
||
width: auto;
|
||
/* [px] the probe: 4 rows, which is also the best height wx reports (gauge_probe.cpp). */
|
||
height: 4px; /* [px] progress_bar_probe.py */
|
||
border: none;
|
||
/* [px] the probe's corners are anti-aliased at both ends of trough and fill alike. */
|
||
border-radius: 2px; /* [px] progress_bar_probe.py */
|
||
background: var(--gauge-trough);
|
||
overflow: hidden;
|
||
}
|
||
.ze-gauge::-webkit-progress-bar {
|
||
background: var(--gauge-trough);
|
||
}
|
||
.ze-gauge::-webkit-progress-value {
|
||
background: var(--gauge-fill);
|
||
/* [px] the probe: a 1px #EB6637 edge INSIDE the fill's 4 rows. */
|
||
box-shadow: inset 0 0 0 1px var(--gauge-fill-edge);
|
||
border-radius: 2px; /* [px] progress_bar_probe.py */
|
||
}
|
||
.ze-gauge::-moz-progress-bar {
|
||
background: var(--gauge-fill);
|
||
box-shadow: inset 0 0 0 1px var(--gauge-fill-edge);
|
||
border-radius: 2px; /* [px] progress_bar_probe.py */
|
||
}
|
||
/* The one spinner left in the shell: the cloud-sync pill and the library
|
||
chooser's "loading" row, neither of which is a KiCad dialog. */
|
||
.ze-spinner {
|
||
width: 18px;
|
||
height: 18px;
|
||
flex: 0 0 auto;
|
||
border: 2px solid var(--chrome-border);
|
||
border-top-color: var(--chrome-active);
|
||
border-radius: 50%;
|
||
animation: ze-spin 0.7s linear infinite;
|
||
}
|
||
@keyframes ze-spin {
|
||
to {
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
/* Cloud-sync status pill (bottom-right, non-blocking): shows pull/push counts
|
||
while projects sync on sign-in, then a brief "synced" confirmation. */
|
||
/* The signed-in account, at the foot of the project manager's left bar. See
|
||
`ui/AccountButton.tsx` for why it is there and not in the menu bar.
|
||
|
||
It states no size. `.ze-mgrbar` above already decides that its buttons are
|
||
32px on a 34px bar, measured off the real pane, and `.ze-mgrbar button`
|
||
applies it -- so naming a size here would be a second answer to a question
|
||
already answered, and the two would drift the moment the bar was remeasured.
|
||
`auto` is the whole placement: it sinks to the bottom of the bar's flex
|
||
column however many tools sit above it. */
|
||
.ze-account-fab {
|
||
position: relative;
|
||
margin-top: auto;
|
||
}
|
||
/* Scoped to the bar, and it has to be: `.ze-mgrbar button` states
|
||
`border-radius: 0` at (0,1,1) and a bare `.ze-account-avatar` is (0,1,0), so
|
||
an unscoped rule here loses and the avatar renders SQUARE. Same story for the
|
||
picture -- `.ze-mgrbar img` fixes 24px, which would leave a small square
|
||
image floating in a round button.
|
||
|
||
No hover of its own: `.ze-mgrbar button:hover` already paints one, and every
|
||
other button in the bar gets it. */
|
||
.ze-mgrbar .ze-account-avatar {
|
||
border-radius: 50%;
|
||
/* The picture is square and the button is round, so the corners have to go
|
||
somewhere. */
|
||
overflow: hidden;
|
||
/* A button takes the user-agent font unless something says otherwise, which
|
||
is how the drawing sheet's tabs ended up in Arial. */
|
||
font: inherit;
|
||
/* The reference's avatar text: white and bold on a disc whose colour
|
||
arrives inline from the address (auth/avatar_color.ts). Its size is the
|
||
bar's own font, as every other glyph in the bar. */
|
||
color: var(--avatar-fg);
|
||
font-weight: bold;
|
||
cursor: pointer;
|
||
}
|
||
/* Signed out: no disc, only its outline - the bar button's own 1px border, drawn in the neutral
|
||
colour the glyph inside it takes too. Stated at (0,3,0) so the bar's hover, which repaints the
|
||
border, cannot take the ring away. */
|
||
.ze-mgrbar .ze-account-avatar.guest {
|
||
color: var(--avatar-guest-fg);
|
||
border-color: currentColor;
|
||
}
|
||
/* The shield in the bottom-right corner (designer/src/ui/EncryptedIcon.tsx). Excalidraw's
|
||
`.encrypted-icon` is a 1.2rem glyph in its primary colour, 0.6em off the right edge. Fixed
|
||
rather than a flex item of the status bar, so nothing the bar shows (library loading, say)
|
||
can push it in from the corner; centred on the bar's height. */
|
||
.ze-encrypted-icon {
|
||
position: fixed;
|
||
right: 0.6em;
|
||
bottom: calc((var(--statusbar-height) - 1.2rem) / 2);
|
||
z-index: 210;
|
||
display: flex;
|
||
color: var(--encrypted-icon-fg);
|
||
}
|
||
.ze-encrypted-icon svg {
|
||
width: 1.2rem;
|
||
height: 1.2rem;
|
||
}
|
||
/* Fills the button, whatever the provider's picture happens to measure --
|
||
Google serves a square, but nothing about the URL promises one, and `cover`
|
||
crops rather than distorting a face. */
|
||
.ze-mgrbar .ze-account-avatar img {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
/* The bar is 34px wide and this sits at the bottom of it, so the popup goes to
|
||
the side and upward. `.ze-dropdown` is the menu bar's own, which hangs below
|
||
its row; only the edges it hangs from change. */
|
||
.ze-account-menu {
|
||
top: auto;
|
||
bottom: 0;
|
||
left: 100%;
|
||
}
|
||
|
||
.ze-sync-pill {
|
||
position: fixed;
|
||
right: 16px;
|
||
bottom: 16px;
|
||
z-index: 250;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 8px 14px;
|
||
font-size: 12px;
|
||
color: #fff;
|
||
background: var(--chrome-bg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 20px;
|
||
box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
|
||
}
|
||
.ze-sync-pill .ze-spinner {
|
||
width: 13px;
|
||
height: 13px;
|
||
}
|
||
.ze-sync-pill.done {
|
||
color: #7fce7f;
|
||
}
|
||
/* A sync that did not land. Squared off, wider and wrapping, because it carries
|
||
the reason and stays until dismissed rather than fading like the others. */
|
||
.ze-sync-pill.failed {
|
||
align-items: flex-start;
|
||
max-width: 480px;
|
||
color: #ffb4a2;
|
||
border-color: #a33;
|
||
border-radius: 8px;
|
||
}
|
||
.ze-sync-dismiss {
|
||
flex: none;
|
||
padding: 2px 8px;
|
||
font: inherit;
|
||
color: inherit;
|
||
cursor: default;
|
||
background: transparent;
|
||
border: 1px solid currentColor;
|
||
border-radius: 4px;
|
||
}
|
||
/* GTK draws dialog text at about 243, not pure white - the same gap that made
|
||
the status bar look a size too big. Set here so every dialog inherits it. */
|
||
/* A KiCad dialog is sized by its CONTENT, never by a number. Every
|
||
wxFormBuilder `_base.cpp` ends with `bMainSizer->Fit( this )`, and the
|
||
`.cpp` on top of it finishes `TransferDataToWindow` with
|
||
`GetSizer()->SetSizeHints( this )` — so the window is exactly the minimum
|
||
its sizers need, and that is why two KiCad dialogs holding the same controls
|
||
come out the same size. (dialog_page_settings_base.cpp:405 and
|
||
dialog_page_settings.cpp:192 are one instance of a pattern the whole tree
|
||
repeats.)
|
||
|
||
`max-content` is that rule, computed by the layout engine rather than pasted
|
||
as a pixel count. It replaces `width: 860px; height: 580px`, two numbers that
|
||
appear nowhere in KiCad — and that nothing was actually using: all 17
|
||
`.ze-modal.<variant>` rules below and all 28 bare `className="ze-modal"` call
|
||
sites already override the size, which is the real problem here. Forty-five
|
||
hand-picked dialog widths where upstream has one rule. They cannot all be
|
||
right, and two of them prove it: the same DIALOG_PAGES_SETTINGS is 760px in
|
||
the schematic's copy and was 560px in the drawing sheet's.
|
||
|
||
Collapsing those forty-five is a per-dialog job — each needs its own C++ read,
|
||
because a few dialogs really do call SetSize and those numbers are real
|
||
(.ze-tplsel and .ze-hotkeys carry theirs with citations). This makes the
|
||
DEFAULT correct so the pile stops growing, and gives them something to
|
||
collapse onto. A dialog that states nothing now gets Fit(). */
|
||
.ze-modal {
|
||
/* A dialog's own text, which GTK paints `wxSYS_COLOUR_BTNTEXT` — the same
|
||
colour a wxStaticText in a wxDialog reports. `qa/probes/dialog_chrome_probe.cpp`
|
||
builds that dialog and asks it, on this desktop, under this theme:
|
||
|
||
dialog GetBackgroundColour rgb( 44, 44, 44) #2C2C2C
|
||
staticText GetForegroundColour rgb(247,247,247) #F7F7F7
|
||
wxSYS_COLOUR_BTNTEXT rgb(247,247,247) #F7F7F7
|
||
|
||
which is what --chrome-fg already holds. This said #f3f4f5, four shades
|
||
off and stated as a literal in the one rule every dialog in the app
|
||
inherits from. */
|
||
color: var(--chrome-fg);
|
||
/* `bMainSizer->Fit( this )`, which every KiCad dialog constructor ends with.
|
||
No dialog in pcbnew states a width: each `*_base.cpp` either says
|
||
`SetSizeHints( wxSize( -1,-1 ), … )` or says nothing, and the width you see
|
||
is the sizer's over the controls. Twelve rules here used to state a
|
||
`width: NNNpx` of their own — Find, DRC, Sch Find, Router Settings, the
|
||
message box, Teardrops, Track & Via, Zone, Footprint, Pad, Graphic and
|
||
Text Box — and they are why our pcbnew dialogs came out narrower than
|
||
upstream's. Where KiCad states a number it states it on a CONTROL
|
||
(`SetMinSize`), and those are ported at the control, each against its
|
||
`_base.cpp` line. */
|
||
width: max-content;
|
||
height: max-content;
|
||
max-width: 92vw;
|
||
max-height: 88vh;
|
||
background: var(--chrome-bg);
|
||
border: 1px solid var(--chrome-border);
|
||
/* The window decoration, not a control: top two corners only. */
|
||
border-radius: var(--window-radius) var(--window-radius) 0 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
box-shadow: var(--window-shadow);
|
||
}
|
||
/* A KiCad dialog's title is its *window* title, drawn by the desktop: a 37px
|
||
bar of #222222 under a 1px black rule, with the text centred. Measured off a
|
||
real dialog; ours was --chrome-bg with the title hard left. */
|
||
.ze-modal-header {
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
/* The bar paints the two rounded corners, so it repeats the frame's radius —
|
||
without this its flat #222 squares them off again. */
|
||
border-radius: var(--window-radius) var(--window-radius) 0 0;
|
||
height: 37px;
|
||
padding: 0 12px;
|
||
/* Measured against a real title bar: 175px wide and 15 tall for this string,
|
||
against 156/12 at the shell's 13px. It is the dialog font, bold. */
|
||
font-size: var(--ui-font-size);
|
||
font-weight: 700;
|
||
color: var(--chrome-fg);
|
||
background: var(--titlebar-bg);
|
||
border-bottom: 1px solid var(--titlebar-rule);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
.ze-modal-header .x,
|
||
.ze-msgdlg-title .x {
|
||
position: absolute;
|
||
right: 8px;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
cursor: default;
|
||
padding: 0 6px;
|
||
color: #9a9ca0;
|
||
}
|
||
.ze-modal-header .x:hover,
|
||
.ze-msgdlg-title .x:hover {
|
||
color: var(--chrome-fg);
|
||
}
|
||
.ze-modal-body {
|
||
flex: 1;
|
||
display: flex;
|
||
min-height: 0;
|
||
}
|
||
/* wxSP_3DSASH | wxSP_LIVE_UPDATE. */
|
||
/* wxFONTFAMILY_TELETYPE: a wxTextCtrl given the system monospace (m_textOutput's preview). */
|
||
.ze-mono {
|
||
font-family: monospace;
|
||
}
|
||
/* wxSplitterWindow (external/wx/splitter.tsx): two panes and the sash between them.
|
||
Not `.ze-splitter`: that is the AUI dock sash, a 5 px bar this rule's `flex: 1`
|
||
stretched across the project manager. */
|
||
.ze-wxsplitter {
|
||
display: flex;
|
||
min-height: 0;
|
||
flex: 1;
|
||
}
|
||
.ze-wxsplitter.horizontal {
|
||
flex-direction: column;
|
||
}
|
||
.ze-wxsplitter-pane {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 0 0 auto;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
}
|
||
.ze-wxsplitter-pane.grow {
|
||
flex: 1;
|
||
}
|
||
/* [data] wxSplitterWindow's GTK sash: wxRendererGTK::GetSplitterParams' 5 px. */
|
||
.ze-wxsplitter-sash {
|
||
flex: 0 0 5px;
|
||
background: transparent;
|
||
}
|
||
.ze-wxsplitter.vertical > .ze-wxsplitter-sash {
|
||
cursor: col-resize;
|
||
}
|
||
.ze-wxsplitter.horizontal > .ze-wxsplitter-sash {
|
||
cursor: row-resize;
|
||
}
|
||
.ze-wxsplitter-sash:hover {
|
||
background: var(--chrome-active);
|
||
}
|
||
|
||
/* Symbol Library Browser (symbol_viewer_frame.cpp): the frame's AUI panes,
|
||
toolbar on top, "Libraries" | "Symbols" palettes left of the canvas, message
|
||
panel at the bottom, laid out inside one modal. Upstream's default frame is
|
||
500 x 400 with 150 px list panes. */
|
||
/* The library browsers' panes: FOOTPRINT_VIEWER_FRAME and SYMBOL_VIEWER_FRAME build the same
|
||
AUI layout (footprint_viewer_frame.cpp:275-289, symbol_viewer_frame.cpp:206-215) - a
|
||
"Libraries" and a second Palette on the left, the canvas in the centre - each Palette one
|
||
wxPanel holding a vertical box sizer:
|
||
|
||
libSizer->Add( m_libFilter, 0, wxEXPAND, 5 ); // wxSearchCtrl
|
||
libSizer->Add( m_libList, 1, wxEXPAND, 5 ); // WX_LISTBOX, wxLB_HSCROLL|wxNO_BORDER
|
||
|
||
The 5 is a border with no direction flag, so it is no border at all.
|
||
|
||
A Palette is `EDA_PANE().Palette()`, `PaneBorder( true )` (eda_base_frame.h:965-970), so wxAUI
|
||
draws its 1px border round the pane. The top edge is the top toolbar's own bottom rule, and a
|
||
pane against a vertical toolbar meets that toolbar's rule, so those two are not drawn twice. */
|
||
.ze-palette-pane {
|
||
display: flex;
|
||
flex: 0 0 auto;
|
||
flex-direction: column;
|
||
box-sizing: border-box;
|
||
/* [data] `.MinSize( 100, -1 )` on both palettes of both browsers. */
|
||
min-width: 100px;
|
||
min-height: 0;
|
||
border-right: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
border-bottom: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
}
|
||
/* A palette that follows a sash, not a toolbar, states its own left edge. */
|
||
.ze-palette-pane.ze-palette-after-sash {
|
||
border-left: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
}
|
||
/* `Add( m_libFilter, 0, wxEXPAND )`: proportion 0, its own height. [data] */
|
||
.ze-palette-pane > .ze-libtree-entry {
|
||
flex: 0 0 auto;
|
||
}
|
||
/* `Add( m_libList, 1, wxEXPAND )`: proportion 1, everything left. [data] */
|
||
.ze-palette-pane > .ze-listbox {
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
}
|
||
/* The centre pane, `EDA_PANE().Canvas()`. Its left edge meets a sash, so it is stated. The
|
||
<canvas> inside is absolutely placed, so its device-pixel backing store never feeds an
|
||
intrinsic width back into the flex row. */
|
||
.ze-palette-canvas {
|
||
position: relative;
|
||
flex: 1;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
display: flex;
|
||
border-left: var(--aui-pane-border-size) solid var(--aui-pane-border);
|
||
}
|
||
|
||
/* Choose Symbol dialog (dialog_symbol_chooser + panel_symbol_chooser):
|
||
lib tree | sash | preview column, mirroring the KiCad 10 layout.
|
||
|
||
The size is one of the few a KiCad dialog really does state:
|
||
`PANEL_SYMBOL_CHOOSER::FinishSetup` (panel_symbol_chooser.cpp:414-424) falls
|
||
back to `horizPixelsFromDU( 440 )` by `horizPixelsFromDU( 340 )` when nothing
|
||
has been persisted. Those are DIALOG UNITS, so the pixel count depends on the
|
||
font wx measures a character cell with, and it has to be asked rather than
|
||
computed: [px] `qa/probes/chooser_shell_probe.cpp` calls
|
||
ConvertDialogToPixels on a real wxDialog here and gets 880 x 680.
|
||
|
||
680 is what `SetSize` gives the window, and on GTK that is the OUTER size,
|
||
title bar included: [px] `qa/probes/tlw_setsize_probe.cpp` does
|
||
`SetSize( 880, 680 )` on a wxDialog and a wxFrame in a process that has
|
||
already mapped a window — as KiCad's always has — and both answer
|
||
GetClientSize 880 x 643, a 37px title bar inside the 680. (A wxFrame sized
|
||
in a COLD process, before any window is mapped, does get 680 of client; that
|
||
is the case the "+ 37px" this rule used to carry was reasoning from, and it
|
||
is not KiCad's.) Ours draws its own 37px title bar inside the box, so the
|
||
box is the 680 and the dialog gets the same 643 KiCad's does.
|
||
|
||
Do not re-derive this from a screenshot: 880 x 680 is the DEFAULT, and KiCad
|
||
saves and restores this dialog's size, so a running instance is usually
|
||
showing whatever the user last dragged it to. */
|
||
.ze-modal.ze-symbol-chooser {
|
||
width: 880px;
|
||
height: 680px;
|
||
}
|
||
.ze-chooser-panel {
|
||
flex: 1;
|
||
display: flex;
|
||
min-height: 0;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* ---- FOOTPRINT_CHOOSER_FRAME (pcbnew/footprint_chooser_frame.cpp) -------- */
|
||
|
||
/* The frame states no size of its own; the PANEL does, and only when the saved
|
||
config has nothing usable (panel_footprint_chooser.cpp:257-272):
|
||
|
||
auto horizPixelsFromDU = [&]( int x ) { wxSize sz( x, 0 );
|
||
return ConvertDialogToPixels( sz ).x; };
|
||
int w = cfg.width > 40 ? FromDIP( cfg.width ) : horizPixelsFromDU( 440 );
|
||
int h = cfg.height > 40 ? FromDIP( cfg.height ) : horizPixelsFromDU( 340 );
|
||
|
||
Note the HORIZONTAL conversion is used for both axes - `.x` twice - so both
|
||
go through `du * charWidth / 4`. `qa/probes/swatch_probe.cpp` measures
|
||
GetCharWidth() = 8 on this machine, so the factor is 2 and the default is
|
||
440x340 DU = 880 x 680 px. That it matches the symbol chooser's 880 x 680 is
|
||
a coincidence of two separate defaults, not a shared number, so it is
|
||
derived here rather than borrowed from that rule.
|
||
|
||
[data] 440 DU x 2. */
|
||
.ze-modal.ze-fpchooser-frame {
|
||
width: 880px;
|
||
/* [data] 340 DU x 2, the OUTER size with the title bar inside it — see
|
||
.ze-symbol-chooser and tlw_setsize_probe. */
|
||
height: 680px;
|
||
}
|
||
.ze-fpchooser {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
min-width: 0;
|
||
}
|
||
/* m_hsplitter: the tree, then the preview, at the sash position the panel
|
||
restores - NOT at the gravity.
|
||
|
||
if( cfg.sash_h < 0 ) cfg.sash_h = horizPixelsFromDU( 220 );
|
||
m_hsplitter->SetSashPosition( cfg.sash_h );
|
||
(panel_footprint_chooser.cpp:286-290)
|
||
|
||
220 DU x 2 = 440, half of the 880 the same block defaults the window to, so
|
||
the tree and the preview open FIFTY-FIFTY. `SetSashGravity( 0.8 )` is a
|
||
different thing entirely: it distributes space added by a RESIZE, four
|
||
fifths to the tree. Reading it as the split ratio is what left the preview a
|
||
fifth of the width. */
|
||
.ze-fpchooser-top {
|
||
/* [data] `SetSashPosition( horizPixelsFromDU( 230 ) )` on the VERTICAL
|
||
splitter - 230 DU x 2 - which is the height of this pane, the details
|
||
pane taking what is left (:293-296). */
|
||
flex: 0 0 460px;
|
||
display: flex;
|
||
min-height: 0;
|
||
min-width: 0;
|
||
}
|
||
.ze-fpchooser-tree {
|
||
/* `SetSashGravity( 0.8 )`: the tree takes four fifths of the extra width.
|
||
`min-width: 0` is what keeps it from overlapping the preview - a flex item
|
||
will not shrink below its CONTENT without it, and a tree whose Description
|
||
column is 15 000 footprints wide has a very large content width. That is
|
||
what put the preview on top of the rows. */
|
||
/* [data] half of `horizPixelsFromDU( 220 )` x 2 = 440 in an 880 window. */
|
||
flex: 1 1 0;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.ze-fpchooser-preview {
|
||
flex: 1 1 0;
|
||
/* [data] `m_hsplitter->SetMinimumPaneSize( 20 )` — the sash will not shrink
|
||
a pane below it, which is a FLOOR and not a width. */
|
||
min-width: 20px;
|
||
overflow: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* m_RightPanelSizer: the FOOTPRINT_PREVIEW_WIDGET and the frame's 3D canvas
|
||
are each `Add( …, 1, wxEXPAND )` — proportion 1 and 1, so two shown split
|
||
the column in HALF. Two class selectors, because `.ze-fp-preview`'s own
|
||
`flex: 10` (its share of the Assign Footprints window) is declared later at
|
||
the same specificity and was taking ten elevenths of the column here. */
|
||
.ze-fpchooser-preview > .ze-fp-preview,
|
||
.ze-fpchooser-preview > .ze-fpchooser-3d {
|
||
flex: 1 1 0;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
}
|
||
/* m_vsplitter's lower pane: what the 460 above leaves.
|
||
|
||
`flex-basis: 0`, not `auto`. With `auto` the pane's hypothetical size is its
|
||
CONTENT height, so a long description grew the pane instead of scrolling
|
||
inside it - and `overflow: auto` never fired, because the element was never
|
||
smaller than what was in it. A splitter pane is given a height and scrolls;
|
||
it does not size itself to its text. */
|
||
.ze-fpchooser-details {
|
||
flex: 1 1 0;
|
||
/* [data] `m_vsplitter->SetMinimumPaneSize( 80 )` - a floor on the SASH, so
|
||
the pane may shrink to it and then scroll, never below it. */
|
||
min-height: 80px;
|
||
overflow: auto;
|
||
}
|
||
/* The bottom panel, `buttonsSizer` (footprint_chooser_frame.cpp:144-191):
|
||
a stretch spacer FIRST, so everything is right-aligned; then the three
|
||
BITMAP_BUTTONs and two separators at `wxRIGHT|wxLEFT, 1` / `wxRIGHT, 1`, the
|
||
checkbox at `wxALL, 3`, a 20 px spacer and the wxStdDialogButtonSizer at
|
||
`wxALL, 5`. Not `.ze-cp-buttons`' uniform 5 px gap, which is that other
|
||
sizer's border; each child's own border is stated below. */
|
||
.ze-fpchooser-foot {
|
||
justify-content: flex-end;
|
||
gap: 0;
|
||
padding-left: 0;
|
||
}
|
||
.ze-fpchooser-foot .ze-lp-iconbtn {
|
||
margin-right: 1px; /* [data] wxRIGHT, 1 */
|
||
}
|
||
.ze-fpchooser-foot .ze-lp-iconbtn:first-child {
|
||
margin-left: 1px; /* [data] m_toggleDescription's wxLEFT, 1 */
|
||
}
|
||
.ze-fpchooser-foot .ze-lp-sep {
|
||
margin-right: 1px; /* [data] wxRIGHT, 1 */
|
||
}
|
||
.ze-fpchooser-foot .ze-check {
|
||
margin: 3px; /* [data] wxALL, 3 */
|
||
}
|
||
/* Two classes on the container: `.ze-cp-buttons .ze-modal-footer` gives the
|
||
std sizer `flex: 1` later in this file at the same specificity, which is
|
||
what left the toggles at the LEFT. */
|
||
.ze-cp-buttons.ze-fpchooser-foot .ze-modal-footer {
|
||
flex: 0 0 auto;
|
||
/* [data] the 20 px spacer, then sdbSizer's wxALL, 5. */
|
||
margin-left: 20px;
|
||
padding: 5px;
|
||
}
|
||
/* m_preview3DCanvas in m_RightPanelSizer, `Add( …, 1, wxEXPAND, 5 )`: shares
|
||
the right column with the footprint view when both are shown. */
|
||
.ze-fpchooser-3d {
|
||
flex: 1 1 0;
|
||
min-height: 0;
|
||
min-width: 0;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
.ze-chooser-panel.column {
|
||
flex-direction: column;
|
||
}
|
||
.ze-chooser-upper {
|
||
flex: 1;
|
||
display: flex;
|
||
min-height: 0;
|
||
}
|
||
.ze-chooser-treepane {
|
||
flex: 1;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* A wxSplitterWindow sash, not a wxAUI one. See --splitter-sash. */
|
||
.ze-sash {
|
||
flex: 0 0 auto;
|
||
background: var(--splitter-sash);
|
||
}
|
||
.ze-sash.v {
|
||
width: var(--splitter-sash-size);
|
||
cursor: col-resize;
|
||
}
|
||
.ze-sash.h {
|
||
height: var(--splitter-sash-size);
|
||
cursor: row-resize;
|
||
}
|
||
/* constructRightPanel's sizer (panel_symbol_chooser.cpp:378-396):
|
||
|
||
m_symbol_preview proportion 11 wxEXPAND | wxALL 5
|
||
m_fp_sel_ctrl proportion 0 wxEXPAND | wxLEFT | wxRIGHT 5
|
||
m_fp_preview proportion 10 wxEXPAND | wxLEFT|wxRIGHT|wxBOTTOM 5
|
||
|
||
which is NOT a uniform gap: the preview's own wxBOTTOM puts 5px under it, and
|
||
then the selector sits DIRECTLY on the footprint preview with nothing between
|
||
them, because neither states a wxTOP. `gap: 5px` gave that seam a gap KiCad
|
||
does not have. */
|
||
.ze-chooser-right {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-width: 0;
|
||
padding: 5px;
|
||
}
|
||
.ze-chooser-preview {
|
||
flex: 11;
|
||
min-height: 0;
|
||
display: flex;
|
||
margin-bottom: 5px;
|
||
overflow: hidden;
|
||
}
|
||
.ze-chooser-fppreview {
|
||
flex: 10;
|
||
min-height: 0;
|
||
display: flex;
|
||
overflow: hidden;
|
||
}
|
||
/* treeSizer->Add( m_tree, 1, wxALL | wxEXPAND, 5 ): 5px on ALL four sides, and
|
||
the LIB_TREE itself is built wxNO_BORDER (lib_tree.cpp:56-57), so there is no
|
||
frame around it and never was. The frame in this dialog belongs to the
|
||
wxDataViewCtrl inside it - see .ze-libtree-tree - and drawing a second one
|
||
out here is what made our tree read as a boxed-in panel. */
|
||
.ze-chooser-treepane > .ze-libtree {
|
||
margin: 5px;
|
||
}
|
||
/* SYMBOL_PREVIEW_WIDGET and FOOTPRINT_PREVIEW_WIDGET are bare wxPanels
|
||
(symbol_preview_widget.cpp:40, footprint_preview_widget.cpp:30-31) - style 0
|
||
and wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL, neither of which draws a
|
||
border. The canvas meets the dialog face directly, clipped to the panel - the
|
||
`overflow: hidden` on .ze-chooser-preview and .ze-chooser-fppreview above. The
|
||
footprint selector is a combo and keeps its own control border, which is the
|
||
combo's, not ours.
|
||
|
||
Those two by name, never `.ze-chooser-right > div`: the combo's popup list is a
|
||
direct child of this column too, and that rule at (0,1,1) beat the popup's own
|
||
`overflow-y: auto` at (0,1,0) - the footprint list opened 22 rows tall and
|
||
would not scroll. */
|
||
|
||
/* LIB_TREE widget: filter row, column headers, tree rows, details pane. */
|
||
.ze-libtree {
|
||
flex: 1;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* LIB_TREE's search row is `sizer->Add( search_sizer, 0, wxEXPAND, 5 )`
|
||
(lib_tree.cpp:90) - wxEXPAND with NO direction flag, so that 5 is never
|
||
applied and the row has no padding at all, and no rule under it either. The
|
||
only spacing inside it is the entry's own `wxRIGHT, 4`.
|
||
|
||
We had 8px of padding and a 1px border-bottom; the border in particular is
|
||
wrong twice over, because the wxDataViewCtrl below already draws its own
|
||
frame and the two stacked into a double line. */
|
||
.ze-libtree-search {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.ze-libtree-sortbtn-wrap {
|
||
position: relative;
|
||
}
|
||
/* `m_filtersSizer`, a wxVERTICAL box added between the search control and the
|
||
tree with `wxEXPAND | wxLEFT, 4` (common/widgets/lib_tree.cpp:167-168). The
|
||
4 px inset is that border; the column direction is the sizer's own, and the
|
||
gap between two checkboxes is each child's `wxBOTTOM, 4` at the call site
|
||
(footprint_chooser_frame.cpp:590). */
|
||
.ze-libtree-filters {
|
||
display: flex;
|
||
flex-direction: column;
|
||
/* [data] `wxEXPAND | wxLEFT, 4` */
|
||
padding-left: 4px;
|
||
/* [data] `wxBOTTOM, 4` on each child the frame adds */
|
||
gap: 4px;
|
||
}
|
||
/* The wxSearchCtrl. `search_sizer->Add( m_query_ctrl, 1, ..., wxRIGHT, 4 )`. */
|
||
.ze-libtree-entry {
|
||
position: relative;
|
||
flex: 1;
|
||
min-width: 0;
|
||
display: flex;
|
||
margin-right: 4px;
|
||
/* The entry carries the GtkEntry's two icon slots, so its text has to start
|
||
past the primary one: 9px inset + 16px icon + Yaru's 6px
|
||
`entry image.left { margin-right }` = 31, and the same on the right.
|
||
|
||
Fed to the SHARED input rule as a token rather than restated here. The
|
||
rule that styles every entry is
|
||
`.ze-app input:not([type=checkbox])...:not(.ze-bare)`, which is (0,6,1)
|
||
because each :not() carries its argument's specificity - it beat a local
|
||
padding-left on `.ze-libtree-entry .ze-search`, which is only (0,2,0), and
|
||
the magnifier sat on top of the placeholder. Restating the value at a higher
|
||
specificity is the trap CLAUDE.md names; the shared rule already reads
|
||
--field-pad-x, so the fix is to give it the right one. */
|
||
--field-pad-x: 31px;
|
||
}
|
||
/* The GtkEntry's two icon slots. [px] chooser_shell_probe: 16x16, inset 9px
|
||
from the entry's end and centred in its 34px height. Yaru puts 6px between an
|
||
icon and the text (`entry image.left { margin-right: 6px }`), so the text
|
||
starts 9 + 16 + 6 = 31px in - which is why the padding below is stated here
|
||
and not left to --field-pad-x. */
|
||
.ze-entry-icon {
|
||
position: absolute;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
width: 16px;
|
||
height: 16px;
|
||
padding: 0;
|
||
border: none;
|
||
background: none;
|
||
cursor: default;
|
||
color: var(--entry-icon-fg);
|
||
display: flex;
|
||
}
|
||
.ze-entry-icon.left {
|
||
left: 9px;
|
||
}
|
||
.ze-entry-icon.right {
|
||
right: 9px;
|
||
}
|
||
/* Yaru: `entry image:hover { color: #F7F7F7 }`, `:active { color: #E95420 }`. */
|
||
.ze-entry-icon:hover {
|
||
color: var(--chrome-fg);
|
||
}
|
||
.ze-entry-icon:active {
|
||
color: var(--chrome-active);
|
||
}
|
||
/* wxStaticLine, wxLI_VERTICAL, `wxEXPAND | wxTOP | wxBOTTOM, 3`
|
||
(lib_tree.cpp:86-87). It is an OVERLAY, not a grey: Yaru says
|
||
`separator { background: rgba(0, 0, 0, 0.1) }`, wx reports the widget's
|
||
background as #0000001A (26/255 = 10.2%), and [px] both columns of the 2px
|
||
widget render #282828 on the #2c2c2c face, which is 44 x 0.9 = 39.6.
|
||
Three readings, one value. */
|
||
.ze-libtree-sep {
|
||
flex: 0 0 2px;
|
||
align-self: stretch;
|
||
margin: 3px 0;
|
||
background: var(--gtk-separator);
|
||
}
|
||
.ze-libtree-entry .ze-libtree-menu {
|
||
right: auto;
|
||
left: 0;
|
||
}
|
||
.ze-libtree-menu .item.disabled {
|
||
opacity: 0.55;
|
||
pointer-events: none;
|
||
}
|
||
/* A BITMAP_BUTTON with wxBU_AUTODRAW (lib_tree.cpp:89-91): it draws the bitmap
|
||
and NOTHING else at rest - no border, no face, no radius - and only paints a
|
||
highlight while the pointer is over it. We had it wearing an entry's frame
|
||
and background, which is why it read as a boxed control beside KiCad's bare
|
||
icon. `wxBU_AUTODRAW` is exactly this "flat until hovered" behaviour. */
|
||
.ze-libtree-sortbtn {
|
||
padding: 0;
|
||
background: none;
|
||
border: none;
|
||
color: var(--chrome-fg);
|
||
cursor: default;
|
||
font: inherit;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.ze-libtree-sortbtn:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-libtree-menu {
|
||
position: absolute;
|
||
right: 0;
|
||
top: 100%;
|
||
min-width: 190px;
|
||
background: var(--chrome-bg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 4px;
|
||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
|
||
padding: 4px;
|
||
z-index: 30;
|
||
/* [px] LIB_TREE and FOOTPRINT_PREVIEW_WIDGET are common/ widgets and set no
|
||
font at all, so every one of them inherits the 11pt window font. The
|
||
details pane is an HTML_WINDOW whose template (generate_alias_info.cpp:28-46)
|
||
carries <b>, <i>, <hr> and a table and NO size, so it renders at 11pt too.
|
||
There is no smaller text anywhere in this dialog upstream. */
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
.ze-libtree-menu.ctx {
|
||
position: fixed;
|
||
right: auto;
|
||
top: auto;
|
||
}
|
||
.ze-libtree-menu .item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 4px 10px;
|
||
border-radius: 3px;
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-libtree-menu .item:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-libtree-menu .check {
|
||
width: 14px;
|
||
flex: 0 0 auto;
|
||
text-align: center;
|
||
}
|
||
.ze-libtree-menu .sep {
|
||
height: 1px;
|
||
margin: 4px 6px;
|
||
background: var(--chrome-border);
|
||
}
|
||
/* The wxDataViewCtrl itself. It is ONE control - header and rows inside one
|
||
frame - and that frame is the only border in the tree pane: [px] a real
|
||
wxDataViewCtrl renders a 1px #181818 line all round
|
||
(`qa/probes/chooser_shell_probe.cpp`), which is --ctl-border, the same
|
||
wxSYS_COLOUR_3DSHADOW every other control here is outlined in. The row area's
|
||
face is wxSYS_COLOUR_LISTBOX, and it was inheriting the dialog's #2c2c2c. */
|
||
.ze-libtree-tree {
|
||
flex: 5;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
border: 1px solid var(--ctl-border);
|
||
background: var(--chrome-bg2);
|
||
}
|
||
/* The header is a GtkButton drawn inside the treeview: see --libtree-header-fg
|
||
for Yaru's rule and the measurement. `padding: 0 6px` is its own, the 24px
|
||
height is measured, and the 1px rule under it is --chrome-bg showing through
|
||
rather than a border colour of its own. Ours was a 600-weight #9a9ca0 on
|
||
--panel-header, which is the wxAUI CAPTION bar - a different widget. */
|
||
.ze-libtree-cols {
|
||
display: flex;
|
||
flex: 0 0 auto;
|
||
align-items: center;
|
||
height: var(--libtree-header-height);
|
||
font-size: var(--ui-font-size);
|
||
font-weight: bold;
|
||
color: var(--libtree-header-fg);
|
||
background: var(--chrome-bg2);
|
||
border-bottom: 1px solid var(--chrome-bg);
|
||
/* The header and the rows are ONE control upstream, so they share one
|
||
horizontal scroll position: the columns overflow this box and the widget
|
||
drives its scrollLeft from the row list's. */
|
||
overflow: hidden;
|
||
}
|
||
/* The 6px is each header BUTTON's padding, so it belongs on the column and not
|
||
on the row: the second column's label is inset from its own left edge too. */
|
||
.ze-libtree-cols > span {
|
||
padding: 0 6px;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
/* Every column is a fixed width the ADAPTER decides - LIB_TREE_DEFAULT_COL_WIDTHS,
|
||
which mirrors `m_colWidths` (Item 300, Description 600) - so the width is set
|
||
on the element and none of the four rules below may shrink or grow it. When
|
||
the columns together are wider than the pane the control scrolls sideways,
|
||
exactly as the wxDataViewCtrl does; the `45%` and `flex: 1` that used to be
|
||
here were a proportional split upstream never had. */
|
||
.ze-libtree-cols .col-item {
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-libtree-cols .col-desc {
|
||
flex: 0 0 auto;
|
||
}
|
||
/* `border-style: none solid solid none` with `header button:last-child {
|
||
border-right-style: none }` - every column but the last carries a 1px rule on
|
||
its right. */
|
||
.ze-libtree-cols > span:not(:last-child) {
|
||
border-right: 1px solid var(--chrome-bg);
|
||
}
|
||
/* No padding of its own. [px] `qa/probes/libtree_selection_probe.cpp` builds the
|
||
control LIB_TREE builds - a wxDataViewCtrl over LIB_TREE_RENDERER, given
|
||
SetRowHeight( FromDIP(6) + GetTextExtent("pdI").y ) - and reads the rendered
|
||
toplevel back: row 0's background area starts at the first pixel under the
|
||
header, and a selected row's highlight spans x=1..416 of a 420 px control,
|
||
i.e. the whole client width inside the 1 px frame. The `2px 4px` here inset
|
||
every row's highlight from that frame, which is what made a selected row read
|
||
as a pill floating in the tree instead of a band across it. */
|
||
.ze-libtree-list {
|
||
flex: 1;
|
||
overflow: auto;
|
||
outline: none;
|
||
/* A column flex so the "loading libraries" panel can centre itself in the
|
||
space the rows will occupy. */
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
}
|
||
/* As wide as its columns, and never narrower than the viewport: the selection
|
||
band is the row's own background, and [px] libtree_selection_probe measures it
|
||
across the whole client width - including the empty space to the right of the
|
||
last column, and including the part scrolled off to the right. */
|
||
.ze-libtree-list > .ze-libtree-row {
|
||
flex: 0 0 auto;
|
||
width: max-content;
|
||
min-width: 100%;
|
||
}
|
||
/* `LIB_TREE_RENDERER::Render`'s canvas-item marker
|
||
(common/lib_tree_model_adapter.cpp:100-116): a one-pixel outline round the
|
||
whole row with its right edge drawn to a point at half height. Not a
|
||
strikethrough - the adapter sets that attribute as a FLAG and the renderer
|
||
clears it before drawing (`realAttr.SetStrikethrough( false )`, :95).
|
||
|
||
`*wxWHITE_PEN` on a dark theme, `*wxBLACK_PEN` on a light one, which is what
|
||
`currentColor` gives here since the row already carries the theme's text
|
||
colour. */
|
||
.ze-libtree-canvasitem {
|
||
position: absolute;
|
||
/* `left` and `width` are the Item CELL's, set inline by the row - the marker
|
||
is a cell renderer upstream, not a row decoration, so it must not span the
|
||
Description column. Only the vertical extent is the row's. */
|
||
top: 0;
|
||
bottom: 0;
|
||
/* An <svg> is a replaced element: with `height: auto`, top and bottom do not stretch it, and it
|
||
kept its intrinsic 150 px - the outline ran five rows down the tree. The row's own height. */
|
||
height: 100%;
|
||
pointer-events: none;
|
||
overflow: visible;
|
||
}
|
||
|
||
.ze-libtree-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
/* The canvas-item outline is absolute against the row. */
|
||
position: relative;
|
||
/* The row's box is GTK's BACKGROUND AREA, not its cell area, because that is
|
||
what the selection fills.
|
||
|
||
[px] libtree_selection_probe asks the realized GtkTreeView for both:
|
||
`gtk_tree_view_get_background_area( row ) = 26` around
|
||
`gtk_tree_view_get_cell_area( row ) = 24`, so the 2 px vertical-separator
|
||
is split 1 px above and 1 px below the 24 px cell - INSIDE the band, not
|
||
between the bands. The painted highlight measures 26 px tall, edge to edge,
|
||
which is the same number from the other side.
|
||
|
||
So the separator is half-padding here rather than the list's `row-gap`,
|
||
which is what it was: that put the 2 px between two 24 px highlights and
|
||
left a stripe of unhighlighted face through the middle of a selection. The
|
||
pitch is 26 either way; only the band moved. */
|
||
padding-top: calc(var(--libtree-row-pad) + var(--libtree-row-sep) / 2);
|
||
padding-bottom: calc(var(--libtree-row-pad) + var(--libtree-row-sep) / 2);
|
||
padding-right: 4px;
|
||
cursor: default;
|
||
font-size: var(--ui-font-size);
|
||
line-height: var(--ui-text-height);
|
||
white-space: nowrap;
|
||
}
|
||
.ze-libtree-row:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
/* wxSYS_COLOUR_HIGHLIGHT on wxSYS_COLOUR_HIGHLIGHTTEXT, by their own names:
|
||
this is a SELECTION, not an active control accent, and the two tokens hold
|
||
the same value in this theme for reasons that are not a rule. [px]
|
||
libtree_selection_probe reads the band back as a flat #e95420 with SQUARE
|
||
corners - the 3 px radius that used to be on .ze-libtree-row was ours, and a
|
||
GtkTreeView row has no radius at all. */
|
||
.ze-libtree-row.active {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
/* A library row is not bold. GetAttr sets italic and nothing else - see
|
||
.ze-libtree-row .col-desc - so a container row draws in the same face as its
|
||
children, and the 700 here was ours. */
|
||
.ze-libtree-row.lib {
|
||
font-weight: 400;
|
||
}
|
||
.ze-libtree-row .col-item {
|
||
flex: 0 0 auto;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
/* No colour of its own. `LIB_TREE_MODEL_ADAPTER::GetAttr`
|
||
(common/lib_tree_model_adapter.cpp:781-801) is the ONLY thing that styles a
|
||
cell in this tree, it sets exactly one attribute - italic, on a non-root
|
||
alias's name - and it never touches colour or weight. So every cell in every
|
||
column is wxSYS_COLOUR_LISTBOXTEXT, and the #b6b8bb this used to dim the
|
||
description with was ours. */
|
||
.ze-libtree-row .col-desc {
|
||
flex: 0 0 auto;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
font-weight: 400;
|
||
}
|
||
.ze-libtree-row .twisty {
|
||
position: relative;
|
||
width: 12px;
|
||
height: 12px;
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-libtree-row .twisty.expandable::before {
|
||
content: "";
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
width: 7px;
|
||
height: 7px;
|
||
border-top: 1.5px solid #b8bcc2;
|
||
border-right: 1.5px solid #b8bcc2;
|
||
transform: translate(-65%, -50%) rotate(45deg);
|
||
transition: transform 0.1s ease;
|
||
}
|
||
.ze-libtree-row .twisty.expandable.open::before {
|
||
transform: translate(-50%, -70%) rotate(135deg);
|
||
}
|
||
/* The details pane, and it is a WINDOW rather than a region of the panel:
|
||
`HTML_WINDOW::SetPage` writes `<body text=wxSYS_COLOUR_WINDOWTEXT
|
||
bgcolor=wxSYS_COLOUR_WINDOW>` around the template
|
||
(common/widgets/html_window.cpp:56-66), so its face is --chrome-bg2 and its
|
||
text --view-fg, exactly like the tree above it. Ours took the dialog's own
|
||
#2c2c2c, which is the one surface it is definitely not.
|
||
|
||
LIB_TREE gives it `sizer->Add( m_details_ctrl, 2, wxTOP | wxEXPAND, 5 )`
|
||
against the tree's proportion 5 (lib_tree.cpp:181, 193-197): a 5:2 split of
|
||
whatever height is going, with 5px above it and NO rule. `26%` was neither
|
||
the ratio nor anything upstream states, and the rule was ours.
|
||
|
||
The 10px inset is wxHtmlWindow's own border: [px] the first line box of the
|
||
real template lands at x 10, y 10 (`qa/probes/libtree_details_probe.cpp`). */
|
||
.ze-libtree-details {
|
||
flex: 2;
|
||
min-height: 0;
|
||
overflow: auto;
|
||
padding: 10px;
|
||
margin-top: 5px;
|
||
color: var(--view-fg);
|
||
background: var(--chrome-bg2);
|
||
line-height: var(--libtree-details-line);
|
||
/* [px] LIB_TREE and FOOTPRINT_PREVIEW_WIDGET are common/ widgets and set no
|
||
font at all, so every one of them inherits the 11pt window font. The
|
||
details pane is an HTML_WINDOW whose template (generate_alias_info.cpp:28-46)
|
||
carries <b>, <i>, <hr> and a table and NO size, so it renders at 11pt too.
|
||
There is no smaller text anywhere in this dialog upstream. */
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
/* The no-footprints layout gives the details pane its own wxPanel below the
|
||
vertical splitter, and the sizer there is
|
||
`wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5` (panel_symbol_chooser.cpp:217) -
|
||
5px on three sides and nothing on top, where the sash already is. */
|
||
.ze-libtree-details.external {
|
||
flex: none;
|
||
margin: 0 5px 5px;
|
||
}
|
||
/* LIB_TREE's hover preview popup (PREVIEW_SIZE 240x200, pinned to the tree's
|
||
right edge and vertically centred on the cursor). */
|
||
.ze-libtree-preview {
|
||
position: fixed;
|
||
right: 12px;
|
||
z-index: 40;
|
||
background: #fff;
|
||
border: 1px solid var(--chrome-border);
|
||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
|
||
display: flex;
|
||
pointer-events: none;
|
||
}
|
||
/* [px] libtree_details_probe renders the real template: the <hr> cell is 1px
|
||
tall, sits 21px below the last line box and 21px above the table, and is
|
||
painted #808080. That grey is DATA, not chrome - wxHtmlLineCell hardcodes
|
||
"GREY" and no theme reaches it - so it stays a literal. The 21s are the line
|
||
box the pane already has a token for. */
|
||
.ze-libtree-details hr {
|
||
height: 1px;
|
||
border: none;
|
||
margin: var(--libtree-details-line) 0;
|
||
background: #808080; /* [data] wxHtmlLineCell's own pen, not a theme colour */
|
||
}
|
||
/* `FieldFormat` (eeschema/generate_alias_info.cpp:41-46) emits
|
||
`<table border=0><tr><td><b>name</b></td><td>value</td></tr>`, and wxHtml
|
||
lays a border-less table out with its DEFAULT cellpadding 3 and cellspacing
|
||
2. [px] libtree_details_probe puts the label column's text at x 15 and the
|
||
value column's at x 99 with the widest label 76 wide, and the rows 29 apart:
|
||
|
||
15 = table left 10 + spacing 2 + padding 3
|
||
99 = 15 + 76 + padding 3 + spacing 2 + padding 3
|
||
29 = the 21px line box + padding 3 + 3 + spacing 2
|
||
|
||
three readings that solve to one pair of numbers. Ours collapsed the borders
|
||
and hung a 10px right padding off the label instead, so both the column gap
|
||
and the row pitch were ours rather than wxHtml's. */
|
||
.ze-libtree-details table {
|
||
border-collapse: separate;
|
||
border-spacing: 2px;
|
||
}
|
||
.ze-libtree-details td {
|
||
padding: 3px;
|
||
vertical-align: top;
|
||
}
|
||
.ze-libtree-details a {
|
||
color: var(--link-fg);
|
||
}
|
||
|
||
/* SYMBOL_PREVIEW_WIDGET */
|
||
.ze-symbol-preview {
|
||
flex: 1;
|
||
min-height: 0;
|
||
min-width: 0;
|
||
position: relative;
|
||
display: flex;
|
||
background: #fff;
|
||
overflow: hidden;
|
||
}
|
||
/* The canvas backing-store size tracks the CSS box; sizing it absolutely keeps
|
||
its intrinsic width from feeding back into the flex layout. */
|
||
.ze-symbol-preview .ze-preview-canvas {
|
||
position: absolute;
|
||
inset: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
/* The pane is a GAL canvas: the wheel zooms it and a middle/right drag pans,
|
||
so the gestures must not reach the dialog behind it. */
|
||
touch-action: none;
|
||
overscroll-behavior: contain;
|
||
}
|
||
.ze-preview-status {
|
||
flex: 1;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #6b7280;
|
||
/* SYMBOL_PREVIEW_WIDGET::SetStatusText's label, on a widget that sets no
|
||
font: the 11pt window font, like everything else in this dialog. */
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
/* A canvas whose backing store is sized in device pixels reports that size as
|
||
its intrinsic width, which would otherwise become its flex basis and push the
|
||
layout (and the dialog) wide; pin it to the box its parent gives it. */
|
||
.ze-preview-canvas {
|
||
flex: 11;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
/* No colour of its own: the canvas is cleared to the render theme's
|
||
LAYER_SCHEMATIC_BACKGROUND every frame, as the GAL panel is. A white here
|
||
was a second answer to a question the theme already answers, and it showed
|
||
through before the first paint. */
|
||
background: transparent;
|
||
}
|
||
|
||
/* FOOTPRINT_SELECT_WIDGET holds a FOOTPRINT_CHOICE
|
||
(common/widgets/footprint_select_widget.cpp:40), which is an
|
||
.ze-odcombo - see the wxOwnerDrawnComboBox block. Nothing about the control
|
||
is restated here; the only thing this dialog adds is the ONE thing
|
||
FOOTPRINT_CHOICE draws that the base class does not. */
|
||
.ze-chooser-right > .ze-fp-choice {
|
||
/* A control between two stretchy previews: sized by itself, not by the
|
||
leftovers. `constructRightPanel` gives it proportion 0
|
||
(eeschema/widgets/panel_symbol_chooser.cpp:378-392). */
|
||
flex: 0 0 auto;
|
||
}
|
||
/* `aDC.SetTextForeground( m_grey )` around the library fragment
|
||
(common/widgets/footprint_choice.cpp:111). The colour is the shared static,
|
||
so it is the shared token; see --odcombo-grey. */
|
||
.ze-fp-lib {
|
||
color: var(--odcombo-grey);
|
||
}
|
||
/* FOOTPRINT_PREVIEW_PANEL paints on pcbnew's canvas, so its background is the
|
||
board editor's (LAYER_PCB_BACKGROUND, rgb(0,16,35)), not the schematic
|
||
white of the symbol preview beside it. */
|
||
.ze-fp-preview {
|
||
flex: 10;
|
||
min-height: 0;
|
||
position: relative;
|
||
background: rgb(0, 16, 35);
|
||
color: #c8ccd0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
text-align: center;
|
||
padding: 8px;
|
||
}
|
||
.ze-fp-canvas {
|
||
position: absolute;
|
||
inset: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
touch-action: none;
|
||
overscroll-behavior: contain;
|
||
}
|
||
.ze-fp-preview {
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
/* Status text over the dark board background (SetStatusText). */
|
||
.ze-fp-preview .ze-muted {
|
||
color: #9aa2ab;
|
||
/* SetStatusText on a widget that sets no font: the 11pt window font. */
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
.ze-preview-info {
|
||
padding: 8px 12px;
|
||
border-top: 1px solid var(--chrome-border);
|
||
font-size: 12px;
|
||
min-height: 78px;
|
||
}
|
||
.ze-preview-info .nm {
|
||
font-weight: 700;
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
.ze-preview-info .desc {
|
||
color: #b6b8bb;
|
||
margin-top: 3px;
|
||
}
|
||
.ze-preview-info .kw {
|
||
color: #7f97b0;
|
||
margin-top: 3px;
|
||
font-style: italic;
|
||
}
|
||
/* No rule above the buttons. m_sizerButtons is just the last row of
|
||
bmainSizer, on the same surface as everything above it - scanning a real
|
||
dialog top to bottom finds #2c2c2c unbroken from under the title bar past
|
||
the buttons to the bottom edge. */
|
||
.ze-modal-footer {
|
||
padding: 8px 12px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
justify-content: flex-end;
|
||
}
|
||
/* `wxStdDialogButtonSizer`'s stretch spacer: what a dialog puts at the LEFT of
|
||
the row (a Help button, a Reset) is pushed away from the affirmative pair. */
|
||
.ze-sdb-spacer {
|
||
flex: 1 1 auto;
|
||
}
|
||
/* Footer buttons keep their intrinsic size, never shrink to min-content
|
||
(which wraps "Page Setup..." / "Print Preview" onto two lines). */
|
||
.ze-modal-footer .ze-btn {
|
||
flex: 0 0 auto;
|
||
white-space: nowrap;
|
||
}
|
||
/* A wxCheckBox with its label — one rule, because KiCad has one widget. The
|
||
indicator itself is the shared `input[type="checkbox"]` rule further up; all
|
||
this states is the row it sits in. The gap either side of the indicator is
|
||
[css] `check, radio { margin: 0 4px }`, which is already --check-margin, and
|
||
the row is --check-row, a real GtkCheckButton's preferred height. The text is
|
||
KIUI::GetControlFont like every other label. */
|
||
.ze-check {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--check-margin);
|
||
min-height: var(--check-row);
|
||
font-size: var(--ui-font-size);
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
}
|
||
/* Chooser footer: the checkboxes sit ahead of the OK/Cancel std buttons. */
|
||
.ze-chooser-footer {
|
||
align-items: center;
|
||
}
|
||
/* buttonsSizer (dialog_symbol_chooser.cpp:86-87) puts "Place repeated copies"
|
||
at wxLEFT 5 and "Place all units" at wxLEFT 30, so the gap between the two
|
||
checkboxes is 30px and not the 16 we had. */
|
||
.ze-chooser-footer .ze-check + .ze-check {
|
||
margin-left: 30px;
|
||
}
|
||
.ze-chooser-footer .ze-check {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
/* Ordinary wxCheckBoxes, so KIUI::GetControlFont, which is the window font
|
||
with a relative size of 0 (ui_common.cpp:168-171). That is --ui-font-size;
|
||
12px was a fourth chrome text size the theme does not have. */
|
||
font-size: var(--ui-font-size);
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-chooser-footer-spacer {
|
||
flex: 1;
|
||
}
|
||
/* PagedDialog shell (Schematic Setup / Board Setup), mirrors PAGED_DIALOG. */
|
||
.ze-paged-infobar {
|
||
padding: 6px 12px;
|
||
font-size: 12px;
|
||
background: var(--chrome-bg2);
|
||
border-bottom: 1px solid var(--chrome-border);
|
||
color: #e8c07d;
|
||
}
|
||
.ze-paged-tree {
|
||
width: 220px;
|
||
flex: 0 0 auto;
|
||
border-right: 1px solid var(--chrome-border);
|
||
overflow-y: auto;
|
||
padding: 6px 4px;
|
||
outline: none;
|
||
}
|
||
/* One `PAGED_DIALOG` page. Upstream a page is a plain panel: what scrolls is
|
||
the page's own choice, and every page that scrolls puts ONE child in a
|
||
`wxScrolledWindow` — `m_scGridWin` on the Physical Stackup page,
|
||
`m_LayersListPanel` on Board Editor Layers. Everything beside that child
|
||
(the stackup page's copper-layer row and its board-thickness row, which are
|
||
`bTopSizer` and `bBottomSizer`, siblings of the scrolled window in
|
||
`bMainSizer`) never scrolls; `Fit()` makes the DIALOG wide enough for them
|
||
instead.
|
||
|
||
`min-width: 0` said the opposite — it let this box shrink below its content,
|
||
so a page wider than the dialog scrolled as a whole and took the two bars
|
||
with it. `min-content` is the wx rule: the page may not be squeezed below
|
||
what its unscrolled chrome needs, the shortfall reaches the dialog, and
|
||
`fitFloor` grows it. A child that scrolls on purpose contributes 0 to
|
||
min-content, so the wide stackup grid still scrolls by itself. */
|
||
/* The page area, and the one line that decides whether a paged dialog holds
|
||
its size.
|
||
|
||
`min-width: min-content` here means the panel REFUSES to be narrower than
|
||
its content, so a wide page pushes the width straight out through
|
||
`.ze-modal`'s `max-content` and the dialog grows. That is what made Board
|
||
Setup a different size on every row of the tree, and what left it stuck at
|
||
the widest row it had ever been shown.
|
||
|
||
`min-width: 0` is the opposite instruction: the panel may be narrower than
|
||
its content, and the content scrolls inside it. `.ze-prefs-panel` has said
|
||
exactly this all along, and it is the whole reason Preferences is the same
|
||
size on Common as it is on Grids. A dialog that does not fit is then a
|
||
parity bug in that PAGE, visible and local, where a jumping dialog is
|
||
neither. */
|
||
.ze-paged-panel {
|
||
flex: 1;
|
||
overflow: auto;
|
||
padding: 10px 14px;
|
||
min-width: 0;
|
||
}
|
||
.ze-paged-footer {
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
}
|
||
.ze-paged-footer-spacer {
|
||
flex: 1;
|
||
}
|
||
|
||
/* WX_GRID-style table used by setup panels (Text Variables, Field Name
|
||
Templates): header row, grid lines, a selectable current row. */
|
||
.ze-grid {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
/* `WX_GRID::WX_GRID` sets BOTH fonts to KIUI::GetControlFont
|
||
(`common/widgets/wx_grid.cpp:217-218`), which off macOS is
|
||
getGUIFont( win, 0 ) — the plain UI font at the same size as the menu bar.
|
||
A raw wxGrid, which the design inspector uses, simply inherits that font
|
||
from its panel. Ours said 12.5px, which is what made the inspector's rows
|
||
read smaller than pl_editor's and, because a row is sized by its text,
|
||
made every row shorter as well. */
|
||
font-size: var(--ui-font-size);
|
||
border: 1px solid var(--grid-line);
|
||
}
|
||
/* Column labels — SetLabelBackgroundColour, i.e. BTNFACE, not the cell colour. */
|
||
.ze-grid th {
|
||
background: var(--grid-label-bg);
|
||
border: 1px solid var(--grid-line);
|
||
padding: 3px 6px;
|
||
/* `SetColLabelSize( 30 )` — the header is a fixed 30 px whatever the font
|
||
(`dialog_design_inspector_base.cpp:41`), unlike the data rows, which wx
|
||
sizes from their content. */
|
||
height: 30px;
|
||
/* A grid's column label is the PLAIN GUI font. `WX_GRID`'s constructor sets
|
||
`SetLabelFont( KIUI::GetControlFont( this ) )` (wx_grid.cpp:218), and the
|
||
class then overrides the setter so it cannot be changed —
|
||
|
||
void WX_GRID::SetLabelFont( const wxFont& aFont )
|
||
{ wxGrid::SetLabelFont( KIUI::GetControlFont( this ) ); } // :297-300
|
||
|
||
— it discards the font it is handed. `GetControlFont` is
|
||
`getGUIFont( win, 0 )`, which never bolds. So `font-weight: 600` made
|
||
every grid header in the app heavier than any grid header in KiCad. */
|
||
font-weight: normal;
|
||
/* `AutoSizeColumn` measures the column LABEL as well as the cells, so a
|
||
header never wraps — the column widens to fit it instead. "Show Name" was
|
||
wrapping to two lines inside its 84 px and doubling the header's height. */
|
||
white-space: nowrap;
|
||
text-align: center;
|
||
}
|
||
/* `WX_GRID::DrawColLabel` (common/widgets/wx_grid.cpp:461-469) reads the grid's
|
||
alignment and then overrides it for one column:
|
||
|
||
int hAlign, vAlign;
|
||
GetColLabelAlignment( &hAlign, &vAlign );
|
||
...
|
||
if( col == 0 )
|
||
hAlign = wxALIGN_LEFT;
|
||
|
||
if( hAlign == wxALIGN_LEFT )
|
||
rect.SetLeft( rect.GetLeft() + MIN_GRIDCELL_MARGIN );
|
||
|
||
so the first header is left-aligned in EVERY WX_GRID, however the dialog
|
||
called `SetColLabelAlignment` — both Symbol Properties grids ask for
|
||
wxALIGN_CENTER and both get a left-aligned "Name" / "Number" anyway. It goes
|
||
on the shared rule because upstream puts it in the shared class; stating it
|
||
per dialog is how the same override ends up written five times and missed on
|
||
the sixth. `MIN_GRIDCELL_MARGIN` is `FromDIP( 2 )` (wx_grid.cpp:76), and it
|
||
replaces the 6px the centred rule pads with rather than adding to it.
|
||
|
||
`col == 0` is the first COLUMN, and in a grid that also has a row-label
|
||
gutter that is not the first `<th>`: the corner cell comes first and column 0
|
||
is the header after it. `.ze-grid-corner` on that empty cell is how a grid
|
||
says so, and it is why the second selector is stated HERE rather than as a
|
||
`text-align: left` in each panel that notices. Left-aligning the corner as
|
||
well costs nothing, because it holds no text. */
|
||
.ze-grid th:first-child,
|
||
.ze-grid th.ze-grid-corner + th {
|
||
text-align: left;
|
||
/* [data] MIN_GRIDCELL_MARGIN = FromDIP( 2 ). */
|
||
padding-left: 2px;
|
||
}
|
||
.ze-grid td {
|
||
background: var(--grid-cell-bg);
|
||
border: 1px solid var(--grid-line);
|
||
padding: 0;
|
||
/* The cell editor's frame of reference: it is laid over this cell's rectangle. */
|
||
position: relative;
|
||
}
|
||
/* An open cell editor: wxGridCellEditor::SetSize( cellRect ). It is a control over the cell, not
|
||
content of it, so it sizes neither the column nor the row; the renderer under it keeps the
|
||
cell's size and is not drawn (wxGrid does not draw a cell its editor covers). */
|
||
/* GRID_CELL_LAYER_RENDERER::Draw (grid_layer_box_helpers.cpp:54): the cell rect Inflate( -1 ), a
|
||
14 x 14 swatch at its left + 4, centred down, the name at left + 14 + 8. The swatch is
|
||
LAYER_PRESENTATION::DrawColorSwatch: the layer colour with a 1px black rectangle drawn INSIDE
|
||
the 14 px. It was an inline span here, which takes no width or height - only its border showed,
|
||
a sliver beside the name. */
|
||
.ze-grid td > .ze-grid-text.ze-swatch-text {
|
||
padding-left: 5px; /* [data] Inflate( -1 ) then + 4 */
|
||
}
|
||
.ze-grid td > .ze-grid-text.ze-swatch-text > .ze-combo-swatch {
|
||
display: inline-block;
|
||
box-sizing: border-box;
|
||
width: 14px; /* [data] size = 14 */
|
||
height: 14px; /* [data] size = 14 */
|
||
margin-right: 8px; /* [data] rect.SetLeft( rect.GetLeft() + m_bitmap.GetWidth() + 8 ) */
|
||
vertical-align: middle;
|
||
}
|
||
.ze-grid td > .ze-grid-under-editor {
|
||
visibility: hidden;
|
||
}
|
||
.ze-grid td > .ze-grid-editor {
|
||
position: absolute;
|
||
inset: 0;
|
||
display: flex;
|
||
align-items: stretch;
|
||
}
|
||
.ze-grid td > .ze-grid-editor > * {
|
||
flex: 1 1 auto;
|
||
min-width: 0;
|
||
}
|
||
/* `wxGrid::EnableGridLines( false )` — the rules between cells, not the
|
||
dialog's own outer border. `sel_layer.cpp`'s `PCB_ONE_LAYER_SELECTOR` is
|
||
the first caller; any future grid that turns lines off gets this instead
|
||
of its own copy. */
|
||
.ze-grid.ze-grid-no-lines td,
|
||
.ze-grid.ze-grid-no-lines th {
|
||
border: none;
|
||
}
|
||
/* `WX_GRID::EnableAlternateRowColors`, which the constructor installs from
|
||
`appearance.grid_striping` (`common/widgets/wx_grid.cpp:329`):
|
||
|
||
wxColor color = wxGrid::GetDefaultCellBackgroundColour();
|
||
table->SetAttrProvider( new WX_GRID_ALT_ROW_COLOR_PROVIDER( color ) );
|
||
|
||
// WX_GRID_ALT_ROW_COLOR_PROVIDER::UpdateColors, :168-174
|
||
wxColor rowColor = aBaseColor.ChangeLightness( IsDarkTheme() ? 105 : 95 );
|
||
|
||
// ::GetAttr, :176-183
|
||
// Just pass through the cell attribute on odd rows (start normal to
|
||
// allow for the header row)
|
||
if( !( row % 2 ) ) return cellAttr.release();
|
||
|
||
Two things fall out of that and both are easy to get backwards.
|
||
|
||
The colour is the CELL BACKGROUND shifted, never a shade of its own:
|
||
`ChangeLightness( 105 )` is wx blending 5% toward white (`ialpha > 100`
|
||
blends with 255 at `1 - (ialpha - 100)/100`), so it is stated here as a mix
|
||
of the token rather than as a second hex that would drift away from it. The
|
||
105 is the DARK-theme branch, which is the branch this app is always on.
|
||
|
||
And it is the ODD grid rows that are striped, row 0 being left alone — so
|
||
`nth-child(even)` in CSS, where the first `<tr>` is child 1. Scoped to
|
||
`tbody` because a `<thead>` restarts the count and would invert it. */
|
||
[data-grid-striping="1"] .ze-grid tbody tr:nth-child(even) > td,
|
||
.ze-grid.ze-grid-striped tbody tr:nth-child(even) > td {
|
||
/* [data] `ChangeLightness( 105 )` — 5% of white over the cell colour. */
|
||
background: color-mix(in srgb, var(--grid-cell-bg) 95%, #fff);
|
||
}
|
||
/* A wxGrid's WINDOW is wider than its columns, and it paints all of it: the
|
||
column-label band runs the full width in BTNFACE and the field below it in
|
||
the cell colour, with the gridlines stopping where the last column does.
|
||
[px] on a live footprint editor's Graphics Defaults the label band measures
|
||
rgb(55,55,55) out to the panel edge, the strip right of Italic measures
|
||
rgb(39,39,39) — a cell's colour, with no rules in it — and there is no outer
|
||
border anywhere: x=651 is the dialog and x=652 is already the grid.
|
||
|
||
This empty trailing cell is that strip. It also takes the slack: it is the
|
||
one column WxGridView gives no width, every real column being max(stated,
|
||
content) - the `SetColSize` floor and the `GetVisibleWidth` autosize - so the
|
||
stretch is not shared out among them (that put a grid's row labels an inch
|
||
from their values). It used to do this with `width: 100%`, but a percentage
|
||
cell makes an auto-layout table's own width "everything it is offered", so
|
||
every dialog with a grid opened as wide as the screen allowed. With
|
||
`SetupColumnAutosizer` there is no filler: the flexible column takes it. */
|
||
.ze-grid th.ze-grid-filler,
|
||
.ze-grid td.ze-grid-filler {
|
||
border: none;
|
||
padding: 0;
|
||
}
|
||
/* With column labels the filler takes the slack by being the one column with no
|
||
width (WxGridView states every other one). Without them nothing states a width,
|
||
so it still claims the slack the old way. */
|
||
.ze-grid:not(:has(> thead)) td.ze-grid-filler {
|
||
width: 100%;
|
||
}
|
||
/* WxGridView fixedColumns: SetColSize widths held exactly, the filler taking only what is left
|
||
(a 100% filler in a fixed-layout table would take the whole table). */
|
||
.ze-grid.ze-grid-fixed {
|
||
table-layout: fixed;
|
||
}
|
||
/* WxGridView onSize: the grid window is the width its parent gives it, as a wx window is,
|
||
and its wxEVT_SIZE handler fits the columns to that. Its columns must not widen it in
|
||
turn, or the left pane of Symbol Fields Table grew past its sash and under the right one.
|
||
On a box round the table: size containment does not apply to a table. */
|
||
/* wxGridWindow: the sizer's item. `DrawGridSpace` fills what the rows leave with
|
||
GetDefaultCellBackgroundColour(); the rows keep their own heights. */
|
||
.ze-grid-window {
|
||
background: var(--grid-cell-bg);
|
||
}
|
||
/* A grid whose window states a min size (`m_grid->SetMinSize( wxSize( 400,200 ) )`): a sizer
|
||
takes that INSTEAD of the best size (wxWindow::GetEffectiveMinSize), so the grid asks for
|
||
400 x 200 and scrolls whatever does not fit - wxGrid is a scrolled window. Asking for every
|
||
column instead pushed Symbol Fields Table off the screen. */
|
||
.ze-szi-minw.ze-szi-minh > .ze-grid-window,
|
||
.ze-szi-minw.ze-szi-minh > .ze-dataview-window {
|
||
contain: size;
|
||
overflow: auto;
|
||
}
|
||
.ze-szi-minw:not(.ze-szi-minh) > .ze-grid-window,
|
||
.ze-szi-minw:not(.ze-szi-minh) > .ze-dataview-window {
|
||
contain: inline-size;
|
||
overflow-x: auto;
|
||
}
|
||
/* Only the height stated (`m_viewControlsGrid->SetMinSize( wxSize( -1,250 ) )`) on a grid that is
|
||
already its slot's width: both axes are given, so it is contained both ways and scrolls down. */
|
||
.ze-szi-minh > .ze-grid-window.ze-grid-self-sized {
|
||
contain: size;
|
||
overflow: auto;
|
||
}
|
||
/* A grid with a wxEVT_SIZE handler is the width of its slot, never its columns'. */
|
||
.ze-grid-window.ze-grid-self-sized {
|
||
contain: inline-size;
|
||
overflow: hidden;
|
||
}
|
||
.ze-grid.ze-grid-fixed th.ze-grid-filler,
|
||
.ze-grid.ze-grid-fixed td.ze-grid-filler {
|
||
width: auto;
|
||
}
|
||
/* The row-label gutter is a LABEL, so it takes the label colour rather than the
|
||
cell colour — the same call that paints the column headers. */
|
||
/* The one column `SetupColumnAutosizer` marks flexible. It is the only one that
|
||
takes the slack, and therefore the only one whose text must not reach its
|
||
column's intrinsic width — `width: 0` + `min-width: 100%` paints the text
|
||
across the whole cell while contributing nothing to the column. Every other
|
||
column is `max( stated, content )`, which is the plain block above. */
|
||
.ze-grid td.ze-grid-flexcol > .ze-grid-text {
|
||
width: 0;
|
||
min-width: 100%;
|
||
}
|
||
.ze-grid td.ze-grid-rowlabel,
|
||
.ze-grid th.ze-grid-rowlabel {
|
||
background: var(--grid-label-bg);
|
||
text-align: center;
|
||
}
|
||
/* A WX_GRID cell holds text instead of an entry whenever it is not being
|
||
edited — a read-only cell always, and every other cell until the grid cursor
|
||
opens its editor (a wxGridCellChoiceEditor draws nothing at all until then).
|
||
So the padding the entry would have carried sits on the cell. Same two
|
||
numbers as `.ze-grid td input`, stated once: a read-only grid and an
|
||
editable one must line up, which they cannot do if each invents its own
|
||
inset. Both forms are here because some grids mark the CELL read-only and
|
||
some wrap the text in a span alongside other cell content. */
|
||
.ze-grid td.ze-grid-text,
|
||
.ze-grid td > .ze-grid-text {
|
||
padding: 3px 6px;
|
||
}
|
||
/* `SetDefaultCellOverflow( false )` (common/widgets/wx_grid.cpp:213): a cell
|
||
clips, it does not spill into its neighbour.
|
||
|
||
It does NOT follow that a cell's text is invisible to its column's width.
|
||
This rule used to carry `width: 0; min-width: 100%`, described as
|
||
`RecomputeGridWidths` — "the column falls back to the width its header
|
||
states, and the flexible one takes the remainder". That is half of it. The
|
||
loop (common/widgets/wx_grid.cpp:1121-1136) runs AutoSizeColumn over every
|
||
autosized column first and floors the result at the `_base.cpp` width:
|
||
|
||
AutoSizeColumn( colIndex );
|
||
const int colSize = GetColSize( colIndex );
|
||
int minWidthScaled = FromDIP( minWidth );
|
||
SetColSize( colIndex, std::max( minWidthScaled, colSize ) );
|
||
|
||
and only then gives the ONE flexible column the slack. So a stated width is a
|
||
FLOOR for every column but the flexible one, not a cap: [px] a live KiCad's
|
||
Name column measures 92 against the 72 `SetColSize( 0, 72 )` states, because
|
||
"Description" needs 88, and Show Name measures 88 against its stated 84.
|
||
`width: 0` took the text out of the intrinsic width entirely, so every column
|
||
sat at exactly its floor and "Description" clipped to "Descriptic" — in the
|
||
one column KiCad widens to fit it. The clipping belongs to the flexible
|
||
column alone, which is why it is now stated there (`.ze-grid-flexcol`) rather
|
||
than on every cell.
|
||
|
||
Wherever it is stated, it must sit on the TEXT and not on the `<td>` — a
|
||
`max-width: 0` cell also collapses the `<input>` the cell swaps in when you
|
||
click into it, so the editor opened with zero width and the row looked
|
||
uneditable. */
|
||
.ze-grid td > .ze-grid-text {
|
||
display: block;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
/* No `text-overflow: ellipsis`. `wxGridCellStringRenderer::Draw` sets a
|
||
clipping region and paints the string into it — an over-long value is cut
|
||
off mid-glyph, with no ellipsis. KiCad's own Description row reads
|
||
"...script generated (kicad-library-uti" and simply stops. */
|
||
}
|
||
/* A wxGrid column is the width `SetColSize` gave it, then redistributed by
|
||
`WX_GRID::RecomputeGridWidths` (wx_grid.cpp:1081) — WITHIN the grid's
|
||
existing width. A cell never widens its column, and the dialog's width is
|
||
settled by `Fit()` BEFORE any of that runs, which is why KiCad's dialog is
|
||
the same width for a diode and for a screw terminal.
|
||
|
||
`overflow: hidden` alone does not do this: with `white-space: nowrap` the
|
||
cell still reports its full text width as its max-content contribution, so
|
||
the column — and, through `.ze-modal`'s `width: max-content`, the whole
|
||
dialog — tracked whichever field value was longest. `max-width: 0` is what
|
||
takes the cell out of that calculation; the column then falls back to the
|
||
width its header states and the flexible one takes the remainder.
|
||
|
||
This is SHARED, not per-dialog, because upstream shares it:
|
||
`SetDefaultCellOverflow( false )` is in `WX_GRID`'s own constructor
|
||
(wx_grid.cpp:213), the base class every KiCad grid inherits, so no wxGrid
|
||
anywhere lets a cell widen its column. Stating it on one dialog would be the
|
||
per-editor copy of a base-class behaviour. */
|
||
|
||
/* wxALIGN_CENTER on the attr, which is what FIELDS_GRID_TABLE gives its bool
|
||
and choice columns (fields_grid_table.cpp:341, 349, 357, 364). */
|
||
.ze-grid td.c,
|
||
.ze-grid th.c {
|
||
text-align: center;
|
||
}
|
||
/* A selected row is FILLED, not outlined.
|
||
wxGrid draws a selection block in wxSYS_COLOUR_HIGHLIGHT and the text in
|
||
HIGHLIGHTTEXT; [px] the fill measures rgb(233,84,32) on a live pl_editor,
|
||
which is #e95420 exactly — the HIGHLIGHT our syscolour probe reports. Ours
|
||
drew a 2px outline and left the row its normal background, which is a
|
||
different affordance, not a lighter version of the same one.
|
||
The row LABEL keeps its own colour: [px] the label cell of the selected row
|
||
still measures rgb(55,55,55), so the fill stops at the data cells. */
|
||
.ze-grid tr.selected td,
|
||
.ze-grid td.selected {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
/* …but only while the GRID has the focus. The selection itself does not clear
|
||
when a cell editor opens — `qa/probes/grid_edit_selection_probe.cpp` shows
|
||
the row still in the selection throughout — so this is a paint rule, not a
|
||
selection one, and the text stays `GetSelectionForeground()` either way.
|
||
Only the fill moves, to `--grid-selection-idle-bg`.
|
||
|
||
Our cells ARE their editors, so `:focus-within` on the table is exactly "a
|
||
cell editor holds the focus". The state it cannot see is focus leaving for
|
||
another control with the row still selected: wx paints the idle fill there
|
||
too, and a table that takes no focus of its own cannot tell that apart from
|
||
nothing being focused at all. Closing that needs the grids to be focusable,
|
||
which is a change at 34 call sites and not this one. */
|
||
.ze-grid:focus-within tr.selected td,
|
||
.ze-grid:focus-within td.selected {
|
||
background: var(--grid-selection-idle-bg);
|
||
}
|
||
.ze-grid tr.selected td.ze-grid-rowlabel {
|
||
background: var(--grid-label-bg);
|
||
color: var(--chrome-fg);
|
||
}
|
||
/* The strip past the last column belongs to no cell, so a selected row does not
|
||
reach it: [px] the row being edited on User Layer Names measures rgb(24,24,24)
|
||
inside its columns and rgb(39,39,39) beyond them. */
|
||
.ze-grid tr.selected td.ze-grid-filler,
|
||
.ze-grid:focus-within tr.selected td.ze-grid-filler {
|
||
background: var(--grid-cell-bg);
|
||
}
|
||
/* `GRID_CELL_TEXT_BUTTON`: the editor is a text field with a button beside it,
|
||
both inside the cell, and the field takes the space the button leaves
|
||
(grid_text_button_helpers.cpp). */
|
||
.ze-grid-editwrap {
|
||
display: flex;
|
||
align-items: center;
|
||
width: 100%;
|
||
}
|
||
.ze-grid-editwrap .ze-grid-input {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.ze-grid-cellbtn:disabled {
|
||
cursor: default;
|
||
}
|
||
.ze-grid-cellbtn {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
/* Square, on the CELL's height — a `GRID_CELL_TEXT_BUTTON`'s button fills the
|
||
cell it lives in, so there is no number to state here. `--ctl-height` is a
|
||
full-size control and this is not one. */
|
||
align-self: stretch;
|
||
aspect-ratio: 1;
|
||
padding: 0;
|
||
border: none;
|
||
background: transparent;
|
||
color: var(--chrome-fg);
|
||
cursor: pointer;
|
||
}
|
||
/* A wxGrid editor has NO FRAME of its own: `wxGridCellTextEditor` creates a
|
||
borderless control and the cell's own outline is the only one. Ours drew the
|
||
shared entry — `--field-bg` inside `--ctl-border`, and an orange focus ring
|
||
on top — because that rule is `.ze-app input:not(…)x5` at (0,5,1) and this
|
||
one was (0,2,1). Two nested rectangles where KiCad draws none, and on a
|
||
SELECTED row a dark field sitting in the middle of the orange fill, which is
|
||
what Akshay saw on Footprint Defaults.
|
||
|
||
The `:not()` run is that rule's own, restated to outrank it. `.ze-bare` is
|
||
the other way to opt out and several grids carry it in their markup; this
|
||
states the same thing once, for the base-class reason — `WX_GRID` is what
|
||
every KiCad grid inherits from, so no grid anywhere has a framed editor and
|
||
no call site should have to remember that. `.ze-bare` in the markup stays
|
||
valid and is now redundant rather than load-bearing.
|
||
|
||
`color: inherit`, not `--chrome-fg`: a wxGrid paints a selected row's text
|
||
in `wxSYS_COLOUR_HIGHLIGHTTEXT`, and the cell already carries that through
|
||
`.ze-grid tr.selected td`. Naming the normal foreground here kept the text
|
||
dark on the orange fill. */
|
||
.ze-app .ze-grid
|
||
td
|
||
input[type="text"]:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(
|
||
[type="range"]
|
||
),
|
||
.ze-grid td .ze-grid-input {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
border: none;
|
||
border-radius: 0;
|
||
background: transparent;
|
||
box-shadow: none;
|
||
color: inherit;
|
||
font: inherit;
|
||
padding: 3px 6px;
|
||
outline: none;
|
||
}
|
||
/* A WX_GRID pane: a bordered, filled scroll area so an empty grid reads as a
|
||
spreadsheet (header + empty rows) instead of a header floating over a gap. */
|
||
/* The scrolled pane a WX_GRID lives in. It carries no `contain: inline-size`: a pane that is
|
||
content-sized (Zone Hatch Offsets' grid, added with proportion 0) would collapse. A grid that
|
||
must not widen its dialog sits in a wxScrolledWindow, as upstream's do. */
|
||
.ze-grid-pane {
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 3px;
|
||
background: var(--chrome-bg2);
|
||
overflow: auto;
|
||
}
|
||
.ze-grid-pane .ze-grid {
|
||
border: none;
|
||
}
|
||
/* Bottom-left add/move/delete bitmap-button row under a WX_GRID. */
|
||
.ze-grid-btns {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
margin-top: 6px;
|
||
}
|
||
.ze-gridbtn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 26px;
|
||
height: 26px;
|
||
padding: 0;
|
||
background: var(--chrome-bg2);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 4px;
|
||
color: var(--chrome-fg);
|
||
cursor: default;
|
||
}
|
||
/* `KiBitmapBundle` renders every one of these into the same small button, so
|
||
they are all one size on screen. Our SVGs are KiCad's own files and their
|
||
headers differ — the `small_*` family is 16 x 16, but `edit.svg` is 24 x 24
|
||
with a nominal width of 1920 — so an unsized <img> drew the pencil at a
|
||
different size from the plus beside it. [px] 16, the small_* family's own
|
||
box, which is what the capture measures across every glyph in the row. */
|
||
.ze-gridbtn img {
|
||
width: 16px;
|
||
/* [px] the same 16 — a bitmap button's icon is square. */
|
||
height: 16px;
|
||
}
|
||
.ze-gridbtn:hover:not(:disabled) {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-gridbtn:disabled {
|
||
opacity: 0.4;
|
||
cursor: default;
|
||
}
|
||
|
||
/* Small count pill next to Errors/Warnings filters (WX_HTML_REPORT_PANEL). */
|
||
.ze-count-badge {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-width: 16px;
|
||
height: 16px;
|
||
padding: 0 5px;
|
||
border-radius: 8px;
|
||
background: rgb(46, 160, 67);
|
||
color: #fff;
|
||
font-size: 10px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.ze-btn {
|
||
/* A wxButton on this theme, measured off a real dialog's footer: 34px tall
|
||
and about 85 wide for a one-word label, faced #373737 over a #181818 edge.
|
||
Ours were shorter and faced --chrome-bg2. */
|
||
box-sizing: border-box;
|
||
height: 34px;
|
||
min-width: 85px;
|
||
padding: 0 14px;
|
||
background: var(--content-bg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: 4px;
|
||
color: inherit;
|
||
cursor: default;
|
||
/* The dialog font, not the shell's 13px base: measured against a real
|
||
footer, "Go Back" is 52px wide there and was 45 here. */
|
||
font: inherit;
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
.ze-btn:hover:not(:disabled) {
|
||
background: var(--chrome-hover);
|
||
}
|
||
/* The affirmative button of a dialog is an ORDINARY button.
|
||
`DIALOG_SHIM` calls `sdbSizer->GetAffirmativeButton()->SetDefault()`
|
||
(dialog_shim.cpp:1882), and on GTK that only makes Enter activate it — it
|
||
does not restyle it. An accent fill would need GTK's `.suggested-action`
|
||
class, and two things say it never arrives:
|
||
|
||
- KiCad never asks for it. `grep -rn suggested-action` over the whole
|
||
10.0.5 tree finds nothing.
|
||
- Yaru would have to define it for a default button anyway, and it does
|
||
not: the extracted theme (gtk.gresource -> Yaru-dark/3.0/gtk.css) has
|
||
`.suggested-action` rules but NO `button.default` rule at all.
|
||
|
||
So this filled every dialog's OK with the accent where KiCad leaves it the
|
||
same grey as Cancel — Akshay spotted it on Symbol Properties, and it was
|
||
wrong on all sixty dialogs that use the class. The class is kept so the
|
||
affirmative button is still NAMED, which is what carries the Enter binding
|
||
and the a11y default, but it paints like any other button. */
|
||
.ze-btn.primary {
|
||
background: var(--ctl-face);
|
||
border-color: var(--ctl-border);
|
||
}
|
||
/* A disabled wxBitmapButton inside a grid cell dims the same way, and takes
|
||
this rule rather than restating the colour: one disabled ink, not two. It
|
||
has no face of its own, so `background` below lands on `transparent` from
|
||
`.ze-grid-cellbtn`. */
|
||
.ze-btn:disabled,
|
||
.ze-grid-cellbtn:disabled {
|
||
/* A disabled wxButton faces #2a2a2a with its label dimmed, rather than the
|
||
whole control being made translucent. */
|
||
background: var(--ctl-face-disabled);
|
||
color: #8a8a8a;
|
||
cursor: default;
|
||
}
|
||
|
||
/* Inline text entry for placing a label / global label / text. */
|
||
.ze-label-input {
|
||
z-index: 20;
|
||
min-width: 120px;
|
||
padding: 2px 6px;
|
||
font: 13px / 1.4 monospace;
|
||
color: #d7263d;
|
||
background: #fff;
|
||
border: 1px solid var(--chrome-active-border, #2d6cdf);
|
||
border-radius: 2px;
|
||
outline: none;
|
||
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
|
||
}
|
||
|
||
/* Label properties dialog.
|
||
No width. `dialog_field_properties_base.cpp:19` is
|
||
`SetSizeHints( wxDefaultSize, wxDefaultSize )` -- no minimum at all -- so the
|
||
dialog is whatever `Fit()` makes it, which is its sizer's own minimum. The
|
||
`440px` that used to be here was an invented number, and once the formatting
|
||
row took wx's real button sizes the buttons ran straight out of the dialog
|
||
instead of widening it. `.ze-modal` already states `width: max-content`,
|
||
which is `Fit()`; this rule only has to stop overriding it. */
|
||
.ze-modal.ze-label-dialog {
|
||
height: auto;
|
||
}
|
||
.ze-label-dialog-body {
|
||
padding: 14px 16px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
}
|
||
.ze-label-dialog-body .row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
/* The label COLUMN of a row — the caption to the LEFT of a control, which is a
|
||
wxStaticText in its own sizer cell and so a fixed column. `:first-child` is
|
||
what makes it the label column; any other span in the row is something else
|
||
and must size to its own text.
|
||
- a `wxRadioButton`/`wxCheckBox` carries its own label as part of the one
|
||
control, and never wraps: "Update all symbols in schematic" was being
|
||
crushed into 56 px and broken one word per line, which hid most of
|
||
DIALOG_CHANGE_SYMBOLS' options behind five-line rows;
|
||
- a trailing note like "(not applied yet)" is a wxStaticText after the
|
||
control, not before it.
|
||
Twenty-one dialogs share this body class, so the fix is by position rather
|
||
than by adding a class to every call site. */
|
||
/* No `font-size`. A wxStaticText takes the dialog's own font, and this is the
|
||
label column of twenty-one dialogs — the last survivor of the family that
|
||
also had it on `.ze-props-group`'s legend and label rules. 13px against the
|
||
dialog's 11pt / 14.67px is why they all read smaller than KiCad's. */
|
||
.ze-label-dialog-body .row > span:first-child {
|
||
width: 56px;
|
||
flex: 0 0 auto;
|
||
color: #c7c9cc;
|
||
}
|
||
.ze-label-dialog-body .row .ze-search {
|
||
flex: 1;
|
||
}
|
||
.ze-select {
|
||
flex: 1;
|
||
padding: 5px 8px;
|
||
font: inherit;
|
||
background: var(--chrome-bg2);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 4px;
|
||
outline: none;
|
||
}
|
||
.ze-select:focus {
|
||
outline: none;
|
||
}
|
||
.ze-select:focus-visible {
|
||
outline: 1px dashed var(--field-focus-border);
|
||
outline-offset: -3px;
|
||
}
|
||
|
||
/* The bold/italic/alignment row. These are KiCad's own `BITMAP_BUTTON`, not a
|
||
wxBitmapButton, and it sizes itself rather than asking GTK
|
||
(`common/widgets/bitmap_button.cpp:101-107`):
|
||
|
||
if( hasFlag( wxCONTROL_SEPARATOR ) )
|
||
return wxSize( FromDIP( m_dipSize.x + m_padding * 2 ),
|
||
wxButton::GetDefaultSize().y );
|
||
return FromDIP( m_dipSize + wxSize( m_padding * 2, m_padding * 2 ) );
|
||
|
||
`m_padding` is 5 for the bitmap constructor these are built with (`:56-64`),
|
||
and `m_dipSize` is the bundle's default size -- 16, since these icons ship at
|
||
16 and 32 only. So a button is 16 + 10 square.
|
||
|
||
Measured against that formula by qa/probes/field_props_width_probe.cpp:
|
||
|
||
wxButton::GetDefaultSize() 85 x 27
|
||
=> a 16px BITMAP_BUTTON 26 x 26
|
||
=> a separator 10 x 27
|
||
|
||
An earlier pass here measured a plain wxBitmapButton and got 36 x 34, which
|
||
is GTK's button and not this control; that made ours visibly larger than
|
||
KiCad's. */
|
||
.ze-lp-iconbtn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
/* [data] m_dipSize 16 + m_padding 5 * 2. */
|
||
width: 26px;
|
||
/* [data] the same, DoGetBestSize being square for a non-separator. */
|
||
height: 26px;
|
||
padding: 0;
|
||
background: transparent;
|
||
border: 1px solid transparent;
|
||
border-radius: 3px;
|
||
color: var(--chrome-fg);
|
||
cursor: default;
|
||
}
|
||
.ze-lp-iconbtn img {
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
.ze-lp-iconbtn:hover:not(:disabled) {
|
||
background: var(--chrome-bg2);
|
||
border-color: var(--chrome-border);
|
||
}
|
||
.ze-lp-iconbtn:disabled {
|
||
cursor: default;
|
||
}
|
||
.ze-lp-iconbtn:disabled > * {
|
||
filter: var(--bitmap-disabled-filter);
|
||
}
|
||
/* DIALOG_SYNC_SHEET_PINS / PANEL_SYNC_SHEET_PINS (sync_sheet_pin/*_base.cpp). bSizer3: pins,
|
||
labels, the button column, then the associated pairs; each list panel takes an equal share. */
|
||
.ze-sync-panel {
|
||
display: flex;
|
||
min-width: 666px; /* [data] PANEL_SYNC_SHEET_PINS_BASE size wxSize( 666,414 ) */
|
||
min-height: 414px; /* [data] PANEL_SYNC_SHEET_PINS_BASE size wxSize( 666,414 ) */
|
||
}
|
||
.ze-sync-column {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
margin: 5px; /* [data] bSizer3->Add( m_panel11, 1, wxEXPAND | wxALL, 5 ) */
|
||
}
|
||
/* m_labelSymName / m_labelSheetName: wxALIGN_CENTER_HORIZONTAL | wxBORDER_THEME. */
|
||
.ze-sync-caption {
|
||
text-align: center;
|
||
border: 1px solid var(--ctl-border);
|
||
/* wxBORDER_THEME draws the GTK frame, rounded about 5px (.ze-tplsel-card measured it). */
|
||
border-radius: 5px; /* [px] the wxBORDER_THEME corner traced for .ze-tplsel-card */
|
||
}
|
||
.ze-sync-list {
|
||
flex: 1;
|
||
overflow: auto;
|
||
}
|
||
/* bSizer13: a proportion-1 spacer above the buttons and a proportion-2 one below. */
|
||
.ze-sync-buttons {
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: flex-start;
|
||
padding-top: 33%;
|
||
}
|
||
.ze-sync-buttons > * {
|
||
margin: 5px; /* [data] bSizer14->Add( m_btnUsePinAsTemplate, 0, wxALL|wxEXPAND, 5 ) */
|
||
}
|
||
/* bSizer8: a stretch spacer, the tip, Close. */
|
||
.ze-sync-tip {
|
||
margin-right: auto;
|
||
}
|
||
|
||
/* The font picker. `m_fontCtrl` is added with **wxEXPAND** in every dialog
|
||
that carries one — `dialog_field_properties_base.cpp:146`,
|
||
`dialog_label_properties_base.cpp:221`, `dialog_text_properties_base.cpp:97`
|
||
— each spanning two grid-bag columns, so it takes whatever width the row
|
||
gives it. A `max-width` here was a local literal that upstream never wrote,
|
||
and it is a large part of why these dialogs open narrower than KiCad's: the
|
||
control that should be pushing the row out was capped at 150px.
|
||
|
||
Its width is not in KiCad's source either: FONT_CHOICE is a
|
||
wxOwnerDrawnComboBox built with ZERO items (`font_choice.cpp:179-191`) and
|
||
then filled by `RefreshFonts()` with every installed face, so its best size
|
||
is a property of the machine. Measured here by
|
||
qa/probes/field_props_width_probe.cpp:
|
||
|
||
installed faces 248
|
||
FONT_CHOICE GetBestSize().x 275
|
||
...with only the 2 static items 119
|
||
|
||
and 275 is what carries the row to the 685 that fits a 695px dialog -- the
|
||
width Akshay measured off a real one. */
|
||
.ze-lp-font {
|
||
font: inherit;
|
||
padding: 3px 4px;
|
||
background: var(--chrome-bg2);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 3px;
|
||
}
|
||
/* `formattingSizer` adds every button with `wxALIGN_CENTER_VERTICAL` alone —
|
||
no wxLEFT/wxRIGHT — so wx puts NO space between them, and its CalcMin is
|
||
just 10 x 36 + 5 x 2 = 370. A 2px flex gap here added 28px the real row does
|
||
not have. */
|
||
.ze-lp-iconbar {
|
||
grid-column: 1 / -1;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0 5px;
|
||
}
|
||
/* A separator is the same BITMAP_BUTTON with `SetIsSeparator()`, so it is
|
||
`m_dipSize.x (0) + m_padding * 2` wide by `wxButton::GetDefaultSize().y`
|
||
tall, and `OnPaint` draws ONE line down the middle of it in
|
||
`wxSYS_COLOUR_GRAYTEXT` (`bitmap_button.cpp:279-284`). It is the width that
|
||
spaces the groups apart, not a margin. */
|
||
.ze-lp-sep {
|
||
/* [data] 0 + m_padding 5 * 2. */
|
||
width: 10px;
|
||
/* [px] wxButton::GetDefaultSize().y, field_props_width_probe. */
|
||
height: 27px;
|
||
margin: 0;
|
||
/* [px] wxSYS_COLOUR_GRAYTEXT #929292, drawn 1px wide at GetSize().x / 2. */
|
||
background:
|
||
linear-gradient(var(--ctl-fg-disabled), var(--ctl-fg-disabled)) center / 1px 100% no-repeat;
|
||
}
|
||
|
||
/* PAGED_DIALOG — the shell Preferences, Schematic Setup and Board Setup all
|
||
sit in. Its size really is stated upstream, and as a RANGE rather than a
|
||
pick (`common/widgets/paged_dialog.cpp:427-443`):
|
||
|
||
SetMinSize( wxDefaultSize );
|
||
minSize.IncTo( FromDIP( wxSize( 600, 500 ) ) );
|
||
minSize.DecTo( FromDIP( wxSize( 1500, 900 ) ) ); // Failsafe
|
||
SetMinSize( minSize );
|
||
|
||
so the dialog is fitted to its content, floored at 600 x 500 and capped at
|
||
1500 x 900. The floor was inline at the call site with no citation and the
|
||
ceiling was missing entirely. */
|
||
.ze-modal.ze-paged-dialog {
|
||
/* [data] `minSize.IncTo( FromDIP( wxSize( 600, 500 ) ) )`. */
|
||
min-width: 600px;
|
||
/* [data] the same call. */
|
||
min-height: 500px;
|
||
/* [data] `minSize.DecTo( FromDIP( wxSize( 1500, 900 ) ) )`, the failsafe. */
|
||
max-width: 1500px;
|
||
/* [data] the same call. */
|
||
max-height: 900px;
|
||
resize: both;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* Symbol Properties dialog (KiCad DIALOG_SYMBOL_PROPERTIES).
|
||
No width: its base file is `SetSizeHints( wxDefaultSize, wxDefaultSize )`,
|
||
so the dialog is as wide as its content. */
|
||
.ze-modal.ze-props-dialog {
|
||
height: auto;
|
||
max-height: 90vh;
|
||
}
|
||
|
||
.ze-template-dialog .ze-tpl-list {
|
||
width: 240px;
|
||
flex: 0 0 auto;
|
||
overflow: auto;
|
||
border-right: 1px solid var(--chrome-border);
|
||
padding: 6px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
}
|
||
.ze-tpl-card {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 6px 8px;
|
||
border-radius: 4px;
|
||
cursor: default;
|
||
font-size: 13px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.ze-tpl-card:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-tpl-card.active {
|
||
background: var(--chrome-active);
|
||
color: #fff;
|
||
}
|
||
.ze-tpl-card img,
|
||
.ze-tpl-noicon {
|
||
width: 40px;
|
||
height: 40px;
|
||
object-fit: contain;
|
||
flex: 0 0 auto;
|
||
background: rgba(255, 255, 255, 0.12);
|
||
border-radius: 4px;
|
||
}
|
||
.ze-tpl-detail {
|
||
flex: 1;
|
||
padding: 14px 18px;
|
||
overflow: auto;
|
||
min-width: 0;
|
||
}
|
||
.ze-tpl-detail h3 {
|
||
margin: 0 0 8px;
|
||
}
|
||
.ze-tpl-desc {
|
||
font-size: 13px;
|
||
line-height: 1.55;
|
||
opacity: 0.85;
|
||
white-space: pre-wrap;
|
||
}
|
||
.ze-props-body {
|
||
padding: 12px 14px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
min-height: 0;
|
||
overflow: auto;
|
||
}
|
||
.ze-props-error {
|
||
background: #5d2226;
|
||
border: 1px solid #a2363e;
|
||
color: #ffd9dc;
|
||
padding: 6px 10px;
|
||
border-radius: 4px;
|
||
font-size: 13px;
|
||
cursor: default;
|
||
}
|
||
.ze-props-grid-wrap {
|
||
overflow: auto;
|
||
max-height: 300px;
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 4px;
|
||
}
|
||
.ze-props-grid {
|
||
border-collapse: collapse;
|
||
width: 100%;
|
||
font-size: 12.5px;
|
||
}
|
||
.ze-props-grid th {
|
||
position: sticky;
|
||
top: 0;
|
||
background: var(--chrome-bg2);
|
||
color: #c7c9cc;
|
||
text-align: left;
|
||
font-weight: 600;
|
||
padding: 5px 8px;
|
||
border-bottom: 1px solid var(--chrome-border);
|
||
white-space: nowrap;
|
||
}
|
||
.ze-props-grid td {
|
||
border-bottom: 1px solid var(--chrome-border);
|
||
padding: 2px 4px;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-props-grid td.c {
|
||
text-align: center;
|
||
}
|
||
.ze-props-grid tr.sel td {
|
||
background: var(--chrome-active);
|
||
color: var(--selection-fg);
|
||
}
|
||
/* FDC_COLOR: the swatch plus the reset that puts the field back on the
|
||
default text colour, which a native colour input cannot express. */
|
||
.ze-props-grid td.ze-cell-color {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
}
|
||
.ze-props-grid td.ze-cell-color input[type="color"] {
|
||
width: 32px;
|
||
height: 20px;
|
||
padding: 0;
|
||
border: 1px solid var(--chrome-border);
|
||
background: none;
|
||
}
|
||
.ze-cell-input {
|
||
width: 110px;
|
||
padding: 3px 6px;
|
||
font: inherit;
|
||
font-size: 12.5px;
|
||
background: var(--chrome-bg2);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid transparent;
|
||
border-radius: 3px;
|
||
outline: none;
|
||
}
|
||
.ze-cell-input:focus {
|
||
border-color: var(--chrome-active-border);
|
||
}
|
||
.ze-cell-input.num {
|
||
width: 64px;
|
||
text-align: right;
|
||
}
|
||
.ze-cell-select {
|
||
padding: 3px 4px;
|
||
font: inherit;
|
||
font-size: 12.5px;
|
||
background: var(--chrome-bg2);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid transparent;
|
||
border-radius: 3px;
|
||
outline: none;
|
||
}
|
||
.ze-cell-select:focus {
|
||
outline: none;
|
||
}
|
||
.ze-cell-select:focus-visible {
|
||
outline: 1px dashed var(--field-focus-border);
|
||
outline-offset: -3px;
|
||
}
|
||
/* A grid cell KiCad renders read-only: the mandatory field names, and the
|
||
hierarchical path. Same metrics as an editable cell so rows stay aligned. */
|
||
.ze-cell-ro {
|
||
display: inline-block;
|
||
padding: 3px 6px;
|
||
font-size: 12.5px;
|
||
color: var(--chrome-fg-dim, #9aa0a6);
|
||
}
|
||
.ze-props-rowbtns {
|
||
display: flex;
|
||
gap: 6px;
|
||
align-items: center;
|
||
}
|
||
.ze-props-rowbtns .grow {
|
||
flex: 1;
|
||
}
|
||
.ze-btn.sm {
|
||
padding: 2px 10px;
|
||
font-size: 13px;
|
||
}
|
||
.ze-props-columns {
|
||
display: flex;
|
||
gap: 12px;
|
||
}
|
||
.ze-props-group {
|
||
flex: 1;
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 4px;
|
||
padding: 8px 12px 10px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 7px;
|
||
min-width: 0;
|
||
}
|
||
/* ONE font size in a dialog. A wxStaticBox's label, a wxCheckBox's label and a
|
||
wxStaticText all take the dialog's own font — KiCad calls SetFont on none of
|
||
them, and `qa/probes/dialog_chrome_probe.cpp` measures that font as Ubuntu
|
||
Sans 11 pt, which is `--ui-font-size` and what `.ze-app` already hands down.
|
||
The only smaller font in a KiCad dialog is where one is asked for by name,
|
||
`KIUI::GetSmallInfoFont` = `getGUIFont( win, -2 )`, as the Symbol Properties
|
||
library link does.
|
||
|
||
These three said 12.5 px and 13 px against that 14.67 px, so every group box
|
||
in the app — this is a shared rule — read smaller than KiCad's. Stating
|
||
nothing is the fix; the size then comes from the one place that holds it. */
|
||
/* No colour either, for the same reason the size went: #c7c9cc was ours. */
|
||
.ze-props-group legend {
|
||
padding: 0 6px;
|
||
}
|
||
.ze-props-group label {
|
||
display: flex;
|
||
align-items: center;
|
||
/* Nearly every label in a group box is a checkbox or a radio carrying its
|
||
own text, and the space between an indicator and its label is GTK's, not
|
||
ours to pick: --check-inset is Gtk.CheckButton's own style properties,
|
||
asked directly. This said 8px, which is 4 too wide on every such row and
|
||
as many pixels onto the width of every dialog that groups them. */
|
||
gap: var(--check-inset);
|
||
}
|
||
/* The label COLUMN of a row, exactly as `.ze-label-dialog-body .row > span`
|
||
above — and it needs the same `:first-child`, for the same reason. That one
|
||
was fixed; this SECOND copy was not, and it is the one that applies inside a
|
||
group box, so it went on crushing every control that carries its own label
|
||
into a 56 px column.
|
||
|
||
It is what kept DIALOG_CHANGE_SYMBOLS narrow. `.ze-chsym-opt > span` states
|
||
`white-space: nowrap` at (0,1,1); this sits at (0,2,2) and beats it, so the
|
||
labels could not wrap and could not have their width either — they overflowed
|
||
their column and printed on top of the box beside them. With the width freed
|
||
the dialog goes from 728 px to the 956 wx computes (see the DIALOG_CHANGE_SYMBOLS
|
||
block below). Restating the width at the call site would have been the
|
||
specificity trap; stating nothing there and scoping this rule is the fix.
|
||
|
||
A span that is NOT first is never a caption: a wxCheckBox or wxRadioButton
|
||
carries its label as part of the one control, and a trailing note like
|
||
"(not applied yet)" is a wxStaticText after the control, not before it. */
|
||
.ze-props-group label.row > span:first-child {
|
||
width: 56px;
|
||
flex: 0 0 auto;
|
||
color: #c7c9cc;
|
||
}
|
||
/* A wxNotebook page. Its face is wxSYS_COLOUR_WINDOW, not the dialog's own
|
||
background — [px] the page reads rgb(39,39,39) against rgb(44,44,44) either
|
||
side of the notebook on the capture above, which is --chrome-bg2 against
|
||
--chrome-bg. generalPageSizer's items each carry a 5 px border. */
|
||
/* A wxNotebook's client area is the size of its LARGEST page, not of the
|
||
selected one: `wxNotebook::DoGetBestSize` walks every page and takes the
|
||
maximum, and the dialog around it is then fitted ONCE by
|
||
`GetSizer()->SetSizeHints( this )`. That is why switching from General to
|
||
Pin Functions in KiCad does not move the window by a pixel.
|
||
|
||
Ours rendered the unselected pages as `tab === … ? … : null` — out of the
|
||
DOM — so the dialog re-fitted itself to whichever tab was showing and jumped
|
||
size on every tab click. All the pages are in the DOM now and share ONE grid
|
||
cell, so the cell is as large as the largest of them; the unselected ones are
|
||
made invisible rather than removed, because `display: none` would take them
|
||
back out of the measurement and undo the whole point. */
|
||
/* external/wx/simplebook.tsx: wxSimplebook, its pages in one grid cell (the book is its largest
|
||
page), on the dialog's face; only the selected one is seen. */
|
||
.ze-simplebook {
|
||
display: grid;
|
||
}
|
||
.ze-simplebook > .ze-simplebook-page {
|
||
grid-area: 1 / 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.ze-simplebook > [data-hide] {
|
||
visibility: hidden;
|
||
pointer-events: none;
|
||
}
|
||
/* `SetMaxSize( size.y = page->GetBestSize().y )` after a SetSelection: the book is as tall as the
|
||
page it shows, still as wide as its widest. */
|
||
.ze-simplebook.fit-selection > [data-hide] {
|
||
height: 0;
|
||
overflow: hidden;
|
||
}
|
||
.ze-nb-body {
|
||
display: grid;
|
||
min-height: 0;
|
||
/* The pages fill the notebook's client area: everything in the frame below the tabs. */
|
||
flex: 1 1 auto;
|
||
}
|
||
/* external/wx/notebook_ui.tsx's page: the notebook's own face, laid out by the page's sizer. */
|
||
.ze-nb-body > .ze-nb-page {
|
||
grid-area: 1 / 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
background: var(--chrome-bg2);
|
||
}
|
||
/* NOT `[hidden]`: the shell's reset makes that `display: none !important`. */
|
||
.ze-nb-body > [data-nbhide] {
|
||
visibility: hidden;
|
||
pointer-events: none;
|
||
}
|
||
/* A wxNotebook draws a FRAME, and the tab strip sits inside it — the border
|
||
runs across the top ABOVE the tabs and down both sides, enclosing the strip
|
||
and the page as one control. Ours drew only the line under the tabs, so the
|
||
notebook read as a row of labels with a panel below rather than as a box.
|
||
|
||
[px] a live KiCad 10.0.5, scanning down x=531 (inside the dialog, left of the
|
||
page): the title bar's border at y=390, then the dialog face to y=400, then
|
||
rgb(28,28,28) at y=401 — the frame's top edge, ten pixels above the tabs —
|
||
the strip's own face to y=437, and rgb(28,28,28) again at y=438 under the
|
||
tabs. Across at y=420, inside the strip, the same rgb(28,28,28) at x=527 and
|
||
x=1519, eleven pixels inside each dialog edge, which is mainSizer's wxALL 10
|
||
plus the dialog's own border. That is --chrome-border.
|
||
|
||
The three other `.ze-nb-tabs` call sites (appearance controls, GerbView's
|
||
layer manager, the colour picker) are docked panes rather than dialogs and
|
||
were not measured, so they are left alone rather than given a frame on the
|
||
strength of this one. */
|
||
.ze-nb-frame {
|
||
border: 1px solid var(--chrome-border);
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
flex: 1;
|
||
}
|
||
/* GRID_CELL_ICON_TEXT_RENDERER (`common/widgets/grid_icon_text_helpers.cpp`):
|
||
the icon is drawn at the cell's left, the text after it. Both Symbol
|
||
Properties' Electrical Type / Graphic Style cells and DIALOG_PIN_PROPERTIES
|
||
use it, so the rule is not scoped to this dialog. */
|
||
.ze-icon-text {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [data] `GRID_CELL_ICON_TEXT_RENDERER::Draw` (grid_icon_text_helpers.cpp)
|
||
starts at `leftCut = FromDIP( 4 )`, draws the bitmap there, then does
|
||
`leftCut += bitmap width` and `leftCut += FromDIP( 4 )` before the text —
|
||
so it is FOUR either side of the icon, not MIN_GRIDCELL_MARGIN's two,
|
||
which is what this said and is what made the row read as "|-Passive". */
|
||
gap: 4px;
|
||
/* [data] the same `leftCut = FromDIP( 4 )`, the lead-in before the bitmap. */
|
||
padding-left: 4px;
|
||
}
|
||
.ze-pin-icon {
|
||
/* [data] KiBitmapBundle resolves the 16 px variant for a grid cell, which is
|
||
the size KiCad's own vendored SVG draws at. Stated so a cell's line-height
|
||
cannot stretch it. */
|
||
width: 16px;
|
||
/* [data] the same 16, square, for the same reason. */
|
||
height: 16px;
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.ze-drag-handle {
|
||
cursor: move;
|
||
user-select: none;
|
||
}
|
||
/* RC_TREE_MODEL rows: a bold marker heading with its item children under it.
|
||
|
||
`RC_TREE_MODEL::Update` puts them in ONE wxDATAVIEW_CELL_INERT text column
|
||
as wide as the view's client area (common/rc_item.cpp:400-406), and every
|
||
metric below was read off that very control (qa/probes/rc_tree_dataview):
|
||
|
||
- the renderer reports wxELLIPSIZE_NONE, and the GtkCellRendererText
|
||
under it PANGO_ELLIPSIZE_NONE with wrap-width -1. A row longer than the
|
||
column is CLIPPED - it does not wrap onto a second line, and it does not
|
||
get an ellipsis. This list used to wrap, which doubled the height of
|
||
every clearance violation and broke the row rhythm outright.
|
||
- a row's cell is 22 px and rows are pitched 24 px apart: GtkTreeView's
|
||
vertical-separator is 2.
|
||
|
||
No colour of its own, either. `GetAttr` (common/rc_item.cpp:555-596) is the
|
||
only thing that styles a row and it touches colour ONLY for an excluded
|
||
one, so a child is wxSYS_COLOUR_LISTBOXTEXT exactly like its heading - the
|
||
#b6b8bb this used to dim children with was ours, the same invention the
|
||
library tree had. */
|
||
.ze-erc-item {
|
||
padding: 0;
|
||
}
|
||
.ze-erc-subrow {
|
||
/* [px] the row pitch: the 22 px cell plus GtkTreeView's 2 px vertical-separator. */
|
||
height: 24px;
|
||
/* [px] the cell the text sits in, which GetItemRect reports as 22. */
|
||
line-height: 22px;
|
||
padding: 0 12px 0 34px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
cursor: default;
|
||
}
|
||
.ze-erc-subrow:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-erc-subrow.selected {
|
||
background: var(--chrome-active);
|
||
color: var(--selection-fg);
|
||
}
|
||
/* `aAttr.SetItalic( true )` and a colour, never a transparency - and never a
|
||
strikethrough, which the C++ says outright it would use "if wxWidgets
|
||
supported it". Both come from GetAttr through `rowStyle`. */
|
||
.ze-erc-subrow.excluded {
|
||
font-style: italic;
|
||
}
|
||
.ze-erc-row .msg {
|
||
/* `aAttr.SetBold( true )` is wxFONTWEIGHT_BOLD; `rowStyle` sets the weight
|
||
from GetAttr, and this is the fallback for the rows it does not style. */
|
||
font-weight: 700;
|
||
}
|
||
.ze-erc-list {
|
||
flex: 1;
|
||
overflow: auto;
|
||
padding: 6px 0;
|
||
/* [data] `m_markerDataView->SetMinSize( wxSize( 640, 260 ) )`,
|
||
dialog_erc_base.cpp:95. */
|
||
min-height: 260px;
|
||
/* [data] the same call — the WIDTH half, which we did not have, and which is
|
||
what should set the dialog's width rather than a number on the panel. */
|
||
min-width: 640px;
|
||
}
|
||
/* A wxDataViewCtrl's best size is 48 x 48 whatever it holds (qa/probes/drc_dataview_probe.cpp):
|
||
its rows never size the dialog, in EITHER direction - only the SetMinSize the base states, and
|
||
what the sizer gives it past that. Every marker list's base states one (DRC 320 high, ERC
|
||
640 x 260, the footprint checker and both cleanups 660 x 250), so the list is contained both
|
||
ways and scrolls. `.ze-dataview-window` alone contains the width only: a run with hundreds of
|
||
violations grew DRC Control past the bottom of the window, its buttons with it. */
|
||
.ze-erc-list.ze-dataview-window {
|
||
contain: size;
|
||
}
|
||
.ze-erc-row {
|
||
display: flex;
|
||
gap: 8px;
|
||
align-items: center;
|
||
/* [px] the row pitch, as .ze-erc-subrow. */
|
||
height: 24px;
|
||
/* [px] the cell, as .ze-erc-subrow. */
|
||
line-height: 22px;
|
||
padding: 0 12px;
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
}
|
||
.ze-erc-row:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-erc-row.error .sev {
|
||
color: #e6090d;
|
||
}
|
||
.ze-erc-row.warning .sev {
|
||
color: #d19200;
|
||
}
|
||
.ze-erc-row .msg {
|
||
flex: 1;
|
||
/* The cell clips (see above), and a flex item will not shrink below its
|
||
content without this. It is the measured behaviour of the control, not a
|
||
shrink-to-fit of a sized widget. */
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
}
|
||
/* Violations / Ignored Tests notebook tabs (DIALOG_ERC m_notebook) */
|
||
.ze-erc-tabs {
|
||
display: flex;
|
||
gap: 2px;
|
||
padding: 6px 8px 0;
|
||
border-bottom: 1px solid var(--chrome-border);
|
||
}
|
||
.ze-erc-tabs .tab {
|
||
padding: 5px 12px;
|
||
cursor: default;
|
||
border: 1px solid transparent;
|
||
border-bottom: none;
|
||
border-radius: 4px 4px 0 0;
|
||
color: #9a9ca0;
|
||
}
|
||
/* Search pane rows. SEARCH_PANE_LISTVIEW is a wxListCtrl, so a picked row draws
|
||
in the platform's selection colour; ours is the same orange the ERC list uses,
|
||
so "which row is selected" reads the same wherever a list appears. */
|
||
.ze-search-row {
|
||
cursor: default;
|
||
}
|
||
/* Painted on the cells, not the row: every other selected-row style in this file
|
||
does the same, because a background on a `tr` is unreliable once the cells
|
||
establish their own formatting (these carry `overflow: hidden` for the
|
||
ellipsis). */
|
||
.ze-search-row:hover td {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-search-row.selected td {
|
||
background: var(--chrome-active);
|
||
color: var(--selection-fg);
|
||
}
|
||
|
||
/* SEARCH_PANE_BASE's own sizer (search_pane_base.cpp:14-51): `bSizer2` is
|
||
`m_searchCtrl1` (proportion 1, `wxALIGN_CENTER_VERTICAL|wxRIGHT`, border 4),
|
||
`m_staticline1` (`.ze-libtree-sep` already carries its own
|
||
`wxEXPAND|wxTOP|wxBOTTOM, 3`) and `m_menuButton` — whose own border (2) is
|
||
inert, because `wxALIGN_CENTER_VERTICAL` alone sets no directional bit for
|
||
it to apply to, so no left margin is added here either. */
|
||
.ze-search-pane-header {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.ze-search-pane-header > .ze-search {
|
||
margin-right: 4px;
|
||
}
|
||
/* `m_sizerOuter->Add( m_notebook, 1, wxEXPAND|wxBOTTOM, 4 )`. */
|
||
.ze-search-pane-notebook {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1;
|
||
min-height: 0;
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
/* The docked Search pane is 240px wide, where four tabs at the dialog's padding
|
||
overflow and put a horizontal scrollbar under the whole panel. Upstream's
|
||
wxNotebook scrolls its own tab strip in that case; wrapping is the web
|
||
equivalent and costs no chrome. Scoped, so the dialogs keep one row. */
|
||
.ze-erc-tabs.compact {
|
||
flex-wrap: wrap;
|
||
row-gap: 0;
|
||
}
|
||
.ze-erc-tabs.compact .tab {
|
||
padding: 4px 8px;
|
||
}
|
||
|
||
.ze-erc-tabs .tab.active {
|
||
color: var(--chrome-fg);
|
||
background: var(--chrome-hover);
|
||
border-color: var(--chrome-border);
|
||
box-shadow: inset 0 -2px 0 var(--chrome-active);
|
||
}
|
||
.ze-erc-row.selected {
|
||
background: var(--chrome-active);
|
||
color: var(--selection-fg);
|
||
}
|
||
.ze-erc-row.excluded .msg {
|
||
font-style: italic;
|
||
}
|
||
.ze-erc-row .pos {
|
||
margin-left: 8px;
|
||
color: #9a9ca0;
|
||
}
|
||
.ze-erc-row.selected .pos {
|
||
color: #d9dbde;
|
||
}
|
||
/* WX_INFOBAR-style warning strip (annotation incomplete) */
|
||
/* WX_INFOBAR (common/widgets/wx_infobar.cpp). TWO rules used to define this,
|
||
the later overriding half of the earlier, and between them they invented an
|
||
olive #4d3f14 / #ffd76e strip floating 6px inside the canvas with rounded
|
||
corners. Upstream's is none of those things, and the dead rule is now gone.
|
||
|
||
[chrome, measured] The colours are GTK's. WX_INFOBAR asks
|
||
`KIPLATFORM::UI::GetInfoBarColours` (:65), which reads the `infobar.info`
|
||
style context and, when that returns alpha 0 as Yaru-dark does, falls
|
||
through to `infobar.info > revealer > box` (port/wxgtk/ui.cpp:96-113). Asked
|
||
of GTK along that exact path: background #121617, text #f7f7f7.
|
||
|
||
[chrome, measured] 35px tall. The constructor does say `sy = 1.5 * sy` (:81),
|
||
"the infobar seems to start too small" - but that SetSize is overridden by
|
||
the sizer's own layout, so 1.5x is not what renders. Measured off a real
|
||
KiCad window instead: the #121617 band runs 35 rows before the 1px #292929
|
||
border below it. Taking the C++ at its word gave 52px, which is half again
|
||
too tall. */
|
||
.ze-infobar {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
flex: 0 0 auto;
|
||
min-height: 35px;
|
||
padding: 0 12px;
|
||
font-size: var(--ui-font-size);
|
||
background: #121617;
|
||
color: #f7f7f7;
|
||
border-bottom: 1px solid var(--chrome-border);
|
||
}
|
||
/* `ShowMessage( wxJoin( msgs, '\n' ) )`: several messages are several lines. */
|
||
.ze-infobar .msg {
|
||
white-space: pre-line;
|
||
}
|
||
.ze-infobar .lnk {
|
||
margin-left: 8px;
|
||
color: #6ea8fe;
|
||
cursor: default;
|
||
text-decoration: underline;
|
||
}
|
||
|
||
/* ---- Auth gate (sign-in / sign-up) ---- */
|
||
.ze-auth {
|
||
position: fixed;
|
||
inset: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: var(--chrome-bg2);
|
||
color: var(--chrome-fg);
|
||
padding: 24px;
|
||
}
|
||
.ze-auth-splash {
|
||
font-size: calc(var(--ui-font-size) * 1.25);
|
||
opacity: 0.85;
|
||
letter-spacing: 0.2px;
|
||
}
|
||
.ze-auth-card {
|
||
width: 340px;
|
||
max-width: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 14px;
|
||
/* The DIALOG face (`.ze-modal`'s own, measured at #2C2C2C by
|
||
`qa/probes/dialog_chrome_probe.cpp`), not `--panel-bg`. --panel-bg is the
|
||
docked-pane body and is byte-identical to --field-bg, so entries drawn on
|
||
it were invisible: the same colour as the surface behind them. The GTK
|
||
relationship is an entry DARKER than the dialog it sits on, and that only
|
||
holds if the dialog uses the dialog colour. */
|
||
background: var(--chrome-bg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 10px;
|
||
padding: 28px 26px;
|
||
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
|
||
}
|
||
/* The mark, wordmark and one line of copy, stacked and centred: the product's
|
||
own front door, so it leads with the logo rather than a bare text brand. */
|
||
.ze-auth-head {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 14px;
|
||
text-align: center;
|
||
margin-bottom: 10px;
|
||
}
|
||
/* The single heading, the only line on the front screen. Scaled up off the
|
||
dialog font (no literal), so the whole surface still grows from one place. */
|
||
.ze-auth-title {
|
||
font-size: calc(var(--ui-font-size) * 1.6);
|
||
font-weight: 600;
|
||
letter-spacing: 0.1px;
|
||
line-height: 1.25;
|
||
color: var(--chrome-fg);
|
||
max-width: 20ch;
|
||
}
|
||
.ze-auth-brand {
|
||
/* The wordmark: the dialog font, scaled up. No literal — it tracks
|
||
--ui-font-size, so the whole surface grows from one place. */
|
||
font-size: calc(var(--ui-font-size) * 1.5);
|
||
font-weight: 700;
|
||
letter-spacing: 0.2px;
|
||
color: var(--chrome-fg);
|
||
}
|
||
.ze-auth-sub {
|
||
font-size: var(--ui-font-size);
|
||
color: var(--chrome-fg-muted);
|
||
line-height: 1.45;
|
||
max-width: 32ch;
|
||
}
|
||
.ze-auth-field {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 5px;
|
||
font-size: var(--ui-font-size-info);
|
||
}
|
||
.ze-auth-field span {
|
||
color: var(--chrome-fg-muted);
|
||
}
|
||
.ze-auth-field input {
|
||
/* The measured GTK entry: --field-bg over --ctl-border, the same pair every
|
||
other text entry in the app uses. */
|
||
background: var(--field-bg);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: 6px;
|
||
padding: 9px var(--field-pad-x);
|
||
font: inherit;
|
||
font-size: var(--ui-font-size);
|
||
outline: none;
|
||
}
|
||
.ze-auth-field input:focus {
|
||
/* GTK's own `entry:focus` border, which is a SOFTENED orange (alpha 0.7 over
|
||
the field), not the flat accent — see --field-focus-border. */
|
||
border-color: var(--field-focus-border);
|
||
}
|
||
.ze-auth-error {
|
||
background: rgba(230, 9, 13, 0.12);
|
||
color: #ff8f92;
|
||
border: 1px solid rgba(230, 9, 13, 0.35);
|
||
border-radius: 6px;
|
||
padding: 8px 10px;
|
||
font-size: var(--ui-font-size-info);
|
||
}
|
||
/* The affirmative button. It carries `.ze-btn.primary`, so its face, height,
|
||
border and font-size come from the one shared button — the same ordinary
|
||
grey OK button every dialog uses, NOT an accent fill (see .ze-btn.primary).
|
||
This rule only makes it span the card. */
|
||
.ze-auth-submit {
|
||
margin-top: 4px;
|
||
width: 100%;
|
||
}
|
||
.ze-auth-toggle {
|
||
font-size: var(--ui-font-size-info);
|
||
color: var(--chrome-fg-muted);
|
||
text-align: center;
|
||
}
|
||
.ze-auth-switch {
|
||
background: none;
|
||
border: none;
|
||
padding: 0;
|
||
cursor: default;
|
||
/* The foreground, not the accent: a text link on this surface reads as a
|
||
link by its underline, and the accent orange belongs to nothing here. */
|
||
color: var(--chrome-fg);
|
||
font: inherit;
|
||
font-size: inherit;
|
||
text-decoration: underline;
|
||
}
|
||
.ze-auth-confirm {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
}
|
||
.ze-auth-confirm-title {
|
||
font-size: calc(var(--ui-font-size) * 1.1);
|
||
font-weight: 600;
|
||
}
|
||
.ze-auth-confirm p {
|
||
margin: 0;
|
||
font-size: var(--ui-font-size-info);
|
||
color: var(--chrome-fg-muted);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
/* Sign-in as a modal (opened from the header/nudge for a signed-out user who
|
||
dismissed the wall isn't possible, kept for completeness / future reuse). */
|
||
.ze-auth-modal {
|
||
position: relative;
|
||
}
|
||
|
||
/* Delete account (auth/DeleteAccountDialog.tsx): the shared dialog, its body a
|
||
wxFormBuilder column - every item bordered `wxALL 5`, which is --wx-border,
|
||
so two stacked items sit 10 px apart and the first is 5 px in from the
|
||
frame. Nothing else is stated: the width is the sizer's over the widest
|
||
control (the reason list), the fonts and faces are the controls' own. */
|
||
.ze-delete-account-error {
|
||
color: var(--critical);
|
||
}
|
||
.ze-required {
|
||
color: var(--critical);
|
||
font-weight: 400;
|
||
}
|
||
/* The critical colour on a menu row (the reference's sidebar row) and on the
|
||
deletion button. */
|
||
.ze-mitem.ze-critical .lbl,
|
||
.ze-btn.ze-critical:not(:disabled) {
|
||
color: var(--critical);
|
||
}
|
||
|
||
/* Required sign-in wall (AuthGate): the real editor renders blurred and inert
|
||
behind the centred card, so visitors preview what they unlock by signing up. */
|
||
.ze-auth-gate {
|
||
position: fixed;
|
||
inset: 0;
|
||
overflow: hidden;
|
||
background: var(--chrome-bg2);
|
||
}
|
||
.ze-auth-gate-app {
|
||
position: absolute;
|
||
inset: 0;
|
||
/* Soft, not hidden: the backdrop is the manager's chrome with no project in
|
||
it (auth/GateBackdrop), so there is nothing behind the glass to protect,
|
||
and the point of the glass is that the visitor SEES what they are signing
|
||
up for. This was blur(5px) at brightness 0.85 when the real app stood
|
||
here, which read as a dark smear. */
|
||
filter: blur(2px) saturate(0.95) brightness(0.95);
|
||
/* No scale. There was a scale(1.03) here to push a 5px blur's soft edge off
|
||
screen, and it cropped ~30px of frame on every side: the File menu and
|
||
the toolbar on the left, the title bar, the status bar. A 2px edge fades
|
||
into the gate's own background and needs no hiding. */
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
/* Lighter than the default modal backdrop so the blurred app shows through. */
|
||
.ze-modal-backdrop.ze-auth-gate-scrim {
|
||
background: rgba(10, 12, 16, 0.18);
|
||
}
|
||
|
||
/* Split layout (the gate): the sign-in is a full-height panel docked to the
|
||
RIGHT edge, and the blurred, dimmed editor fills the LEFT — so the visitor
|
||
previews the product while they sign in, rather than reading a small card
|
||
floating over it. Instead of centring the card, push it to the right edge
|
||
and let it stretch top to bottom. */
|
||
.ze-modal-backdrop.ze-auth-split {
|
||
align-items: stretch;
|
||
justify-content: flex-end;
|
||
}
|
||
/* The docked panel itself. It reuses `.ze-auth-card`'s inner layout (the flex
|
||
column, the gap) but drops the floating-card chrome — no rounded corners, a
|
||
single seam on its left edge — and holds a bounded content column centred in
|
||
its height. */
|
||
.ze-auth-panel {
|
||
/* The whole right half. The left half is the blurred editor. */
|
||
width: 50vw;
|
||
max-width: none;
|
||
height: 100%;
|
||
border: none;
|
||
border-left: 1px solid var(--chrome-border);
|
||
border-radius: 0;
|
||
box-shadow: -24px 0 60px rgba(0, 0, 0, 0.4);
|
||
/* Vertically CENTRED, then biased upward by a heavier bottom inset — not
|
||
start-aligned at a fixed top offset. The form is short, so pinning it to a
|
||
`15vh` top left a dead half-screen below it; centring balances the space
|
||
whatever the step (chooser, email, code) is showing, and the extra bottom
|
||
padding lifts it above the true middle the way Flux sits. */
|
||
align-items: center;
|
||
justify-content: safe center;
|
||
overflow-y: auto;
|
||
padding: 40px 24px clamp(48px, 10vh, 140px);
|
||
/* A touch more air between the stacked blocks than the compact modal card:
|
||
this is a full half-screen, not a 340px dialog. */
|
||
gap: 20px;
|
||
}
|
||
/* In the half-screen panel the mark sits well clear of the form — the space
|
||
between them is what lifts the logo and drops the fields, rather than the
|
||
whole block drifting up or down as one lump. */
|
||
.ze-auth-panel .ze-auth-head {
|
||
margin-bottom: 30px;
|
||
gap: 18px;
|
||
}
|
||
/* Fields breathe here too; 14px was tuned for the compact modal card. */
|
||
.ze-auth-panel form {
|
||
gap: 18px;
|
||
}
|
||
/* Every block of the form — header, buttons, dividers, the sub-forms — is
|
||
capped to one readable column and centred in the half, so a 960px panel does
|
||
not produce a 960px-wide button. */
|
||
.ze-auth-panel > * {
|
||
width: 100%;
|
||
max-width: 340px;
|
||
}
|
||
.ze-auth-close {
|
||
position: absolute;
|
||
top: 10px;
|
||
right: 12px;
|
||
cursor: default;
|
||
color: var(--chrome-fg-muted);
|
||
font-size: var(--ui-font-size-info);
|
||
}
|
||
.ze-auth-close:hover {
|
||
color: var(--chrome-fg);
|
||
}
|
||
/* Carries `.ze-btn` for its height/border/font; this rule adds the full-card
|
||
width, the icon gap, and Google's required white face. The white and near-
|
||
black ink are Google's brand [data], not theme chrome, so they stay literal
|
||
and override the shared grey. */
|
||
.ze-auth-google {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 100%;
|
||
gap: 9px;
|
||
background: #fff;
|
||
color: #1f1f1f;
|
||
font-weight: 600;
|
||
}
|
||
.ze-auth-google:hover:not(:disabled) {
|
||
background: #f2f2f2;
|
||
}
|
||
/* Password strength: a four-step bar plus its word. The colours are a meter's
|
||
own scale (red -> amber -> green), which is data about the reading rather
|
||
than theme chrome, so they are stated here and marked. */
|
||
.ze-auth-strength {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
margin-top: -4px;
|
||
font-size: var(--ui-font-size-small);
|
||
color: var(--chrome-fg-muted);
|
||
}
|
||
.ze-auth-strength-bar {
|
||
flex: 1;
|
||
height: 4px;
|
||
border-radius: 2px;
|
||
background: var(--chrome-border);
|
||
overflow: hidden;
|
||
}
|
||
.ze-auth-strength-bar span {
|
||
display: block;
|
||
height: 100%;
|
||
transition: width 120ms linear;
|
||
/* [data] meter scale, not chrome. */
|
||
background: #d64545;
|
||
}
|
||
.ze-auth-strength[data-score="2"] .ze-auth-strength-bar span {
|
||
background: #d9a441;
|
||
}
|
||
.ze-auth-strength[data-score="3"] .ze-auth-strength-bar span,
|
||
.ze-auth-strength[data-score="4"] .ze-auth-strength-bar span {
|
||
background: #3f9e5a;
|
||
}
|
||
.ze-auth-strength-label {
|
||
flex: 0 0 auto;
|
||
min-width: 6ch;
|
||
text-align: right;
|
||
}
|
||
/* The one line that has to be read: losing this password loses the projects. */
|
||
.ze-auth-warn {
|
||
font-size: var(--ui-font-size-small);
|
||
}
|
||
/* "Continue with email": a plain text action under the provider buttons (the
|
||
Flux treatment), not a filled button — picking it reveals the email field. */
|
||
.ze-auth-emailbtn {
|
||
background: none;
|
||
border: none;
|
||
padding: 6px;
|
||
color: var(--chrome-fg);
|
||
font: inherit;
|
||
font-size: var(--ui-font-size);
|
||
font-weight: 600;
|
||
cursor: default;
|
||
}
|
||
.ze-auth-emailbtn:hover {
|
||
color: var(--chrome-fg-muted);
|
||
}
|
||
.ze-auth-or {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
color: var(--chrome-fg-muted);
|
||
font-size: var(--ui-font-size-small);
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.6px;
|
||
}
|
||
.ze-auth-or::before,
|
||
.ze-auth-or::after {
|
||
content: "";
|
||
flex: 1;
|
||
height: 1px;
|
||
background: var(--chrome-border);
|
||
}
|
||
.ze-auth-note {
|
||
margin: 0;
|
||
font-size: var(--ui-font-size);
|
||
color: var(--chrome-fg-muted);
|
||
line-height: 1.5;
|
||
}
|
||
/* The recovery key, shown once. Monospace so the groups can be read back
|
||
character by character, and selectable in one drag. The words wrap whole: a
|
||
word split across two lines reads as two words. */
|
||
.ze-auth-recovery-key {
|
||
font-family: ui-monospace, Menlo, Consolas, monospace;
|
||
font-size: var(--ui-font-size);
|
||
line-height: 1.6;
|
||
overflow-wrap: anywhere;
|
||
user-select: all;
|
||
background: var(--field-bg);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: 6px; /* [css] the same radius the auth entries use */
|
||
padding: 9px var(--field-pad-x); /* [css] the auth entry's padding */
|
||
}
|
||
.ze-auth-recovery-actions {
|
||
display: flex;
|
||
gap: var(--field-pad-x);
|
||
align-items: center;
|
||
}
|
||
.ze-auth-recovery-actions .ze-auth-submit {
|
||
flex: 1;
|
||
margin: 0;
|
||
}
|
||
.ze-auth-modal form {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 14px;
|
||
}
|
||
|
||
/* ---- Account chip in the menu bar ---- */
|
||
.ze-account {
|
||
margin-left: auto;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding-right: 6px;
|
||
}
|
||
.ze-account-signout {
|
||
background: var(--chrome-bg2);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 5px;
|
||
padding: 3px 10px;
|
||
font: inherit;
|
||
font-size: 12px;
|
||
cursor: default;
|
||
}
|
||
.ze-account-signout:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
|
||
/* ---- Preferences dialog (KiCad PAGED_DIALOG) --------------------------------
|
||
|
||
NO FONT SIZES ANYWHERE BELOW. Ten rules here stated 12px or 13px - the tree's
|
||
parent rows, the page body, the radio and row labels, the units, the hotkey
|
||
and mouse tables, the hint line and the colour rows - against the dialog's
|
||
own 11 pt / 14.67 px. Not one of the panels upstream calls SetFont: a
|
||
PAGED_DIALOG's pages take the GUI font like every other dialog, which is why
|
||
KiCad's Preferences reads at the same size as the rest of the app and ours
|
||
read smaller everywhere at once. */
|
||
/* Preferences IS a PAGED_DIALOG (`common/dialogs/dialog_preferences.cpp`
|
||
derives from it), so its size is the RANGE `.ze-modal.ze-paged-dialog`
|
||
already states from `paged_dialog.cpp:427-443` - fitted to content, floored
|
||
at 600x500 and capped at 1500x900. The `min(980px, 94vw)` / `min(640px, 90vh)`
|
||
here was a pick, and it was UNDER what the two-column Common page needs,
|
||
which is why the dialog came out narrower and shorter than KiCad's. */
|
||
.ze-prefs-dialog {
|
||
display: flex;
|
||
flex-direction: column;
|
||
/* ONE size, for every page.
|
||
|
||
`PAGED_DIALOG::onPageChanged` recomputes the dialog's MINIMUM from the
|
||
showing page and then grows the window into it — `newSize.IncTo( minSize )`
|
||
(`paged_dialog.cpp:424-451`), a componentwise maximum, so a narrower page
|
||
never shrinks the window back. KiCad's Preferences therefore settles at
|
||
the largest page you have walked to and stops moving.
|
||
|
||
(It is per page and not, as this note used to claim, the maximum over
|
||
every page: `m_treebook->SetFitToCurrentPage( true )` (`:73`) is right
|
||
there in the constructor, and `finishInitialization` says in its own
|
||
comment that the pages are lazy and "the dialog minimum and size are
|
||
correctly established by onPageChanged() once the selected page is
|
||
resolved".)
|
||
|
||
Ours cannot grow-and-hold for free: one page is mounted at a time and
|
||
`.ze-modal` is `width: max-content`, so a content-sized dialog re-sizes
|
||
itself DOWN as well as up as you walk the tree. So the size is stated
|
||
once — [px] 1095 x 713, the installed KiCad's own Preferences on this
|
||
desktop, measured off a capture of it — and `usePagedDialogSize` still
|
||
grows it if one of our pages needs more, which is upstream's
|
||
`newSize.IncTo( minSize )`. The 600 x 500 floor and the 1500 x 900 cap
|
||
`.ze-paged-dialog` states still bound it.
|
||
|
||
A SIZE, not a floor. A floor was tried and reverted: `.ze-modal` is
|
||
`width: max-content`, so any page whose content ran past 1095 pushed the
|
||
dialog wider and the thing being fixed — the dialog changing size as you
|
||
walk the tree — came straight back. A page that does not fit in KiCad's
|
||
own dialog is a parity bug in that PAGE (eeschema's Editing Options was
|
||
one: its Arc editing mode row was side-by-side where upstream stacks it,
|
||
and the left column swelled by 120 px). Until such a page is fixed the
|
||
page area scrolls — `.ze-prefs-panel` is a scroll container — which is
|
||
visible and local, where a jumping dialog is neither. */
|
||
width: 1095px;
|
||
/* [px] the same capture's height. */
|
||
height: 713px;
|
||
}
|
||
.ze-prefs-body {
|
||
flex: 1;
|
||
display: flex;
|
||
min-height: 0;
|
||
}
|
||
.ze-prefs-panel {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 10px 16px;
|
||
min-width: 0;
|
||
}
|
||
/* The Hotkeys page is a PANEL_HOTKEYS_EDITOR, whose tree scrolls inside itself
|
||
and whose button row sits under it. Without a height to fill it would size to
|
||
its content and let the page scroll instead, carrying "Undo All Changes" off
|
||
the bottom - the one control on the page that has to stay reachable. */
|
||
.ze-prefs-panel > .ze-hotkeys-panel {
|
||
height: 100%;
|
||
}
|
||
/* `bPanelSizer`, the horizontal sizer a two-column preferences page is built
|
||
on. The gutter is the LEFT column's own border - `bPanelSizer->Add(
|
||
bLeftSizer, 0, wxRIGHT, 35 )` (panel_common_settings_base.cpp:325) - and its
|
||
proportion is ZERO, so the left column takes the width it needs and the right
|
||
takes the rest. Neither wraps: a wx sizer has no wrapping.
|
||
|
||
This said `gap: 24px`, `flex-wrap: wrap` and `flex: 1` on both children,
|
||
which is three guesses in place of one number. */
|
||
.ze-pref-columns {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
}
|
||
/* A column of a two-column preferences page takes the width its widest row
|
||
needs and never gives any of it back. That is proportion ZERO, which is what
|
||
nearly every one of these Add()s carries:
|
||
|
||
bPanelSizer->Add( bLeftSizer, 0, wxRIGHT, 35 ); common :325
|
||
bPanelSizer->Add( bLeftColumn, 0, wxEXPAND|wxRIGHT, 35 ); eeschema editing
|
||
bPanelSizer->Add( bRightColumn, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); the same
|
||
|
||
This said `min-width: 0` instead, which is the one thing a wx sizer never
|
||
does: a control's minimum size is what a dialog's width is DERIVED from, and
|
||
a column that may shrink past it wraps its labels — which is what put "Focus
|
||
follows mouse between schematic and PCB editors" on two lines. */
|
||
.ze-pref-columns > div {
|
||
flex: none;
|
||
}
|
||
/* [data] the 35 of `wxRIGHT, 35`, which is what Common
|
||
(`panel_common_settings_base.cpp:325`) and eeschema's Editing Options
|
||
(`panel_eeschema_editing_options_base.cpp:276`) both carry. */
|
||
.ze-pref-columns > div:first-child {
|
||
margin-right: 35px;
|
||
}
|
||
/* `PANEL_GRID_SETTINGS`' two columns: `Add( bSizerLeftCol, 0, wxEXPAND|wxRIGHT|
|
||
wxLEFT, 5 )`, then `Add( 16, 0 )`, then the right column's own wxLEFT 5
|
||
(`panel_grid_settings_base.cpp:59-65`). */
|
||
.ze-pref-columns.ze-gutter-26 > div:first-child {
|
||
/* [data] 5 + the 16 px spacer + 5. */
|
||
margin-right: 26px;
|
||
}
|
||
/* `PANEL_GERBVIEW_DISPLAY_OPTIONS`' two columns, which are spaced by three
|
||
Add() borders rather than the usual two:
|
||
|
||
m_galOptionsSizer->Add( m_galOptsPanel, 0, wxEXPAND|wxRIGHT, 15 );
|
||
(panel_gerbview_display_options.cpp:35)
|
||
m_UpperSizer->Add( m_galOptionsSizer, 0, wxEXPAND|wxRIGHT, 20 );
|
||
m_UpperSizer->Add( bRightSizer, 0, wxEXPAND|wxLEFT, 5 );
|
||
(panel_gerbview_display_options_base.cpp:23, :139)
|
||
|
||
eeschema's page reaches the shared 35 by 5 + a 20 px spacer + 10
|
||
(panel_eeschema_display_options_base.cpp:76-79, :242), so this really is a
|
||
different number and not a restatement of that one. */
|
||
.ze-pref-columns.ze-gutter-40 > div:first-child {
|
||
/* [data] 15 + 20 + 5. */
|
||
margin-right: 40px;
|
||
}
|
||
/* `PANEL_SYM_DISPLAY_OPTIONS`' two columns, three Add() borders again but a
|
||
different three:
|
||
|
||
m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND|wxRIGHT, 5 );
|
||
(panel_sym_display_options.cpp:36)
|
||
bPanelSizer->Add( m_galOptionsSizer, 0, wxEXPAND|wxRIGHT, 15 );
|
||
bPanelSizer->Add( bRightColumn, 0, wxEXPAND|wxBOTTOM|wxLEFT, 10 );
|
||
(panel_sym_display_options_base.cpp:21, :51)
|
||
|
||
`PANEL_SYM_EDITING_OPTIONS` reaches the same 30 by another route — its left
|
||
column's own wxRIGHT 5 plus an `Add( 25, 0 )` spacer
|
||
(panel_sym_editing_options_base.cpp:172-176) — so the Symbol Editor's two
|
||
two-column pages agree with each other and with neither of the pages above. */
|
||
.ze-pref-columns.ze-gutter-30 > div:first-child {
|
||
/* [data] 5 + 15 + 10 on Display Options; 5 + a 25 px spacer on Editing Options. */
|
||
margin-right: 30px;
|
||
}
|
||
/* `bSizerLeftCol` (`panel_grid_settings_base.cpp:23-56`): the heading, the list
|
||
at PROPORTION 1, and the button row under it. The list is the thing that
|
||
grows — `Add( m_currentGridCtrl, 1, wxEXPAND|wxBOTTOM|wxLEFT, 3 )` — so the
|
||
buttons sit at the bottom of the column however tall the page is. Ours drew a
|
||
four-row box with the buttons immediately beneath it. */
|
||
/* `bSizerColumns->Add( bSizerLeftCol, 0, wxEXPAND|… )` and the same for the
|
||
right column, inside `bSizerMain->Add( bSizerColumns, 1, wxEXPAND|wxTOP, 8 )`
|
||
(`panel_grid_settings_base.cpp:59-65`, `:190`): wxEXPAND on a HORIZONTAL
|
||
sizer stretches vertically, and the row itself takes the page. So both
|
||
columns are as tall as the page, which is what lets the list grow.
|
||
`.ze-pref-columns` aligns to flex-start for the pages whose columns are
|
||
stacks of groups; this page says otherwise. */
|
||
.ze-prefs-panel > .ze-pref-columns.ze-stretch {
|
||
height: 100%;
|
||
align-items: stretch;
|
||
}
|
||
.ze-gridlist-col {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
}
|
||
.ze-gridlist-col > .ze-gridlist {
|
||
flex: 1;
|
||
/* [data] `wxEXPAND|wxBOTTOM|wxLEFT, 3` on that Add(). */
|
||
margin: 0 0 3px 3px;
|
||
}
|
||
/* `m_currentGridCtrl` is a `wxListBox`, which on GTK is a treeview inside a
|
||
scrolled window — NOT an entry. Two things follow, and ours had both wrong:
|
||
|
||
* no orange focus ring. The Yaru rule that paints one is `entry:focus`
|
||
(`entry { border-color: #E95420 }` at 70% alpha); a treeview declares no
|
||
focus border at all, which is the same reason a combo has none. Ours took
|
||
the shell's blanket entry-focus rule and drew a two-pixel orange rectangle
|
||
round the list the moment it was clicked.
|
||
* the selected row is the SELECTION colour, not the browser's blue:
|
||
[css] `treeview.view:selected { background-color: #E95420 }` with
|
||
`color: #FFFFFF` in the rule under it — `--chrome-active` and `--view-fg`,
|
||
the same pair the tree and the hotkey list already use. */
|
||
/* The list itself. [css] `.frame { box-shadow: none; border-radius: 0;
|
||
border: 1px solid #181818 }` — the frame a wxListBox's scrolled window
|
||
wears: square corners, no shadow, and #181818 is `--ctl-border`. The ground
|
||
and the ink are the view's, `.view { color: white; background: #272727 }`.
|
||
|
||
And no focus ring: the Yaru rule that paints one is `entry:focus`, and a
|
||
treeview declares no focus border at all — the same reason a combo has
|
||
none. */
|
||
.ze-gridlist {
|
||
overflow: auto;
|
||
outline: none;
|
||
background: var(--panel-bg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: 0;
|
||
color: var(--view-fg);
|
||
}
|
||
/* A wxDataViewListCtrl is a scrolled window: its best size is its columns' width, not its
|
||
rows' height - the sizer gives it a height and it scrolls in it. Rule Area Properties
|
||
states that height on the sizer (`bLayersListSizer->SetMinSize( 240,560 )`); left to its
|
||
rows, the list of every layer made the dialog as tall as the screen and cut it off.
|
||
`height: 0` is the "no height of its own"; the item's flex growth fills the slot. */
|
||
.ze-dataview-list {
|
||
height: 0;
|
||
}
|
||
/* A wxCheckListBox: its height is wx's best size (CheckListBoxBestHeight, at most ten rows), never
|
||
its rows' - the 22 layers of the Plot dialog made it taller than the window and pushed the
|
||
buttons out of it. The rows sit in a body with no height of its own (flex-basis 0), so they
|
||
still give the list its width, the sizer stretches it from the best height, and they scroll. */
|
||
.ze-checklist {
|
||
display: flex;
|
||
flex-direction: column;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
}
|
||
.ze-checklist-rows {
|
||
flex: 1 1 0;
|
||
min-height: 0;
|
||
overflow: auto;
|
||
}
|
||
/* A row of the list. */
|
||
.ze-gridlist-row {
|
||
/* [px] GtkCellRendererText's `ypad` of 2 above and below, and half of
|
||
`-GtkTreeView-horizontal-separator: 4` either side. */
|
||
padding: 2px;
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
}
|
||
/* [css] `treeview.view:selected { background-color: #E95420 }`, and
|
||
`color: #FFFFFF` in the rule under it — `--chrome-active` on `--view-fg`,
|
||
the pair the page tree and the hotkey list already use. A native
|
||
`<select size>` could not be made to say this: the browser paints its own
|
||
highlight over `option:checked` as soon as the list has focus, which is why
|
||
the row came up orange and turned blue on the first click. */
|
||
.ze-gridlist-row.selected {
|
||
background: var(--chrome-active);
|
||
color: var(--view-fg);
|
||
}
|
||
/* A heading with no rule under it. `m_gridsLabel` is added on its own
|
||
(`:27`) — the only group label on this page without a `wxStaticLine` — and at
|
||
a border of 5 rather than the 13 a headed group carries. */
|
||
.ze-pref-group-title.ze-noline {
|
||
border-bottom: none;
|
||
/* [data] the `wxTOP|wxRIGHT|wxLEFT, 5` of that Add(). */
|
||
padding: 5px 5px 0;
|
||
margin-bottom: 0;
|
||
}
|
||
/* `fgGridOverrides = new wxFlexGridSizer( 0, 2, 6, 4 )` (`:117`): ONE grid of
|
||
checkbox / choice pairs, so every choice starts where the widest label ends.
|
||
Ours made a flex row per pair, which is why each combo sat at its own x. */
|
||
.ze-gridoverrides {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content;
|
||
align-items: center;
|
||
/* [data] the sizer's own vgap 6 and hgap 4. */
|
||
gap: 6px 4px;
|
||
/* [data] `wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8` on each checkbox. */
|
||
padding-left: 8px;
|
||
}
|
||
/* `bSizerGridButtons` (`panel_grid_settings_base.cpp:34-56`): five
|
||
STD_BITMAP_BUTTONs in a row, each sized by its bitmap. This row was a
|
||
`.ze-pref-row` of standard-width text buttons drawing `+ ✎ ▲ ▼ −`. */
|
||
.ze-gridbtns {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [data] the `wxRIGHT, 5` each of the first four carries. */
|
||
gap: 5px;
|
||
/* [data] `Add( bSizerGridButtons, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 )`. */
|
||
padding: 0 5px 5px;
|
||
}
|
||
/* ...but not every page. `PANEL_EESCHEMA_DISPLAY_OPTIONS` adds its left column
|
||
with `wxEXPAND|wxRIGHT, 5` and then a `Add( 20, 0 )` spacer
|
||
(`panel_eeschema_display_options_base.cpp:76-79`), which is 25. A gutter
|
||
belongs to the Add(), so the page that has a different one says so. */
|
||
.ze-pref-columns.ze-gutter-25 > div:first-child {
|
||
/* [data] the 5 of that wxRIGHT plus the 20 of that spacer. */
|
||
margin-right: 25px;
|
||
}
|
||
/* The one column upstream gives a proportion to: `bPanelSizer->Add( rightSizer,
|
||
1, wxLEFT|wxRIGHT, 5 )` on Common (`panel_common_settings_base.cpp:479`),
|
||
which is why its ruler stretches and eeschema's columns do not. A proportion
|
||
belongs to an Add(), so it is stated by the page that makes it. */
|
||
.ze-pref-columns > .ze-grow {
|
||
flex: 1;
|
||
}
|
||
/* A `wxCheckBox` / `wxRadioButton` / `wxStaticText` is one line. wx measures a
|
||
label's extent and gives the sizer that width; nothing in a dialog wraps
|
||
unless `Wrap( n )` was called on it, and none of these panels calls it. */
|
||
.ze-pref-check,
|
||
.ze-pref-radio,
|
||
.ze-pref-row > .lbl,
|
||
.ze-pref-radiorow > .lbl {
|
||
white-space: nowrap;
|
||
}
|
||
.ze-pref-group {
|
||
margin-bottom: 14px;
|
||
}
|
||
|
||
/* A group heading on a preferences page is a `wxStaticText` with a
|
||
`wxStaticLine` under it, not a wxStaticBox:
|
||
|
||
bLeftSizer->Add( m_staticText20, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
|
||
bLeftSizer->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
|
||
(common/dialogs/panel_common_settings_base.cpp:21-26, and the same shape
|
||
six more times on that page alone)
|
||
|
||
NEITHER `panel_common_settings_base.cpp` NOR its hand-written `.cpp` calls
|
||
SetFont anywhere, so the heading is the dialog's own font at its own weight
|
||
and its own foreground. The 12.5px, the 600 and the #c7c9cc were all ours,
|
||
which is why these read smaller, heavier and dimmer than KiCad's. */
|
||
.ze-pref-group-title {
|
||
/* [data] `wxTOP|wxRIGHT|wxLEFT, 13` on the label and `wxTOP|wxBOTTOM, 2` on
|
||
the rule under it. */
|
||
border-bottom: 1px solid var(--chrome-border);
|
||
padding: 4px 0;
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
/* A group's rows, spaced the way its sizer spaces them.
|
||
|
||
Not a uniform `gap`. In wx the space between two stacked children is the
|
||
BOTTOM border of the upper plus the TOP border of the lower, and each Add()
|
||
states its own, so a KiCad group is unevenly spaced on purpose. The User
|
||
Interface group is the clearest case
|
||
(panel_common_settings_base.cpp:170-293):
|
||
|
||
bSizer14->Add( m_checkBoxIconsInMenus, 0, wxALL, 5 ); 5 / 5
|
||
bSizer14->Add( m_showScrollbars, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); 0 / 5
|
||
... three more the same ...
|
||
bUserInterfaceSizer->Add( m_disableCustomCursors, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||
bUserInterfaceSizer->Add( bSizerIconsTheme, 0, wxEXPAND|wxTOP, 5 ); 5 / 0
|
||
bUserInterfaceSizer->Add( bSizerToolbarSize, 0, wxEXPAND, 5 ); 0 / 0
|
||
bUserInterfaceSizer->Add( bSizerHighContrast, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||
|
||
which gives 5 px through the checkbox run, 10 px before "Icon theme:", NONE
|
||
between it and "Toolbar icon size:", and 5 before "High-contrast". Measured
|
||
on the capture, the checkbox rows repeat every 27 px and the two radio rows
|
||
every 24 -- the three px being exactly that missing border.
|
||
|
||
So: `gap: 0`, every row carrying the wxBOTTOM 5 that nearly all of them
|
||
have, and the exceptions saying so. The default reproduces the old uniform
|
||
5 px for every other page, which is what those pages' sizers do anyway. */
|
||
.ze-pref-group-body {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0;
|
||
padding-left: 4px;
|
||
}
|
||
/* The label column, and the ONE rule that decides how wide it is.
|
||
*
|
||
* A labelled row (`.ze-pref-row`) is a cell of a `wxFlexGridSizer` or a
|
||
* `wxGridBagSizer`, and wx sizes column 0 to **the widest item in that column
|
||
* OF THAT SIZER** -- so the rows of one group line up with each other and with
|
||
* nothing else. Two groups on the same page have two different label columns,
|
||
* which is exactly what KiCad looks like: on Preferences > Footprint Editor >
|
||
* Display Options the Grid Display group's combos start after "Minimum grid
|
||
* spacing:", while the Clearance Outlines group's single "Tracks:" combo sits
|
||
* immediately after that one short word.
|
||
*
|
||
* This was `.ze-pref-row .lbl { min-width: 150px }` -- one number for every
|
||
* label on every page. wx never wrote a 150 anywhere; the value was picked to
|
||
* suit the widest group and it pushed every SHORT label's control 150 px out.
|
||
* "Tracks:", "Grid 1:" and "Grid 2:" were the visible cases, each with its
|
||
* dropdown stranded a hundred-odd pixels from its label.
|
||
*
|
||
* `subgrid` is what makes it per-group without giving up the row box: the row
|
||
* keeps its own element, so `.ze-pref-group-body > *`'s wxBOTTOM margin and the
|
||
* per-Add() border classes still land on it, while its label and control align
|
||
* to the group's tracks. Three tracks, because a row may carry a trailing
|
||
* `wxStaticText` -- `PANEL_GAL_OPTIONS`' "pixels" and the Grids page's
|
||
* `m_grid1HotKey` are both that third column
|
||
* (`panel_grid_settings.cpp:75`, `fgSizer3 = new wxFlexGridSizer( 2, 3, 6, 5 )`).
|
||
*
|
||
* `:has(> .ze-pref-row)` so a group of nothing but checkboxes stays the flex
|
||
* column it was: a `subgrid` whose parent is not a grid falls back to a single
|
||
* implicit track, which would stack every label above its control. */
|
||
.ze-pref-group-body:has(> .ze-pref-row) {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content 1fr;
|
||
align-items: center;
|
||
/* [px] the same 8 `.ze-pref-row`'s own `gap` carried; with `subgrid` the gap
|
||
comes from the parent, so stating it here is what keeps every existing page
|
||
spaced exactly as it was. */
|
||
column-gap: 8px;
|
||
}
|
||
.ze-pref-group-body > .ze-pref-row {
|
||
display: grid;
|
||
grid-template-columns: subgrid;
|
||
grid-column: 1 / -1;
|
||
}
|
||
/* Everything that is not a labelled row -- a checkbox, a radio run, a nested
|
||
table -- is a single `Add()` spanning the sizer, not a cell of it. */
|
||
.ze-pref-group-body:has(> .ze-pref-row) > :not(.ze-pref-row) {
|
||
grid-column: 1 / -1;
|
||
}
|
||
.ze-pref-group-body > * {
|
||
margin-bottom: 5px; /* [data] the wxBOTTOM nearly every Add() in these groups carries. */
|
||
}
|
||
/* `wxTOP, 5` — a row that asks for space above it as well. */
|
||
.ze-pref-group-body > .ze-border-top {
|
||
margin-top: 5px; /* [data] */
|
||
}
|
||
/* An Add() with neither wxTOP nor wxBOTTOM: the next row sits against it. */
|
||
.ze-pref-group-body > .ze-border-none {
|
||
margin-bottom: 0;
|
||
}
|
||
/* A `wxCheckBox` row and a `wxRadioButton` row. One rule, because these panels
|
||
lay the two out with the same sizer flags -- `PANEL_GAL_OPTIONS` adds its
|
||
crosshair radios and its `Always show crosshairs` checkbox to the same
|
||
`wxFlexGridSizer` (`panel_gal_options_base.cpp:104-118`) -- so a second rule
|
||
restating these values is how the two would drift apart. */
|
||
.ze-pref-check,
|
||
.ze-pref-radio {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
/* A `wxRB_GROUP` stacked vertically: the crosshair shape's
|
||
`wxFlexGridSizer( 0, 1, 3, 0 )` (`panel_gal_options_base.cpp:100`). The 3 is
|
||
DATA -- wxFormBuilder's vgap for that sizer -- not a value picked here. A
|
||
radio group laid out in a row (the grid style's `wxBoxSizer( wxHORIZONTAL )`)
|
||
is a `.ze-pref-row` instead and takes that rule. */
|
||
.ze-pref-radios {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 3px;
|
||
}
|
||
/* The same stack where the sizer is a plain `wxBoxSizer( wxVERTICAL )` and the
|
||
space between buttons is each Add()'s OWN border rather than the sizer's
|
||
vgap: Page Size on Preferences > Gerber Viewer > Display Options adds its
|
||
seven radios `wxTOP|wxRIGHT|wxLEFT, 5`
|
||
(`panel_gerbview_display_options_base.cpp:109-133`). Five, not the crosshair
|
||
group's three, and a uniform gap is precisely the thing that would flatten
|
||
the difference. */
|
||
.ze-pref-radios.ze-gap-5 {
|
||
/* [data] the 5 of `wxTOP|wxRIGHT|wxLEFT, 5`. */
|
||
gap: 5px;
|
||
}
|
||
.ze-pref-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
/* `wxWindow::Enable( false )` — what a greyed row LOOKS like.
|
||
GTK dims the label as well as the control (`label:disabled` in the Yaru
|
||
stylesheet takes the same ink as `entry:disabled` and `button:disabled`,
|
||
which is what `--ctl-fg-disabled` carries), and it dims by COLOUR, never by
|
||
opacity. Ours dimmed only the box the browser draws, so a row nothing reads
|
||
looked exactly like a row that works. */
|
||
.ze-pref-check:has(input:disabled),
|
||
.ze-pref-radio:has(input:disabled),
|
||
.ze-pref-radiorow:has(input:disabled),
|
||
.ze-pref-path:has(input:disabled),
|
||
.ze-pref-row:has(input:disabled) > .lbl,
|
||
.ze-pref-row:has(input:disabled) > .unit,
|
||
.ze-zoomcorrection.ze-disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* A `wxRB_GROUP` laid out in a ROW: a bare `wxBoxSizer( wxHORIZONTAL )` with
|
||
`Add( child, 0, wxALL, 5 )` for the label and every button -- Icon theme
|
||
(`panel_common_settings_base.cpp:202-226`), Toolbar icon size (`:228-251`),
|
||
PANEL_GAL_OPTIONS' grid Style (`panel_gal_options_base.cpp:23-41`).
|
||
|
||
Not `.ze-pref-row`: that rule puts the label in the group's shared label
|
||
column, which is what a gbSizer cell wants and what this sizer never had --
|
||
a bare `wxBoxSizer( wxHORIZONTAL )` gives each child its own width, so two
|
||
radio rows do not line up with each other. [px] `qa/probes/
|
||
prefs_ui_group_probe.cpp` builds this exact sizer with wxWidgets on this
|
||
machine and this theme and reads the widgets back: the label starts at the
|
||
same x=5 as the checkboxes above it, the first radio follows it by 10, and
|
||
the radios are 10 apart -- so the two rows do NOT line up with each other,
|
||
because their labels are different widths. */
|
||
.ze-pref-radiorow {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [px] two adjoining wxALL borders of 5, measured back as 10. */
|
||
gap: 10px;
|
||
/* [px] the wxALL 5 each child carries above and below, which a checkbox row
|
||
(`wxBOTTOM|wxRIGHT|wxLEFT, 5`) does not: the probe reads a 27 px pitch
|
||
through the checkbox run, 37 from the last checkbox to Icon theme, and 32
|
||
from Icon theme to Toolbar icon size. Ours had all three at 27, 30 and 20. */
|
||
padding: 5px 0;
|
||
}
|
||
/* No `color` here. A row's label and its trailing units are `wxStaticText`,
|
||
and not one panel in `common/dialogs/` calls SetForegroundColour on one — a
|
||
label is the dialog's own foreground, the same ink as the checkbox labels
|
||
beside it. This stated #c7c9cc for the label and #9aa0a6 for the units,
|
||
which made every labelled row read dimmer than the checkbox above it and
|
||
made a DISABLED row indistinguishable from an enabled one. */
|
||
/* No width here. The label is as wide as its text and never wraps; how far the
|
||
control beside it starts is the GROUP's business, not the label's -- see
|
||
`.ze-pref-group-body:has(> .ze-pref-row)` above. `white-space: nowrap` is the
|
||
half of the old `min-width` that was load-bearing: a wx label is never
|
||
wrapped, and a dialog's width is derived from the widths its controls insist
|
||
on (see the note above `.ze-pref-columns > div`). */
|
||
.ze-pref-row .lbl {
|
||
white-space: nowrap;
|
||
}
|
||
.ze-search.num {
|
||
text-align: right;
|
||
}
|
||
/* `bSizer10->Add( bSizer1, 1, 0, 5 )` — proportion 1, flags ZERO. Without
|
||
wxEXPAND a sizer item is not stretched to the width of its parent: it takes
|
||
its own best size and sits at the left, so the page's content ends where its
|
||
widest row ends and the space to the right stays empty. That is why KiCad's
|
||
two Reset buttons stop level with the Drag Gestures combos above them, and
|
||
why the SpaceMouse group's rule does not run to the edge of the dialog.
|
||
|
||
Both pages that are built this way share the class, because it is the same
|
||
line of C++ in both: `panel_mouse_settings_base.cpp:340` and
|
||
`panel_spacemouse_base.cpp:80`. Ours stretched, because a block element
|
||
fills its parent. */
|
||
.ze-pref-page-natural {
|
||
width: max-content;
|
||
}
|
||
/* A label on its own line with its control stretched under it — what a sizer
|
||
does when the label and the choice are two `Add()`s of a VERTICAL sizer
|
||
rather than one horizontal one. Both Arc editing mode panels are that shape,
|
||
because the longest entry does not fit beside a label:
|
||
`Add( m_staticTextArcEdit, 0, wxALL, 5 )` then
|
||
`Add( m_choiceArcMode, 0, wxALL|wxEXPAND, 5 )`
|
||
(`panel_eeschema_editing_options_base.cpp:48-54`), and pcbnew's
|
||
`Add( m_arcEditModeLabel, 0, wxLEFT, 5 )`, a `(0, 3)` spacer, then
|
||
`Add( m_arcEditMode, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 )`
|
||
(`panel_edit_options_base.cpp:59-71`).
|
||
|
||
No `gap` here, and that is the point: the two panels space the label from the
|
||
choice by different numbers — 5 from a pair of wxALL borders, 3 from an
|
||
explicit spacer — so the distance is `Sel`'s `stacked` prop, stated per call
|
||
site the way every other per-Add() border in these panels is. */
|
||
.ze-pref-stacked {
|
||
display: flex;
|
||
flex-direction: column;
|
||
/* [data] the wxALL/wxLEFT 5 on the sides, which both panels do share. */
|
||
padding: 0 5px;
|
||
}
|
||
.ze-pref-stacked > .ze-combo {
|
||
/* [data] the wxEXPAND on the choice's Add(). */
|
||
width: 100%;
|
||
}
|
||
/* A `wxStaticText` a panel draws BETWEEN its controls — eeschema's Display
|
||
Options has one, "(selection color can be edited in the "Colors" page)"
|
||
(`panel_eeschema_display_options_base.cpp:263`), added to the same gridbag
|
||
sizer as the spin controls around it. It is an ordinary label: the dialog's
|
||
own font and foreground, no colour of its own. `.ze-pref-hint`, which some of
|
||
our pages used for text KiCad does not have at all, states both. */
|
||
.ze-pref-note {
|
||
/* [data] `wxRIGHT|wxLEFT, 5` on that Add(). */
|
||
padding: 0 5px;
|
||
}
|
||
/* A `wxStaticText` a panel sets `KIUI::GetInfoFont( this ).Italic()` on — the
|
||
italic help line beside or above a control. Preferences > Gerber Viewer >
|
||
Excellon Options has four of them
|
||
(`panel_gerbview_excellon_settings.cpp:32-36` sets the font on
|
||
`m_fileFormatHelp`, `m_coordsFormatHelp`, `m_hint1` and `m_hint2`).
|
||
|
||
Not a colour: `GetInfoFont` changes the SIZE and the panel adds the slant.
|
||
Neither call touches the foreground, so these take the dialog's own ink — the
|
||
grey some of our hint styles invented is not upstream's. The size is
|
||
`getGUIFont( win, -1 )`, which is the `--ui-font-size-info` token, not a
|
||
fourth value picked here. */
|
||
.ze-pref-help {
|
||
font-size: var(--ui-font-size-info);
|
||
font-style: italic;
|
||
/* [data] `wxALL, 5` on `m_fileFormatHelp`'s and `m_coordsFormatHelp`'s Add()s
|
||
(`panel_gerbview_excellon_settings_base.cpp:29`, `:79`). */
|
||
padding: 5px;
|
||
}
|
||
/* The same label where its Add() carries no wxTOP — `m_hint1`'s
|
||
`wxBOTTOM|wxRIGHT|wxLEFT, 5` (`:83`), which sits it against the line above. */
|
||
.ze-pref-help.ze-border-none {
|
||
padding-top: 0;
|
||
}
|
||
|
||
/* `gbSizer1` on PANEL_GERBVIEW_EXCELLON_SETTINGS, a
|
||
`wxGridBagSizer( 4, 8 )` whose two radio groups sit in rows 0-1 and 3-4
|
||
(`panel_gerbview_excellon_settings_base.cpp:32-56`). Row 2 is SKIPPED, and
|
||
`SetEmptyCellSize( wxSize( -1, 10 ) )` (`:34`) is what makes the gap between
|
||
the groups ten pixels rather than the sizer's own vgap of 4. */
|
||
.ze-excellon-formats {
|
||
display: flex;
|
||
flex-direction: column;
|
||
/* [data] the empty row 2's height. */
|
||
gap: 10px;
|
||
}
|
||
/* `fgSizerFmt`, a `wxFlexGridSizer( 0, 2 )` whose second cell is a horizontal
|
||
box of [choice] ":" [choice] (`:88-142`). Four columns here rather than two,
|
||
because the inner box has no sizer of its own to be. */
|
||
.ze-excellon-fmt {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content max-content max-content;
|
||
align-items: center;
|
||
/* [data] `wxALL, 5` on each choice and `wxTOP|wxBOTTOM, 5` on the colon, so
|
||
five between every pair. */
|
||
gap: 5px;
|
||
}
|
||
/* This label is one cell of a two-column sizer and takes the width of its text
|
||
-- which is now what every `.lbl` does, so only the nowrap is stated. */
|
||
.ze-excellon-fmt > .lbl {
|
||
white-space: nowrap;
|
||
}
|
||
/* Each choice is a `.ze-pref-row` with an EMPTY label — the wxChoice is the
|
||
whole cell — so the label column must not open in front of it. */
|
||
.ze-excellon-fmt .ze-pref-row {
|
||
gap: 0;
|
||
}
|
||
.ze-excellon-fmt .ze-pref-row > .lbl:empty {
|
||
display: none;
|
||
}
|
||
|
||
/* PANEL_GIT_REPOS. `bLeftSizer->Add( m_enableGit, 0, wxEXPAND|wxALL, 10 )` —
|
||
the one control on the page that is in no group. */
|
||
.ze-git-enable {
|
||
/* [data] the wxALL 10 of that Add(). */
|
||
padding: 10px;
|
||
}
|
||
/* `gbUpdate = new wxGridBagSizer( 4, 5 )` (`panel_git_repos_base.cpp:36`): the
|
||
label, the spin control and "minutes", each in its own cell. */
|
||
.ze-git-update {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content max-content;
|
||
align-items: center;
|
||
/* [data] the sizer's own vgap 4 / hgap 5. */
|
||
gap: 4px 5px;
|
||
/* [data] the label's and the units' `wxLEFT|wxRIGHT, 5`. */
|
||
padding: 0 5px;
|
||
}
|
||
/* `fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 )` (`:73`), whose first cell is
|
||
the "Use default values" checkbox and whose second is an empty spacer — so
|
||
the label column is as wide as that checkbox, and the two entries start
|
||
where it ends. */
|
||
.ze-git-commit {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content;
|
||
align-items: center;
|
||
/* [data] `wxALL, 5` on the checkbox and `wxTOP|wxLEFT, 5` on the labels; the
|
||
sizer itself declares no gap at all. */
|
||
gap: 5px;
|
||
/* [data] `bSizerCommitData->Add( fgSizer1, 0, wxEXPAND|wxALL, 5 )`. */
|
||
padding: 5px;
|
||
}
|
||
/* [px] a wxTextCtrl built with `wxDefaultSize` takes its own best width, which
|
||
is 100 on this theme and measures 97 in the capture. `AddGrowableCol( 1 )`
|
||
only stretches it when the sizer is stretched, and `bPanelSizer->Add(
|
||
bLeftSizer, 0, … )` never stretches this one. Ours ran the whole width of
|
||
the page. */
|
||
.ze-git-commit > input[type="text"] {
|
||
width: 100px;
|
||
}
|
||
/* `m_gbSizer = new wxGridBagSizer( 1, 10 )` (`panel_spacemouse_base.cpp:30`) —
|
||
vgap 1, hgap 10, a label column and a slider column, with every checkbox
|
||
spanning both. Added with `wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10`.
|
||
|
||
[px] `qa/probes/spacemouse_panel_probe.cpp` builds it with wxWidgets here:
|
||
the slider rows are 34 tall and the checkbox rows 22, one pixel of vgap
|
||
between them, and the two EMPTY rows (2 and 6) come out 20 px tall — which
|
||
is the whole of the space above "Pan speed:" and above "Reverse zoom
|
||
direction". */
|
||
.ze-spacemouse-grid {
|
||
display: grid;
|
||
grid-template-columns: max-content 1fr;
|
||
/* [data] the sizer's vgap of 1 and hgap of 10. */
|
||
gap: 1px 10px;
|
||
align-items: center;
|
||
/* [data] `Add( m_gbSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 )`. */
|
||
padding: 10px 10px 0;
|
||
}
|
||
/* [data] `wxGBSpan( 1, 2 )` on all four checkboxes. */
|
||
.ze-spacemouse-grid > .gb-span {
|
||
grid-column: 1 / -1;
|
||
}
|
||
.ze-spacemouse-grid > .gb-top3 {
|
||
/* [data] `wxALIGN_CENTER_VERTICAL|wxTOP, 3` — the only row with a border. */
|
||
margin-top: 3px;
|
||
}
|
||
/* Rows 2 and 6, which hold nothing. */
|
||
.ze-spacemouse-grid > .gb-empty {
|
||
grid-column: 1 / -1;
|
||
/* [px] 20 tall — what an empty wxGridBagSizer row comes out as here,
|
||
measured by `qa/probes/spacemouse_panel_probe.cpp`. */
|
||
height: 20px;
|
||
}
|
||
/* [px] `Add( m_rotationSpeed, …, wxEXPAND|wxALIGN_BOTTOM|wxRIGHT|wxLEFT, 5 )`
|
||
in a grid whose column 1 is growable (`AddGrowableCol( 1 )`), so the slider
|
||
stretches — the probe reads 126 px in a fitted panel — and carries 5 either
|
||
side. */
|
||
.ze-spacemouse-grid > .ze-slider {
|
||
/* [data] the slider's own `wxRIGHT|wxLEFT, 5`. */
|
||
margin: 0 5px;
|
||
}
|
||
/* PANEL_MOUSE_SETTINGS' three sizers.
|
||
|
||
`gbSizer1` (`panel_mouse_settings_base.cpp:31-88`) is a wxGridBagSizer two
|
||
columns of controls wide, with `Add( 30, 0, wxGBPosition( 0, 1 ) )` between
|
||
them: "Center and warp cursor on zoom" at (0,0) and "Automatically pan while
|
||
moving object" at (0,2) share a row, "Use zoom acceleration" spans all three
|
||
at (1,0), and the two slider sizers sit side by side at (2,0) and (2,2). */
|
||
.ze-mouse-panzoom {
|
||
display: grid;
|
||
/* [data] the two content columns and the 30 px spacer between them. */
|
||
grid-template-columns: max-content 30px max-content;
|
||
align-items: center;
|
||
}
|
||
/* Each cell's own Add() border. Row 0 is `wxALL, 5` and row 2 is
|
||
`wxBOTTOM|wxEXPAND|wxTOP, 5`, so both carry 5 above and below; row 1 is
|
||
`wxBOTTOM|wxRIGHT|wxLEFT, 5` and carries none above.
|
||
|
||
[px] `qa/probes/mouse_panel_probe.cpp` builds this sizer with wxWidgets here
|
||
and reads the rows back at 27 px and 40 px apart. Ours were 22 and 25: the
|
||
grid had no gap of any kind, because the 5 px `.ze-pref-group-body > *` hands
|
||
a row lands on the grid CONTAINER, not on the cells inside it. */
|
||
.ze-mouse-panzoom > * {
|
||
/* [data] `wxALL, 5` on row 0 and `wxBOTTOM|wxEXPAND|wxTOP, 5` on row 2. */
|
||
margin: 5px 0;
|
||
}
|
||
|
||
.ze-mouse-panzoom > .gb-col3 {
|
||
grid-column: 3;
|
||
}
|
||
/* [data] `wxGBSpan( 1, 3 )` on "Use zoom acceleration", and the one cell whose
|
||
Add() has no wxTOP: `wxBOTTOM|wxRIGHT|wxLEFT, 5`. */
|
||
.ze-mouse-panzoom > .gb-span {
|
||
grid-column: 1 / -1;
|
||
margin-top: 0;
|
||
}
|
||
/* `m_zoomSizer` / `m_panSizer`: label, slider, and (for zoom) the Automatic
|
||
checkbox. [data] the label's `wxRIGHT|wxLEFT, 8` and the checkbox's
|
||
`wxLEFT|wxRIGHT, 10` (`:57`, `:70`). */
|
||
.ze-mouse-slider {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [data] the label's `wxRIGHT|wxLEFT, 8` (`panel_mouse_settings_base.cpp:57`). */
|
||
gap: 8px;
|
||
}
|
||
.ze-mouse-slider > .ze-pref-check {
|
||
margin-left: 2px; /* [data] 10 against the label's 8. */
|
||
}
|
||
/* `new wxSlider( this, wxID_ANY, 5, 1, 10 )` — no size, so it takes wx's own
|
||
default for the control. [px] 100 x 34 on this theme, measured by building
|
||
this sizer with wxWidgets (`qa/probes/mouse_panel_probe.cpp`). A `.ze-slider`
|
||
fills its container, and in a flex row with no width that is nothing. */
|
||
.ze-mouse-slider > .ze-slider {
|
||
width: 100px;
|
||
}
|
||
/* `fgSizer1 = new wxFlexGridSizer( 0, 3, 5, 5 )` (`:117`): label, choice, and a
|
||
proportion-1 spacer. Every choice carries `wxEXPAND`, so the column is as
|
||
wide as the widest of them and all four match — a combo sized to its own
|
||
text instead is what made three of ours short and one long. */
|
||
.ze-mouse-drag {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content 1fr;
|
||
/* [data] the sizer's own vgap/hgap of 5. */
|
||
gap: 5px;
|
||
align-items: center;
|
||
}
|
||
/* ...on top of which every cell carries `wxBOTTOM, 5` of its own, so the rows
|
||
are 10 apart and not 5. [px] the probe reads a 44 px pitch — a 34 px choice
|
||
plus both — where ours was 39. */
|
||
.ze-mouse-drag > * {
|
||
/* [data] the `wxBOTTOM, 5` every cell of fgSizer1 carries. */
|
||
margin-bottom: 5px;
|
||
}
|
||
.ze-mouse-drag > .ze-combo {
|
||
width: 100%;
|
||
}
|
||
/* `bMargins` (`:191`): the settings column at proportion 1, the button column
|
||
at 0, side by side. [data] `Add( bSizerLeft, 1, wxEXPAND|wxLEFT, 5 )` and
|
||
`Add( bSizerRight, 0, wxEXPAND|wxLEFT, 5 )`. */
|
||
.ze-mouse-scroll {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
/* [data] `Add( bSizerLeft, 1, wxEXPAND|wxLEFT, 5 )`. */
|
||
gap: 5px;
|
||
}
|
||
.ze-mouse-scroll > div:first-child {
|
||
flex: 1;
|
||
}
|
||
/* `bSizer4`: the label and the warning bitmap, which is hidden until two rows
|
||
claim one modifier. */
|
||
.ze-mouse-scroll-head {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [data] two adjoining `wxLEFT|wxRIGHT, 5` borders. */
|
||
gap: 10px;
|
||
/* [data] the label's own `wxLEFT|wxRIGHT, 5`. */
|
||
padding: 0 5px;
|
||
}
|
||
/* `fgSizer2 = new wxFlexGridSizer( 0, 6, 8, 0 )` (`:212`) — six columns and a
|
||
vgap of 8, added with `wxRIGHT|wxLEFT, 24`. */
|
||
.ze-mouse-scrollgrid {
|
||
display: grid;
|
||
grid-template-columns: max-content repeat(4, max-content) max-content;
|
||
/* [data] the sizer's vgap 8 and hgap 0; the cells carry their own 5. */
|
||
row-gap: 8px;
|
||
align-items: center;
|
||
/* [data] `bSizerLeft->Add( fgSizer2, 0, wxRIGHT|wxLEFT, 24 )`. */
|
||
padding: 0 24px;
|
||
}
|
||
.ze-mouse-scrollgrid > * {
|
||
/* [data] `wxRIGHT|wxLEFT, 5` — what every cell in this grid carries. */
|
||
padding: 0 5px;
|
||
}
|
||
/* A radio cell has no label of its own: the column heading is the text
|
||
(`m_rbZoomNone` and the eleven like it are built with `wxEmptyString`).
|
||
|
||
[px] the row is 25 px tall — the probe reads the three radio rows 33 apart
|
||
with the sizer's vgap of 8 between them, and 26 from the headings, whose own
|
||
row is the 18 px of a wxStaticText. A browser's radio is smaller than the
|
||
button GTK draws, so without this the rows close up to 22. */
|
||
.ze-mouse-scrollgrid > .ze-pref-radio {
|
||
justify-content: center;
|
||
/* [px] 25 — the probe reads the radio rows 33 apart with the sizer's vgap of
|
||
8 between them. */
|
||
min-height: 25px;
|
||
}
|
||
.ze-mouse-scrollgrid > .col-head {
|
||
text-align: center;
|
||
}
|
||
/* `fgSizer2->Add( 0, 10, 1, wxEXPAND )` and the four `Add( 42, 0, 1, wxEXPAND )`
|
||
that close the grid (`:300-312`) — an empty last row that holds the
|
||
horizontal-pan checkbox off the modifier rows. */
|
||
.ze-mouse-scrollgrid::after {
|
||
content: "";
|
||
grid-column: 1 / -1;
|
||
height: 10px; /* [data] the spacer's own height. */
|
||
}
|
||
.ze-pref-hotkeys {
|
||
border-collapse: collapse;
|
||
width: 100%;
|
||
}
|
||
.ze-pref-hotkeys th,
|
||
.ze-pref-hotkeys td {
|
||
padding: 4px 8px;
|
||
text-align: left;
|
||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||
}
|
||
.ze-pref-hotkeys th {
|
||
color: #9aa0a6;
|
||
font-weight: 600;
|
||
}
|
||
/* PANEL_COLOR_SETTINGS. `bControlSizer` (`panel_color_settings_base.cpp:19-49`)
|
||
is horizontal, in no group, with a proportion-1 spacer either side of the
|
||
override checkbox — which is what puts the Theme choice hard left and Open
|
||
Theme Folder hard right. */
|
||
.ze-colorpage-controls {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [data] the `wxLEFT|wxRIGHT, 5` its children carry. */
|
||
gap: 5px;
|
||
/* [data] `m_mainSizer->Add( bControlSizer, 0, wxEXPAND|wxALL, 5 )`. */
|
||
padding: 5px;
|
||
}
|
||
/* `Add( 0, 0, 1, wxEXPAND )` — twice, and a proportion of 1 makes each take
|
||
half the slack. */
|
||
.ze-colorpage-controls > .ze-spacer {
|
||
flex: 1;
|
||
}
|
||
/* `bControlSizer` is a wxBoxSizer, not a flex grid: "Theme:" is one item with
|
||
`wxLEFT|wxRIGHT, 5` and `m_cbTheme` the next with no wxLEFT of its own, so
|
||
the two are five pixels apart. The shared label column `.ze-pref-row .lbl`
|
||
reserves is for the pages built on a wxFlexGridSizer, where a column of
|
||
labels has to line up; here there is no column, and it opened half an inch
|
||
of nothing between the word and the choice. */
|
||
.ze-colorpage-controls .ze-pref-row {
|
||
/* [data] the label's own wxRIGHT border. */
|
||
gap: 5px;
|
||
}
|
||
/* [data] `m_cbTheme->SetMinSize( wxSize( 150, -1 ) )`
|
||
(panel_color_settings_base.cpp:28). */
|
||
.ze-colorpage-controls .ze-combo {
|
||
min-width: 150px;
|
||
}
|
||
/* `m_colorsListWindow`, a wxScrolledWindow holding
|
||
`m_colorsGridSizer = new wxFlexGridSizer( 0, 2, 0, 0 )` (`:54-69`): two
|
||
columns — a swatch and its label — scrolling in a column of their own beside
|
||
the preview. Ours was a three-column grid across the whole page, which is
|
||
neither the shape nor the place. */
|
||
.ze-colorlist {
|
||
/* `Add( m_colorsListWindow, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 )` — proportion
|
||
ZERO. The list is exactly as wide as its widest row; the preview takes
|
||
every remaining pixel. */
|
||
flex: 0 0 auto;
|
||
overflow-y: auto;
|
||
/* [data] the Add()'s own wxLEFT|wxRIGHT border. */
|
||
margin: 0 5px;
|
||
/* `m_colorsListWindow->SetBackgroundColour( wxSYS_COLOUR_WINDOW )`
|
||
(panel_color_settings_base.cpp:58) — the view background, not the page's. */
|
||
background: var(--chrome-bg2);
|
||
color: var(--view-fg);
|
||
}
|
||
/* `m_colorsGridSizer = new wxFlexGridSizer( 0, 2, 0, 0 )` (`:60`): two columns,
|
||
a swatch and its label, and NO gap of its own — the rows are spaced by the
|
||
swatch's `wxALL, 3` (panel_color_settings.cpp:271) alone, which is why the
|
||
pitch is the swatch height plus six. */
|
||
.ze-colorgrid {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content;
|
||
align-items: center;
|
||
gap: 0;
|
||
/* [data] `SetMinSize( min_width + margin )` with `const int margin = 20`
|
||
(panel_eeschema_color_settings.cpp:212-215). */
|
||
padding-right: 20px;
|
||
}
|
||
/* `Add( swatch, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 )`. */
|
||
.ze-colorgrid > .ze-swatch {
|
||
margin: 3px;
|
||
}
|
||
/* `Add( label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 5 )`. A label
|
||
truncated by the column is upstream's own note (`:267-269`); ours must not
|
||
wrap instead, which would change the row pitch. */
|
||
.ze-colorgrid > span {
|
||
padding-left: 5px;
|
||
white-space: nowrap;
|
||
}
|
||
/* `PANEL_COLOR_SETTINGS` is a full-bleed page: `m_mainSizer` gives the control
|
||
row its own `wxALL, 5` and adds `m_panel1` with no border at all, so the list
|
||
and the preview reach the notebook page's edges. `.ze-prefs-panel`'s padding
|
||
is the border the OTHER pages' sizers state; this page states its own. */
|
||
.ze-prefs-panel:has(> .ze-colorpage) {
|
||
padding: 0;
|
||
}
|
||
.ze-colorpage {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
/* [px] the notebook page's own inset, measured off a live 10.0.5 Colors page:
|
||
its WX_PANEL border runs from x=660 where the page background starts at
|
||
655, and the list starts 5 further in again at 665. */
|
||
padding-left: 5px;
|
||
}
|
||
/* `m_panel1`, added `1, wxEXPAND`, holding the horizontal `m_colorsMainSizer`. */
|
||
.ze-colorpage-body {
|
||
flex: 1;
|
||
display: flex;
|
||
min-height: 0;
|
||
/* `m_panel1->SetBorders( false, false, true, false )`
|
||
(panel_color_settings.cpp:61) — a TOP border only, painted by
|
||
`WX_PANEL::OnPaint` as `wxSYS_COLOUR_ACTIVEBORDER` mixed 18 % into
|
||
`wxSYS_COLOUR_FRAMEBK` (wx_panel.cpp:52-58). Both are 3DFACE in this
|
||
theme, so the mix is --content-bg exactly. */
|
||
border-top: 1px solid var(--content-bg);
|
||
}
|
||
/* `m_colorsMainSizer->Add( m_preview, 1, wxTOP|wxEXPAND, 1 )`
|
||
(panel_eeschema_color_settings.cpp:227) — proportion 1, so it takes the rest
|
||
of the row, one pixel below the panel's border. */
|
||
.ze-colorpreview {
|
||
flex: 1;
|
||
min-width: 0;
|
||
margin-top: 1px;
|
||
}
|
||
.ze-colorpreview > canvas {
|
||
display: block;
|
||
/* The canvas is sized in DEVICE pixels by its own painter; without a CSS
|
||
size it reports the 300x150 default and the preview is a small box in the
|
||
corner of the pane. Both previews fill their `wxEXPAND` cell. */
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
.ze-pref-colorgrid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
|
||
gap: 4px 16px;
|
||
}
|
||
/* `margins`, PANEL_MAINTENANCE's one real sizer
|
||
(panel_maintenance_base.cpp:17-63):
|
||
|
||
bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
|
||
margins = new wxBoxSizer( wxVERTICAL );
|
||
…
|
||
bPanelSizer->Add( margins, 0, wxRIGHT|wxLEFT, 5 );
|
||
|
||
Proportion ZERO and no wxEXPAND, so `margins` is exactly as wide as its
|
||
widest child insists and the space to its right stays empty. Its widest
|
||
child is `bResetStateSizer`, whose four buttons all carry wxEXPAND -- so they
|
||
stretch to each other and stop, which is why KiCad draws four equal buttons
|
||
about a third of the page wide.
|
||
|
||
Ours was a flex column inside `.ze-prefs-panel`, which is `flex: 1`, so every
|
||
button ran the full 1095 and the page looked nothing like the capture. This
|
||
is the same proportion-0 reading `.ze-pref-columns > div` records; stated
|
||
here because this page has no columns to hang it on. */
|
||
.ze-maintenance {
|
||
width: max-content;
|
||
/* [data] `wxRIGHT|wxLEFT, 5` — margins' own Add(). Written as the shorthand
|
||
rather than `margin-inline` because `central_values.test.ts`'s chrome-
|
||
literal scan does not know the logical properties, and a literal it cannot
|
||
see is one nothing is ratcheting. */
|
||
margin: 0 5px;
|
||
}
|
||
/* `b3DCacheSizer`, the labelled spin control (`:21-38`):
|
||
|
||
b3DCacheSizer->Add( m_staticTextClear3DCache, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||
b3DCacheSizer->Add( m_Clear3DCacheFilesOlder, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
|
||
b3DCacheSizer->Add( m_staticTextDays, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||
margins->Add( b3DCacheSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||
|
||
The spin control carries no LEFT or RIGHT border, so each gap around it is
|
||
one border of 5 rather than the two a checkbox run has -- 5, not the 8
|
||
`.ze-pref-row` defaults to. And the row's own Add has no wxBOTTOM, which is
|
||
why the buttons below sit 10 away (bResetStateSizer's wxTOP) and not 15.
|
||
|
||
The extra 5 of inline margin is what sets the label 5px RIGHT of the buttons'
|
||
left edge in KiCad's capture: the buttons' inset is their own wxALL 5 and
|
||
nothing else, while the label's is this Add's 5 plus its own. Ours had the
|
||
two flush, which is the tell that the sizer was flattened. */
|
||
.ze-maintenance > .ze-pref-row {
|
||
/* [data] wxTOP|wxRIGHT|wxLEFT, 5 — no wxBOTTOM. */
|
||
margin: 5px 5px 0;
|
||
/* [data] the wxALL 5 the label and "days" carry, above and below. */
|
||
padding: 5px 0;
|
||
/* [data] one border of 5 either side of the spin control. */
|
||
gap: 5px;
|
||
}
|
||
/* A vertical run of `wxEXPAND` buttons — PANEL_MAINTENANCE's `bResetStateSizer`
|
||
and PANEL_MOUSE_SETTINGS' `bSizerRight`.
|
||
|
||
wxEXPAND on every button, so they STRETCH to the column rather than each
|
||
taking its own width; that is the flex default, which is why no `align-items`
|
||
is stated.
|
||
|
||
And that is ALL this class may carry. It had `gap: 10px` and `margin-top:
|
||
10px` in it, both read off PANEL_MAINTENANCE's Add() calls, and the mouse
|
||
page took them too — `bMargins->Add( bSizerRight, 0, wxEXPAND|wxLEFT, 5 )`
|
||
(panel_mouse_settings_base.cpp:335) has no wxTOP at all, so that page was
|
||
pushed 10px down by a border belonging to another sizer. A wx border is a
|
||
property of one Add(), never of a widget class; each page states its own
|
||
below. */
|
||
.ze-pref-buttoncol {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* `bResetStateSizer` (panel_maintenance_base.cpp:43-58):
|
||
|
||
bResetStateSizer->Add( m_clearFileHistory, 0, wxALL|wxEXPAND, 5 );
|
||
bResetStateSizer->Add( 0, 10, 1, wxEXPAND, 5 );
|
||
bResetStateSizer->Add( m_clearDontShowAgain, 0, wxALL|wxEXPAND, 5 );
|
||
bResetStateSizer->Add( m_clearDialogState, 0, wxALL|wxEXPAND, 5 );
|
||
bResetStateSizer->Add( m_resetAll, 0, wxALL|wxEXPAND, 5 );
|
||
margins->Add( bResetStateSizer, 1, wxEXPAND|wxTOP, 10 );
|
||
|
||
The sizer's own wxTOP puts the block 10 below the spin control; each button's
|
||
wxALL adds 5 more above the first, 5 below the last, and 5 either side --
|
||
which is the inset the "3D cache file duration:" label sits 5 to the RIGHT
|
||
of, since its own Add carries a wxLEFT the buttons' does not. */
|
||
.ze-maintenance > .ze-pref-buttoncol {
|
||
/* [data] `wxEXPAND|wxTOP, 10` on bResetStateSizer. */
|
||
margin-top: 10px;
|
||
}
|
||
.ze-maintenance > .ze-pref-buttoncol > button {
|
||
/* [data] the wxALL, 5 every button in the run carries. Two adjoining ones
|
||
make the 10 between any two buttons; there is no container gap. */
|
||
margin: 5px;
|
||
}
|
||
/* `Add( 0, 10, 1, wxEXPAND )` — the one spacer in the run, after the first
|
||
button, on top of the two borders either side of it. Its proportion of 1 also
|
||
lets it absorb slack, which a page this short never has. */
|
||
.ze-maintenance > .ze-pref-buttoncol > button:first-child {
|
||
margin-bottom: 15px; /* [data] the spacer's 10 plus this button's own 5. */
|
||
}
|
||
/* `bSizerRight` (panel_mouse_settings_base.cpp:325-335). The two buttons do NOT
|
||
carry the same flags as each other:
|
||
|
||
bSizerRight->Add( m_mouseDefaults, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||
bSizerRight->Add( m_trackpadDefaults, 0, wxEXPAND|wxALL, 5 );
|
||
|
||
so the run starts flush with the top of the group beside it and the 10
|
||
between them is the first's wxBOTTOM plus the second's wxTOP. `.ze-mouse-
|
||
scroll`'s own gap is bMargins' wxLEFT, so nothing is needed here for it. */
|
||
.ze-mouse-scroll > .ze-pref-buttoncol > button {
|
||
/* [data] wxBOTTOM|wxRIGHT|wxLEFT, 5 — no wxTOP on the first button. */
|
||
margin: 0 5px 5px;
|
||
}
|
||
.ze-mouse-scroll > .ze-pref-buttoncol > button + button {
|
||
/* [data] the second button's flags are wxALL, so it alone has a top border. */
|
||
margin-top: 5px;
|
||
}
|
||
/* `PANEL_SYM_COLOR_SETTINGS`, the whole page
|
||
(`panel_sym_color_settings_base.cpp:16-45`): a radio button, then a row of a
|
||
second radio button and a `wxChoice`. No heading and no `wxStaticLine`, so no
|
||
`.ze-pref-group` — the Drawing Sheet Editor's Colors page is the same shape.
|
||
|
||
p1mainSizer->Add( bMargins, 0, wxTOP, 10 );
|
||
bMargins->Add( m_eeschemaRB, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||
bMargins->Add( bSizer2, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); */
|
||
.ze-sym-colors {
|
||
/* [data] the wxTOP 10 of `Add( bMargins, … )`. */
|
||
padding-top: 10px;
|
||
}
|
||
.ze-sym-colors > .ze-pref-radio {
|
||
/* [data] the wxRIGHT|wxLEFT 5 that first button carries. */
|
||
padding: 0 5px;
|
||
/* [data] and the wxBOTTOM of the same Add(). */
|
||
margin-bottom: 5px;
|
||
}
|
||
/* `bSizer2`, horizontal: the second button and the choice, both
|
||
`wxALIGN_CENTER_VERTICAL`.
|
||
|
||
The choice IS proportion 1 inside `bSizer2` — but `bSizer2`'s own parent is
|
||
added at proportion 0 with NO wxEXPAND:
|
||
|
||
p1mainSizer->Add( bMargins, 0, wxTOP, 10 );
|
||
…
|
||
p1mainSizer->Fit( this );
|
||
(`panel_sym_color_settings_base.cpp:38-46`)
|
||
|
||
so `bMargins` is only as wide as its content and there is no spare width for
|
||
that proportion to claim. The row is CONTENT width, not panel width, and the
|
||
choice's own width is the `SetMinSize( minwidth + 50 )` the panel computes
|
||
from the widest theme name. Stretching it across the panel — which `flex: 1`
|
||
here did — is the drift a proportion read without its parent produces. */
|
||
.ze-sym-colors-row {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [data] the wxTOP|wxBOTTOM 5 of that Add(). */
|
||
margin: 5px 0;
|
||
/* `Fit()`: the sizer takes its minimum, so the row does not fill the page. */
|
||
width: max-content;
|
||
}
|
||
.ze-sym-colors-row > .ze-pref-radio {
|
||
/* [data] the wxRIGHT|wxLEFT 5 on `m_themeRB`. */
|
||
padding: 0 5px;
|
||
}
|
||
.ze-sym-colors-row > .ze-combo {
|
||
/* [data] the wxRIGHT 5 of `bSizer2->Add( m_themes, 1, … )`. The WIDTH is not
|
||
here: it is the panel's own `SetMinSize( minwidth + 50 )`, measured from
|
||
the theme names, and arrives as an inline min-width. */
|
||
margin-right: 5px;
|
||
}
|
||
/* `gbSizer1` on `PANEL_SYM_EDITING_OPTIONS`
|
||
(`panel_sym_editing_options_base.cpp:33-36`), the one grid-bag sizer in these
|
||
pages whose vertical gap is not the 5 every other group carries:
|
||
|
||
gbSizer1 = new wxGridBagSizer( 2, 0 );
|
||
gbSizer1->SetEmptyCellSize( wxSize( -1, 8 ) );
|
||
|
||
A wrapper rather than per-row classes, because the gap belongs to the SIZER
|
||
and the borders belong to each Add(): the rows still carry their own
|
||
`ze-border-top`, and this is what sits between them. */
|
||
.ze-sym-gbsizer {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.ze-sym-gbsizer > * {
|
||
/* [data] the 2 of `wxGridBagSizer( 2, 0 )`. */
|
||
margin-bottom: 2px;
|
||
}
|
||
/* `wxTOP, 5` on the Default text size row's three cells. */
|
||
.ze-sym-gbsizer > .ze-border-top {
|
||
margin-top: 5px; /* [data] */
|
||
}
|
||
/* `m_widthHelpText`, added `wxBOTTOM|wxLEFT, 5`. */
|
||
.ze-sym-gbsizer > .ze-pref-infotext {
|
||
/* [data] the wxLEFT and wxBOTTOM of that Add(); the vgap above it stands. */
|
||
margin: 0 0 5px 5px;
|
||
}
|
||
/* Row 3 of that sizer is left unfilled, so it is `SetEmptyCellSize`'s height
|
||
and nothing else. */
|
||
.ze-sym-gb-empty {
|
||
height: 8px; /* [data] the 8 of `SetEmptyCellSize( wxSize( -1, 8 ) )`. */
|
||
margin-bottom: 0;
|
||
}
|
||
/* `KIUI::GetInfoFont( this ).Italic()` (`panel_sym_editing_options.cpp:51`),
|
||
which is `getGUIFont( aWindow, -1 )` — the GUI font ONE point down, where
|
||
`.ze-pref-hint` above is `GetSmallInfoFont`'s two. Two different calls, so
|
||
two different sizes; `--ui-font-size-info` was declared for exactly this and
|
||
this is its first consumer. No `SetForegroundColour` anywhere near it, so no
|
||
colour here either. */
|
||
.ze-pref-infotext {
|
||
font-size: var(--ui-font-size-info);
|
||
font-style: italic;
|
||
}
|
||
/* `m_hint1` / `m_hint2`, the two-line note under Left Click Mouse Commands:
|
||
`KIUI::GetSmallInfoFont( this ).Italic()` (`panel_eeschema_editing_options.cpp:79`),
|
||
which is `getGUIFont( aWindow, -2 )` — the GUI font two points down — and no
|
||
`SetForegroundColour` anywhere near it. This said #9aa0a6, a shade nothing in
|
||
the theme names, at the full size and upright. */
|
||
.ze-pref-hint {
|
||
font-size: var(--ui-font-size-small);
|
||
font-style: italic;
|
||
margin-bottom: 4px;
|
||
}
|
||
.ze-pref-mouse {
|
||
border-collapse: collapse;
|
||
}
|
||
.ze-pref-mouse td {
|
||
padding: 3px 12px 3px 0;
|
||
}
|
||
/* No colour. Every cell of `fgSizerCmdsWinLin` is a plain `wxStaticText`
|
||
(`panel_eeschema_editing_options_base.cpp:164-190`) in the dialog's own
|
||
foreground; this dimmed the whole first column. */
|
||
.ze-pref-mouse td:first-child {
|
||
white-space: nowrap;
|
||
}
|
||
/* ---- Drawing Sheet Editor properties panel (PROPERTIES_FRAME) ----
|
||
|
||
DSP-21. Every text size in this block used to be a literal, and all of them
|
||
were too small: measured against real pl_editor 10.0.5 at a matched client
|
||
size, our labels were 11 px against KiCad's 14.67 px (-25 %), the field rows
|
||
repeated every 26 px against 37 px, and the notebook tabs were 11 px in
|
||
*Arial* while the rest of the app is system-ui, because a bare <button>
|
||
takes the UA font rather than inheriting.
|
||
|
||
KiCad declares none of these: wx asks GTK, GTK answers out of the theme, and
|
||
`--ui-font-size` is that answer (wxSYS_DEFAULT_GUI_FONT, 11pt = 14.67 px at
|
||
96 dpi — see the token's own comment). So the numbers are gone and the token
|
||
is consumed, which is also why the tabs stop being Arial: `font: inherit`
|
||
carries the shell's family down.
|
||
|
||
The pane WIDTH is not a literal here either. `m_PropertiesFrameWidth`
|
||
defaults to 150 (pl_editor_settings.cpp:38), but that is the pane's BestSize
|
||
and `pl_editor_frame.cpp:203` floors it with `.MinSize( GetMinSize() )` —
|
||
wxAUI opens at whichever is larger, so the real opening width is the panel's
|
||
own content. DrawingSheetEditor measures that content (scrollWidth, the
|
||
browser's GetMinSize) and opens there; it comes out at 274 px on this theme.
|
||
Reading 150 off the settings table alone reproduced a defect: the value
|
||
column, the vertical-justify buttons and the text-colour swatch were all
|
||
clipped until the sash was dragged out. */
|
||
/* wxNotebook's tab strip. Two launchers draw one - pl_editor's properties
|
||
pane and GerbView's LAYER_WIDGET (`layer_widget.cpp:505`) - so it is one rule
|
||
with two selectors rather than a second copy under a second name. */
|
||
.ze-ds-tabs,
|
||
.ze-nb-tabs {
|
||
display: flex;
|
||
border-bottom: 1px solid var(--chrome-border, rgba(128, 128, 128, 0.35));
|
||
flex: 0 0 auto;
|
||
/* [px] A GtkNotebook does not stretch its tabs; it lays them out from the
|
||
left at their label width, and the strip keeps a lead-in before the first
|
||
one and a gap between them. Measured off a Gtk.OffscreenWindow rendering a
|
||
real two-tab Yaru-dark notebook at Ubuntu Sans 11 (the theme and font were
|
||
printed to confirm env -i had not swapped in Cantarell): the selected tab's
|
||
3 px accent runs x=9..74, and Gtk reports the "Layers" label allocated at
|
||
x=21 w=42 and "Items" at x=95 w=37. That fixes the lead-in at 8 and the
|
||
inter-tab gap at 8, with 12 px either side of each label. A live GerbView
|
||
layers pane agrees: the accent there runs 8..73 px inside the notebook. */
|
||
padding-left: 8px;
|
||
gap: 8px;
|
||
}
|
||
/* The strip is --tab-strip-height, and that has to be SAID: with only the
|
||
padding stated, the height came out as whatever line box the label made -
|
||
[px] 38 against KiCad's 36 on the Appearance pane, which pushed the whole
|
||
notebook down two pixels. `qa/probes/appearance_row_probe.cpp` puts a real
|
||
wxNotebook's first page at y=38 inside the control, which is 1px of frame,
|
||
36 of strip and the 1px line under it.
|
||
|
||
border-box, so the arithmetic in the comment below is the rule: 8 + 17 + 8 +
|
||
the 3px marker = 36. */
|
||
.ze-ds-tabs button,
|
||
.ze-nb-tabs button {
|
||
box-sizing: border-box;
|
||
height: var(--tab-strip-height);
|
||
/* Not `flex: 1`. That split the strip evenly between the tabs and centred
|
||
each label, which is why ours read as two half-width buttons where KiCad
|
||
shows two small tabs tucked against the left edge. */
|
||
flex: 0 0 auto;
|
||
/* The wxNotebook tab strip is --tab-strip-height. [px] re-measured on this
|
||
launcher's own capture (ziro-dsp/shots/k_tab.png, a 3.2x crop of a real
|
||
pane): the strip runs y189..300, i.e. 35 px, against the token's 36 — the
|
||
same widget, so the token stands. 17 px of label + 8 px above and below +
|
||
the 3 px marker = 36. Ours was 24 px, from a 6 px pad and an invented 2 px
|
||
marker. The horizontal half is --tab-pad-x, which sat in the token block
|
||
unused while this rule wrote 4 px. */
|
||
padding: 8px var(--tab-pad-x);
|
||
font: inherit;
|
||
font-size: var(--ui-font-size);
|
||
background: none;
|
||
border: none;
|
||
border-bottom: var(--tab-underline) solid transparent;
|
||
color: inherit;
|
||
cursor: default;
|
||
}
|
||
/* A disabled page's tab — `m_pinTablePage->Disable()` when the part has
|
||
multiple body styles (dialog_symbol_properties.cpp:352-360). GTK draws an
|
||
insensitive label in wxSYS_COLOUR_GRAYTEXT, which is --ctl-fg-disabled. */
|
||
.ze-ds-tabs button:disabled,
|
||
.ze-nb-tabs button:disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
.ze-ds-tabs button.active,
|
||
.ze-nb-tabs button.active {
|
||
/* [px] the selected tab's marker sampled off the same capture: a solid band
|
||
of rgb(238, 84, 31) — the desktop accent, which is --chrome-active
|
||
(#e95420). Ours was #4aa3ff, a blue that appears nowhere in the GTK theme
|
||
and is the single loudest thing on this pane.
|
||
[css] notebook > header.top > tabs > tab:checked { box-shadow: inset 0 -3px }
|
||
in $selected_bg_color, which is where the 3 px in --tab-underline came
|
||
from. */
|
||
border-bottom-color: var(--chrome-active);
|
||
/* No weight change. Asked of Gtk directly on the notebook above: the style
|
||
context of the SELECTED tab's label reports weight 400, the same as the
|
||
unselected one. The 600 here was ours. */
|
||
}
|
||
.ze-ds-group {
|
||
/* A GTK frame's border is wxSYS_COLOUR_BTNSHADOW and square. Sampled off the
|
||
live pl_editor capture, the Position box's own frame is rgb(24,24,24) at
|
||
x=1604 and x=1914 - which is --ctl-border, the token that already holds
|
||
that system colour. It was --chrome-border (#1e1e1e) with a 3 px radius,
|
||
neither of which GTK draws here. */
|
||
border: 1px solid var(--ctl-border);
|
||
margin: 6px 6px;
|
||
padding: 2px 4px 4px;
|
||
}
|
||
.ze-ds-group legend {
|
||
/* A wxStaticBox label is the ordinary control font, not an info font. */
|
||
font-size: var(--ui-font-size);
|
||
padding: 0 4px;
|
||
/* No dimming either. The 0.8 that was here was the same guess the four
|
||
`color` literals on the other group labels were, in another form - and it
|
||
took the label BELOW --chrome-fg, where a real one inks 241-247. */
|
||
}
|
||
.ze-ds-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
/* Row pitch 37 px, measured off KiCad at 369 -> 406 -> 443 -> 480: a 29 px
|
||
control with wxFormBuilder's 4 px above and below. Ours was 3 px around a
|
||
23 px control, i.e. 26 px. */
|
||
margin: 4px 6px;
|
||
}
|
||
/* A `wxFlexGridSizer( 0, 3, 3, 0 )` with `AddGrowableCol( 1 )` - label, value,
|
||
units, and only the value column grows. Column 0 is therefore sized to the
|
||
widest label in THAT sizer, and each static box has a sizer of its own, so
|
||
Position's column is "From:" wide and Repeat Parameters' is "Step text:"
|
||
wide. Rows are `display: contents` so their three children land in the
|
||
grid's own tracks; a per-row flexbox cannot line columns up ACROSS rows,
|
||
which is why the label had a hardcoded 118 px standing in for the alignment
|
||
this gives - a width neither wx nor GTK ever computes, and half the pane. */
|
||
.ze-ds-grid {
|
||
display: grid;
|
||
grid-template-columns: auto 1fr auto;
|
||
align-items: center;
|
||
/* [data] the sizer's own vgap, from wxFormBuilder's generated call:
|
||
`wxFlexGridSizer( 0, 3, 3, 0 )` is (rows, cols, vgap, hgap)
|
||
(properties_frame_base.cpp:241, :293, :392), so 3 down and 0 across - the
|
||
horizontal spacing is the per-cell borders below, not a gap. */
|
||
row-gap: 3px;
|
||
}
|
||
/* A row is a `subgrid` and not `display: contents`, because a row does not
|
||
always have three controls: `Count:` and `Step text:` are a label and a
|
||
field with nothing after them, and upstream pads each with an explicit empty
|
||
cell (`fgSizer8->Add( 0, 0, 1, wxEXPAND, 5 )`, properties_frame_base.cpp:405,
|
||
:415) so the next label still starts a fresh row. Flowed into the parent
|
||
grid instead, a two-control row leaves column 3 free and the following
|
||
label lands IN it - which is what put "Step X:" beside Count's field and
|
||
pushed its own field onto the line below. A subgrid row consumes all three
|
||
tracks whether or not it fills them, which is the empty cell's whole job. */
|
||
.ze-ds-grid .ze-ds-row {
|
||
display: grid;
|
||
grid-column: 1 / -1;
|
||
grid-template-columns: subgrid;
|
||
align-items: center;
|
||
/* The cells carry their own borders (see `.ze-ds-label`); the row has none,
|
||
and the static box's padding is the inset. */
|
||
margin: 0;
|
||
gap: 0;
|
||
}
|
||
/* The same grid with no static box around it: `gbSizer1` (Line width,
|
||
Rotation, Bitmap DPI) is added straight to the page sizer, so it carries the
|
||
inset a static box would otherwise have given it. */
|
||
.ze-ds-grid.bare {
|
||
/* [data] the two borders wxFormBuilder writes around it, added per edge:
|
||
`sizerMisc->Add( gbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT, 3 )` and
|
||
`m_SizerItemProperties->Add( sizerMisc, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 2 )`
|
||
(properties_frame_base.cpp:385, :388) - top 3, right 3+2, bottom 2,
|
||
left 2. */
|
||
margin: 3px 5px 2px 2px;
|
||
}
|
||
.ze-ds-label {
|
||
font-size: var(--ui-font-size);
|
||
flex: 0 0 auto;
|
||
opacity: 0.85;
|
||
/* [data] `wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3` on every label cell
|
||
(properties_frame_base.cpp:249, :257, :265, ...) - wxFormBuilder's own
|
||
border argument. The value cells beside them pass a border with NO
|
||
direction bit, so wx applies none, which is why the field sits flush
|
||
against the label column. */
|
||
margin-inline: 3px;
|
||
}
|
||
/* `m_staticTextType` — the item's class name. Explicitly wxFONTWEIGHT_NORMAL
|
||
at wxNORMAL_FONT's own point size (properties_frame_base.cpp:31), so it is
|
||
neither bold nor smaller than the labels beside it. */
|
||
.ze-ds-type {
|
||
font-size: var(--ui-font-size);
|
||
flex: 1 1 auto;
|
||
}
|
||
/* `m_syntaxHelpLink`, a wxHyperlinkCtrl in the same row. */
|
||
.ze-ds-syntaxhelp {
|
||
font-size: var(--ui-font-size);
|
||
flex: 0 0 auto;
|
||
}
|
||
/* The Syntax Help dialog's body (PROPERTIES_FRAME's "Predefined Keywords"
|
||
message). An ordinary dialog body, so the ordinary control font. */
|
||
.ze-ds-syntaxhelp-body {
|
||
padding: 8px 14px;
|
||
font-size: var(--ui-font-size);
|
||
line-height: 1.5;
|
||
}
|
||
/* `m_staticTextSizeInfo`, the only control in this panel that is NOT the
|
||
control font: properties_frame.cpp:97 gives it
|
||
`KIUI::GetInfoFont( this ).Italic()`, and GetInfoFont is getGUIFont( win, -1 )
|
||
— one point down, which is --ui-font-size-info. */
|
||
.ze-ds-sizeinfo {
|
||
font-size: var(--ui-font-size-info);
|
||
font-style: italic;
|
||
margin: 0 6px 4px;
|
||
opacity: 0.75;
|
||
}
|
||
/* The Item Properties page is a `wxBoxSizer( wxVERTICAL )` in a
|
||
wxScrolledWindow, and ONE of its children takes the slack: `m_SizerTextOptions`
|
||
goes in with proportion 1 (properties_frame_base.cpp:230) and `m_stcText`
|
||
with proportion 1 inside that (:79). So the text box grows to whatever the
|
||
pane has left, which is why a live pl_editor shows a tall editing area and
|
||
ours showed a three-row textarea with dead space under the last group. */
|
||
.ze-ds-itempage {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 100%;
|
||
}
|
||
.ze-ds-textedit {
|
||
display: block;
|
||
width: calc(100% - 12px);
|
||
margin: 4px 6px;
|
||
resize: vertical;
|
||
font-family: inherit;
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
textarea.ze-ds-textedit {
|
||
/* The proportion-1 child. `min-height` keeps it from collapsing when the
|
||
rest of the page is taller than the pane; `flex-basis: 0` is what makes
|
||
the leftover space its own rather than its content's. */
|
||
flex: 1 1 0;
|
||
min-height: 72px;
|
||
}
|
||
/* `m_staticTextComment` and `m_textCtrlComment` (properties_frame_base.cpp:233-238)
|
||
are added to m_SizerItemProperties as two SIBLINGS, not as a labelled row:
|
||
the label with `wxRIGHT|wxLEFT`, the field under it with
|
||
`wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND`. So the label sits on its own line above a
|
||
full-width field. Ours put it in a `.ze-ds-row`, where the 118 px label
|
||
column squeezed the field to the right of it.
|
||
|
||
This states only the geometry that differs. The font and the dimming still
|
||
come from `.ze-ds-label` above, which the element also carries; restating
|
||
either here is what the central-value rule forbids. The field needs no rule
|
||
at all — `.ze-ds-textedit` is already exactly this box. */
|
||
/* General Options' `wxFlexGridSizer( 0, 2, 0, 0 )` with `AddGrowableCol( 0 )`:
|
||
two grid rows per field, `[label][spacer]` then `[ctrl][units]`, so the
|
||
label is on a line of its own above a field that takes the whole width. A
|
||
plain column of blocks is that, and the field row inside it is an ordinary
|
||
`.ze-ds-row`. */
|
||
.ze-ds-stack {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.ze-ds-stacklabel {
|
||
display: block;
|
||
width: auto;
|
||
/* [px] the same wxFormBuilder border `.ze-ds-row` above measures as 4 px
|
||
vertical, and only above: m_staticTextComment is added with wxRIGHT|wxLEFT,
|
||
so it carries no bottom margin of its own. */
|
||
margin-top: 4px;
|
||
/* [px] the horizontal half of that same measured border, 6 px, as
|
||
`.ze-ds-row` and `.ze-ds-textedit` both already use. */
|
||
margin-inline: 6px;
|
||
margin-bottom: 0;
|
||
}
|
||
/* Every control in a row is the same size as its label, which is what makes a
|
||
GTK row of mixed controls line up. `.ze-search` is `font: inherit`, so this
|
||
is the one place the size has to be said. */
|
||
.ze-ds-row .ze-search,
|
||
.ze-ds-row .ze-combo,
|
||
.ze-ds-row select {
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
/* `formattingSizer`, a `wxBoxSizer( wxHORIZONTAL )` (properties_frame_base.cpp:88).
|
||
A box sizer does not wrap - a pane too narrow for the bar CLIPS it, which is
|
||
what a live pl_editor at its 150 px default does. Wrapping instead broke the
|
||
bar into three ragged rows the moment the buttons took their real size. Each
|
||
button goes in with a border argument carrying no direction bit
|
||
(`wxALIGN_CENTER_VERTICAL, 5`), so wx applies none and there is no gap. */
|
||
.ze-ds-fmtbar {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 0;
|
||
margin: 2px 6px 6px;
|
||
}
|
||
/* BITMAP_BUTTON, built `wxBU_AUTODRAW|wxBORDER_NONE`
|
||
(properties_frame_base.cpp:92-148): it paints itself and has no button face
|
||
at rest, so there is no border, no fill and no padding to draw. */
|
||
.ze-ds-fmt {
|
||
border: none;
|
||
background: none;
|
||
padding: 0;
|
||
/* `.ze-btn` is a GTK push button and carries that button's minimum width.
|
||
A BITMAP_BUTTON is not one - it draws itself - so the floor has to go, or
|
||
it beats the size below and the bar wraps. */
|
||
min-width: 0;
|
||
/* [px] 26 x 26, measured off the live pl_editor capture: the checked
|
||
align-left button's fill runs x=1666..1691 and y=466..491. */
|
||
width: 26px;
|
||
height: 26px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
.ze-ds-fmt > img {
|
||
/* KiCad's bitmaps are square and the button centres them; the size is the
|
||
button's minus BITMAP_BUTTON's own m_padding. */
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
/* `hasFlag( wxCONTROL_CHECKED )`: a 1 px pen of wxSYS_COLOUR_HIGHLIGHT around
|
||
a fill of `highlightColor.ChangeLightness( 40 )` on a dark theme
|
||
(bitmap_button.cpp:304-310). ChangeLightness below 100 blends toward black
|
||
by that percentage - `*c = alpha * *c` - which is exactly what a `color-mix`
|
||
with black is, so the fill is DERIVED from the one highlight token rather
|
||
than restated. It came out `#4aa3ff` at 18 % alpha, a blue nothing in KiCad
|
||
is; a live capture reads rgb(233,84,32) around rgb(93,33,12). */
|
||
.ze-ds-fmt.active {
|
||
border: 1px solid var(--selection-bg);
|
||
background: color-mix(in srgb, var(--selection-bg) 40%, black);
|
||
}
|
||
/* `hasFlag( wxCONTROL_SEPARATOR )` draws one line in wxSYS_COLOUR_GRAYTEXT
|
||
down the FULL height of the button (bitmap_button.cpp:277-282), not a short
|
||
rule: `DrawLine( x/2, 0 -> x/2, GetSize().y )`. */
|
||
.ze-ds-fmtsep {
|
||
width: 1px;
|
||
height: 26px;
|
||
background: var(--ctl-fg-disabled);
|
||
margin: 0 3px;
|
||
}
|
||
|
||
/* ---- COLOR_SWATCH (common/widgets/color_swatch.cpp) ---- */
|
||
.ze-swatch {
|
||
/* SWATCH_SIZE_MEDIUM_DU (24, 10) dialog units, measured through a real
|
||
wxPanel as 48 x 23 - the tokens hold that. */
|
||
width: var(--swatch-medium-w);
|
||
height: var(--swatch-medium-h);
|
||
flex: 0 0 auto;
|
||
display: block;
|
||
/* NO border. `RenderToDC` opens with `aDC->SetPen( *wxTRANSPARENT_PEN )`
|
||
(color_swatch.cpp:72) and `COLOR_SWATCH` is a plain `wxPanel( aParent,
|
||
aID )` (`:152`) — no wxBORDER_SIMPLE anywhere in it. This carried a 1px
|
||
--chrome-fg frame on a reading of a pl_editor capture that had to be
|
||
something else: in a live 10.0.5 Preferences > Colors the swatch is a
|
||
flat 48 x 23 rectangle of colour with the list background rgb(39,39,39)
|
||
touching it on all four sides, sampled row by row. A <button> takes the
|
||
UA's own border unless a rule says otherwise, so saying none is not the
|
||
same as saying nothing. */
|
||
border: none;
|
||
padding: 0;
|
||
}
|
||
/* SWATCH_SIZE_LARGE_DU — the size `addSwatch` builds the colour picker's
|
||
Defined Colors page at (dialog_color_picker.cpp:181-210). */
|
||
.ze-swatch.large {
|
||
width: var(--swatch-large-w);
|
||
height: var(--swatch-large-h);
|
||
}
|
||
/* SWATCH_SIZE_SMALL — `SWATCH_SMALL` at color_swatch.cpp:167. The layer rows
|
||
already take these two tokens through `.ze-layer-swatch`; this is the same
|
||
pair reached through COLOR_SWATCH's own size argument. */
|
||
.ze-swatch.small {
|
||
width: var(--swatch-small-w);
|
||
height: var(--swatch-small-h);
|
||
}
|
||
.ze-swatch > input[type="color"] {
|
||
/* The picker still opens on a click; only its own rendering is suppressed,
|
||
so what shows through is the swatch drawn above. */
|
||
opacity: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
padding: 0;
|
||
border: none;
|
||
display: block;
|
||
}
|
||
/* COLOR4D::UNSPECIFIED: `RenderToDC` fills the rect with a checkerboard rather
|
||
than a colour (color_swatch.cpp:78-133). On a dark parent it takes the
|
||
`else` branch - `black = COLOR4D::BLACK` and `white = black.Brightened( 0.15 )`,
|
||
which is 15 % white over black - and UNSPECIFIED's own alpha is 0, so the
|
||
foreground blends to nothing and the two squares are all that is left. A
|
||
live capture reads rgb(0,0,0) against rgb(38,38,38), which is that pair. */
|
||
/* `RenderToDC` blends the colour over the checkerboard squares at its own
|
||
alpha (`wxColor::AlphaBlend( fg, bg, alpha )`, color_swatch.cpp:118-124), so
|
||
a half-transparent colour is a TINTED checkerboard, not one or the other.
|
||
The checkerboard is therefore always underneath and the colour is painted on
|
||
top at whatever alpha it has - which reaches pure checkerboard at 0 and a
|
||
flat colour at 1 without either being a special case. */
|
||
.ze-swatch.unspecified {
|
||
/* [data] CHECKERBOARD_SIZE_DU is (3, 3) (color_swatch.h:49); through the same
|
||
dialog-unit conversion as the swatch above that is 6 x 7 px, and the live
|
||
capture's squares are 6 across and 7 down. */
|
||
--checker-x: 6px;
|
||
--checker-y: 7px;
|
||
/* `--swatch-color` is the foreground, painted OVER the squares at its own
|
||
alpha; unset it and the layer is transparent and the checkerboard shows
|
||
through whole, which is COLOR4D::UNSPECIFIED. */
|
||
/* The two squares. `RenderToDC` picks them by the brightness of the surface
|
||
the swatch is understood to sit on (`color_swatch.cpp:94-107`): dark, and
|
||
they are `COLOR4D::BLACK` and `black.Brightened( 0.15 )` — the defaults
|
||
here, which every list of ours takes because a list window is --chrome-bg2.
|
||
Bright, and they are that surface and `Darkened( 0.15 )` of it, which only
|
||
the caller knows: `ColorSwatch` sets the pair from its `background` prop.
|
||
A live Colors page's ERC-exclusions swatch reads rgb(204,204,203), which is
|
||
194 at alpha 0.8 over the schematic background rgb(245,244,239) — not over
|
||
black, which is what a fixed dark checkerboard would have given. */
|
||
background-color: var(--checker-lo, black);
|
||
background-image:
|
||
linear-gradient(
|
||
var(--swatch-color, transparent) 0 100%,
|
||
var(--swatch-color, transparent) 0 100%
|
||
),
|
||
conic-gradient(
|
||
var(--checker-hi, color-mix(in srgb, white 15%, black)) 0deg 90deg,
|
||
var(--checker-lo, black) 90deg 180deg,
|
||
var(--checker-hi, color-mix(in srgb, white 15%, black)) 180deg 270deg,
|
||
var(--checker-lo, black) 270deg 360deg
|
||
);
|
||
background-size:
|
||
100% 100%,
|
||
calc(var(--checker-x) * 2) calc(var(--checker-y) * 2);
|
||
}
|
||
|
||
/* ---- UNIT_BINDER's unit static text (common/widgets/unit_binder.cpp) ---- */
|
||
.ze-unit-label {
|
||
/* The word beside a distance field, re-labelled with the frame's unit.
|
||
Shared by every UnitField, so it is scoped to no one editor — and today
|
||
the drawing sheet's properties frame is UnitField's only caller, so
|
||
taking the token here moves nothing else. When another launcher adopts
|
||
UNIT_BINDER this rule is already right for it. */
|
||
font-size: var(--ui-font-size);
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
/* Fixed-width status fields (EDA_DRAW_FRAME::updateStatusBarWidths): the
|
||
invisible template string reserves the pane's widest-case width plus the
|
||
"M" spacer, so live values never reposition their neighbours. */
|
||
.ze-statusbar .cell.sized {
|
||
display: inline-grid;
|
||
padding-right: calc(10px + 1ch);
|
||
}
|
||
.ze-statusbar .cell.sized > .ze-size-template,
|
||
.ze-statusbar .cell.sized > .ze-size-value {
|
||
grid-area: 1 / 1;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-statusbar .cell.sized > .ze-size-template {
|
||
visibility: hidden;
|
||
}
|
||
/* The sign-in progress panel (designer/src/auth/auth_progress.tsx): the same template, so the
|
||
centred form keeps its height whether a stage runs or not. */
|
||
/* The sign-in progress (auth/auth_progress.tsx): the form's last item, with nothing in flow - so
|
||
it is never a hole in the form - and the stage hung from it, below the form, out of flow - so it
|
||
never moves the centred form either. The form's own gap sets it off. */
|
||
.ze-auth-progress {
|
||
position: relative;
|
||
}
|
||
.ze-auth-progress > * {
|
||
position: absolute;
|
||
inset: 0 0 auto;
|
||
}
|
||
|
||
/* wxAuiNotebook tabs (external/wx/aui_notebook_ui.tsx), the library table dialog's tables.
|
||
[drift] The metrics below are not wxAuiGenericTabArt's; measuring them is still to do. */
|
||
.ze-tabbar {
|
||
display: flex;
|
||
gap: 2px;
|
||
border-bottom: 1px solid var(--chrome-border);
|
||
}
|
||
.ze-tabbar .ze-tab {
|
||
padding: 5px 14px;
|
||
font-size: 12.5px;
|
||
color: var(--chrome-fg);
|
||
background: var(--chrome-bg2);
|
||
border: 1px solid var(--chrome-border);
|
||
border-bottom: none;
|
||
border-radius: 4px 4px 0 0;
|
||
cursor: default;
|
||
margin-bottom: -1px;
|
||
}
|
||
.ze-tabbar .ze-tab.active {
|
||
background: var(--chrome-bg);
|
||
border-bottom: 1px solid var(--chrome-bg);
|
||
font-weight: 600;
|
||
}
|
||
/* A tab is its label's button and, on a closable page, the close button: both are the tab's
|
||
own drawing, so neither brings a user-agent face or font. */
|
||
.ze-tabbar .ze-tab {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.ze-tabbar .ze-tab > button {
|
||
font: inherit;
|
||
color: inherit;
|
||
background: none;
|
||
border: 0;
|
||
padding: 0;
|
||
cursor: default;
|
||
}
|
||
|
||
/* "Loading libraries" feedback (library_loading.ts): the hosted set arrives
|
||
over the network, so a chooser says so instead of looking empty. The panel
|
||
is for a pane with nothing in it yet (KiCad shows a progress dialog there);
|
||
the row is for one that already has content. */
|
||
.ze-lib-loading-panel {
|
||
flex: 1;
|
||
min-height: 140px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 10px;
|
||
padding: 24px 16px;
|
||
text-align: center;
|
||
color: var(--chrome-fg);
|
||
}
|
||
.ze-lib-loading-panel .msg {
|
||
font-size: 13.5px;
|
||
}
|
||
.ze-lib-loading-panel .detail {
|
||
font-size: 12px;
|
||
color: var(--ze-muted, #9a9ca0);
|
||
}
|
||
.ze-spinner.big {
|
||
width: 30px;
|
||
height: 30px;
|
||
border-width: 3px;
|
||
}
|
||
|
||
.ze-lib-loading {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 6px 10px;
|
||
font-size: 12px;
|
||
color: var(--ze-muted, #9a9ca0);
|
||
}
|
||
.ze-lib-loading .ze-spinner {
|
||
width: 13px;
|
||
height: 13px;
|
||
border-width: 2px;
|
||
}
|
||
|
||
/* EDA_REORDERABLE_LIST_DIALOG (the tree header's "Select Columns..."): an
|
||
Available list, > / < between it and the Enabled list, then Move up/down. */
|
||
/* No width: a checklist of column names, sized by the longest of them. */
|
||
.ze-modal.ze-select-columns {
|
||
max-width: 92vw;
|
||
}
|
||
.ze-modal-body.ze-reorderable {
|
||
display: flex;
|
||
align-items: stretch;
|
||
gap: 10px;
|
||
padding: 12px;
|
||
}
|
||
.ze-reorderable-col {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.ze-reorderable-col.wide {
|
||
flex: 3;
|
||
}
|
||
.ze-reorderable-col label {
|
||
font-size: 12px;
|
||
color: var(--chrome-fg2, #9a9ca0);
|
||
}
|
||
.ze-reorderable-list {
|
||
flex: 1;
|
||
min-height: 160px;
|
||
overflow: auto;
|
||
background: var(--chrome-bg2);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 3px;
|
||
}
|
||
.ze-reorderable-list .row {
|
||
padding: 3px 8px;
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.ze-reorderable-list .row:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-reorderable-list .row.active {
|
||
background: var(--chrome-active);
|
||
color: #fff;
|
||
}
|
||
.ze-reorderable-buttons {
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
gap: 10px;
|
||
}
|
||
.ze-reorderable-buttons .ze-btn {
|
||
width: 28px;
|
||
padding: 4px 0;
|
||
text-align: center;
|
||
}
|
||
|
||
/* Text Box Properties (pcbnew/dialogs/dialog_textbox_properties_base.cpp).
|
||
|
||
`bMainSizer` is vertical and has no group boxes: `m_MultiLineSizer` (the
|
||
"Text:" label, the Scintilla control, and the "Syntax help" link the .cpp
|
||
appends to it at `:90`), then ONE `wxGridBagSizer`, then the standard
|
||
buttons. Every margin below is a per-`Add()` border out of that file: wx has
|
||
no uniform gap between siblings, so this has none either — a container `gap`
|
||
here would be a number nobody upstream wrote. */
|
||
.ze-textboxprops-body {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
/* `m_imageSizer`, proportion 1, holding PANEL_IMAGE_EDITOR whose `bSizerLeft`
|
||
is horizontal: the preview panel, then the panel's own gridbag. */
|
||
.ze-imgedit {
|
||
display: flex;
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
}
|
||
/* `m_panelDraw->SetMinSize( wxSize( 300,300 ) )`
|
||
(`panel_image_editor_base.cpp:24`), proportion 1, `wxBORDER_SIMPLE`.
|
||
[data] its `wxEXPAND|wxALL, 5`. */
|
||
.ze-imgedit-preview {
|
||
flex: 1 1 auto;
|
||
min-width: 300px;
|
||
/* [data] the same `SetMinSize( wxSize( 300,300 ) )`. */
|
||
min-height: 300px;
|
||
/* [data] that Add()'s `wxALL, 5`. */
|
||
margin: 5px;
|
||
border: 1px solid var(--chrome-border);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
overflow: hidden;
|
||
}
|
||
.ze-imgedit-preview > img {
|
||
max-width: 100%;
|
||
max-height: 100%;
|
||
}
|
||
/* `gbSizer1 = new wxGridBagSizer( 5, 5 )` in that panel, `AddGrowableCol( 1 )`,
|
||
added proportion 0 so it takes its own width and the preview takes the rest.
|
||
[data] its `wxEXPAND|wxALL, 10`. */
|
||
.ze-imgedit-grid {
|
||
display: grid;
|
||
grid-template-columns: max-content 1fr;
|
||
align-items: center;
|
||
gap: 5px; /* [data] `wxGridBagSizer( 5, 5 )`. */
|
||
align-content: start;
|
||
/* [data] that Add()'s `wxALL, 10`. */
|
||
margin: 10px;
|
||
}
|
||
.ze-imgedit-scale {
|
||
height: var(--ctl-height);
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
}
|
||
/* A wxStaticText, not a field: `SetLabel` once at construction. */
|
||
.ze-imgedit-ppi {
|
||
white-space: nowrap;
|
||
}
|
||
/* `m_buttonGrey` at wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxEXPAND: rows 2
|
||
and 3 are empty, and a wxGridBagSizer still puts its 5 px gap between them,
|
||
as the grid's implicit rows do here. */
|
||
.ze-imgedit-grey {
|
||
grid-row: 5;
|
||
grid-column: 1 / span 2;
|
||
}
|
||
|
||
.ze-fpprops-tabs {
|
||
padding: 8px 12px 0;
|
||
}
|
||
|
||
/* Read-only strip (a demo, until it is copied). Same skin as WX_INFOBAR, with
|
||
the action on the right; it takes a row above the canvas rather than floating
|
||
over it, which is where KiCad shows "Schematic is read only.". */
|
||
.ze-readonly-infobar {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
/* The icon is drawn at the wxART_BUTTON size hint, which GTK reports as 16x16
|
||
(measured) - the size wxInfoBarGeneric asks the art provider for. */
|
||
.ze-infobar-icon {
|
||
flex: 0 0 auto;
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
/* The sizer's spacer: everything after the message goes to the right edge,
|
||
buttons in order with the close button last. */
|
||
.ze-readonly-infobar .msg {
|
||
margin-right: auto;
|
||
}
|
||
/* `AddCloseButton()` is a wxBitmapButton, so it is the glyph and nothing else -
|
||
no frame, no fill, unlike the ordinary buttons beside it. */
|
||
.ze-infobar-close {
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 2px;
|
||
background: none;
|
||
border: 0;
|
||
border-radius: 3px;
|
||
cursor: default;
|
||
}
|
||
.ze-infobar-close img {
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
.ze-infobar-close:hover {
|
||
background: rgba(255, 255, 255, 0.1);
|
||
}
|
||
|
||
/* `AddButton()` puts a plain wxButton in the bar, so it is the theme's button
|
||
rather than a tint of the strip it sits on.
|
||
|
||
`:not(.ze-infobar-close)` because the close button is a wxBitmapButton and
|
||
must NOT get this frame - and without the exclusion it would, since
|
||
`.ze-readonly-infobar button` is (0,1,1) and beats `.ze-infobar-close` at
|
||
(0,1,0) no matter which is written last. */
|
||
.ze-readonly-infobar button:not(.ze-infobar-close) {
|
||
padding: 3px 12px;
|
||
font: inherit;
|
||
color: #f7f7f7;
|
||
background: var(--chrome-bg2);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 4px;
|
||
cursor: default;
|
||
}
|
||
.ze-readonly-infobar button:hover {
|
||
background: rgba(255, 255, 255, 0.08);
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
EDA_3D_VIEWER_FRAME.
|
||
|
||
Upstream this is a sibling top-level window (a KIWAY_PLAYER parented to the
|
||
PCB frame, so the window manager floats it above pcbnew) sized 1280x720 on
|
||
first run — it is NOT maximised, because m_maximizeByDefault stays false for
|
||
it while pcbnew sets it true (pcbnew/pcb_edit_frame.cpp:215). One browser
|
||
tab has no window manager to delegate that to, so the frame fills the
|
||
viewport and keeps its own chrome instead: menu bar, the single TOP_MAIN
|
||
toolbar (3d-viewer returns std::nullopt for LEFT/RIGHT/TOP_AUX) and the
|
||
5-pane status bar.
|
||
--------------------------------------------------------------------------- */
|
||
.ze-frame-3d {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 50;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: var(--chrome-bg);
|
||
}
|
||
/* The AUI centre of the 3D frame: the canvas pane with the Appearance pane
|
||
docked Right (eda_3d_viewer_frame.cpp:173-178). The same flex row the PCB
|
||
editor's centre is; the dock takes `.ze-rightdock` as there. */
|
||
.ze-frame-3d > .ze-frame-3d-body {
|
||
display: flex;
|
||
flex-direction: row;
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
}
|
||
/* The canvas host must be allowed to shrink inside the flex row, or the
|
||
three.js canvas pushes the status bar off-screen as it grows. */
|
||
.ze-frame-3d .ze-frame-canvas {
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* -----------------------------------------------------------------------------
|
||
LOCAL_HISTORY_PANE (kicad/local_history_pane.cpp), a two-column wxListCtrl in
|
||
report mode:
|
||
|
||
m_list->AppendColumn( _( "Title" ) );
|
||
m_list->AppendColumn( _( "Time" ) );
|
||
m_list->SetColumnWidth( 0, FromDIP( 200 ) );
|
||
m_list->SetColumnWidth( 1, FromDIP( 150 ) );
|
||
-------------------------------------------------------------------------- */
|
||
/* The left dock: both panes of kicad_manager_frame.cpp:236-245, which share a
|
||
direction, a layer and a row, so they stack vertically in Position order —
|
||
ProjectTree (0) above LocalHistory (1) — and share the dock's width. */
|
||
.ze-leftdock {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 0 0 auto;
|
||
min-height: 0;
|
||
}
|
||
/* Two panes sharing a dock row get equal shares of it. Measured off a running
|
||
frame with both shown at 1854x1131: Project Files y95..632 and Local History
|
||
y638..1175 — an even split either side of the sash.
|
||
|
||
That even split IS the dock's default proportion, stated once for every
|
||
docked pane up at `.ze-leftdock .ze-panel`. Only Local History needs saying
|
||
again, because it is a pane of the dock without being one of our
|
||
`.ze-panel`s. Restating it for `.ze-panel` here is what let the polarity bug
|
||
hide: two rules said "grows" and a third, more specific one said "does not",
|
||
so removing either of the first two changed nothing. */
|
||
.ze-leftdock > .ze-lhist {
|
||
flex: 1 1 0;
|
||
min-height: 0;
|
||
}
|
||
/* Both panes carry the dock's own width inline (`panelWidth`), which would
|
||
otherwise outrank the `width: auto` a docked pane gets. */
|
||
.ze-leftdock > .ze-panel,
|
||
.ze-leftdock > .ze-lhist {
|
||
width: auto !important;
|
||
}
|
||
/* The sash AUI draws between two panes sharing a dock row: measured as a 5px
|
||
band of rgb(55,55,55) directly above the Local History caption (y633..637),
|
||
the horizontal twin of .ze-splitter. */
|
||
.ze-hsplitter {
|
||
flex: 0 0 5px;
|
||
height: 5px;
|
||
background: var(--aui-sash);
|
||
cursor: row-resize;
|
||
}
|
||
/* The pane caption's close box: upstream's `.CloseButton( true )`, which only
|
||
Local History carries — the project tree's caption has none. */
|
||
.ze-lhist-caption {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
/* Measured on the real caption: an 11x11 glyph whose right edge sits ~5px in
|
||
from the pane's right edge. Ours inherited the 8pt caption font and came out
|
||
noticeably smaller than that. */
|
||
.ze-pane-close {
|
||
background: none;
|
||
border: none;
|
||
padding: 0;
|
||
margin-right: 1px;
|
||
width: 11px;
|
||
height: 11px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
/* The BOX is 11x11 and the glyph has to fill it. U+22A0 draws about 0.73 em
|
||
of ink, so at 11px it came out 8px wide and read small beside the real
|
||
caption's. --ui-font-size (11pt = 14.67px) puts it at ~11px, which is the
|
||
measured glyph size, and keeps this off a fourth invented chrome size. */
|
||
font-size: var(--ui-font-size);
|
||
line-height: 11px;
|
||
color: inherit;
|
||
cursor: default;
|
||
}
|
||
.ze-pane-close:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-lhist {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
/* A docked pane below the tree, not a full-height column of its own. The
|
||
even split with the tree is set on .ze-leftdock's children above, from a
|
||
measured frame. Still missing: the draggable horizontal sash AUI puts
|
||
between the two panes. */
|
||
background: var(--panel-bg);
|
||
}
|
||
/* The frame belongs to the LIST CONTROL, not to the pane. Measured across the
|
||
real pane at three rows:
|
||
|
||
caption y=645: x=100 goes straight from the gap to rgb(46,46,46) —
|
||
no side rule at all, the caption runs edge to edge
|
||
list header y=668: x=100 and x=494 are rgb(24,24,24)
|
||
list body y=700: same
|
||
|
||
Putting the border on `.ze-lhist` drew it across the caption too, which is
|
||
what made the title bar read as a detached box instead of part of the pane.
|
||
The project tree already had this right: `.ze-panel-header` carries no side
|
||
rule and `.ze-panel-body` carries the frame. Square corners — see the tree. */
|
||
.ze-lhist-head,
|
||
.ze-lhist-list {
|
||
border-left: 1px solid var(--ctl-border);
|
||
border-right: 1px solid var(--ctl-border);
|
||
border-radius: 0;
|
||
}
|
||
/* The fourth side. It used to arrive as `.ze-panel-header`'s `border-bottom`,
|
||
which is the caption's rule and not this control's — the same pixel, owned
|
||
by the wrong widget, and wrong the moment a pane puts anything between the
|
||
caption and its control. */
|
||
.ze-lhist-head {
|
||
border-top: 1px solid var(--ctl-border);
|
||
}
|
||
.ze-lhist-list {
|
||
border-bottom: 1px solid var(--ctl-border);
|
||
}
|
||
.ze-lhist-head,
|
||
.ze-lhist-row {
|
||
display: grid;
|
||
/* The two declared widths, as a ratio so the pane can be resized without the
|
||
Time column being cut off first. */
|
||
grid-template-columns: minmax(0, 200fr) minmax(0, 150fr);
|
||
gap: 8px;
|
||
/* 5px inside the control's 1px frame: measured x=100 border, "Title" ink at
|
||
x=106. */
|
||
padding: 3px 5px;
|
||
font-size: 10pt;
|
||
}
|
||
/* The wxListCtrl's column header. Measured off a running frame (the Local
|
||
History pane, empty, at 1854x1131):
|
||
|
||
header band y656..678, rgb(39,39,39) — the SAME fill as the list body,
|
||
not a darker strip of its own
|
||
rule under y679, rgb(44,44,44) — one hairline, lighter than the
|
||
pane border we were using
|
||
"Title" ink y660..671 (12px), x106..135; "Time" starts at x306, i.e. the
|
||
200px first column of SetColumnWidth( 0, FromDIP( 200 ) )
|
||
|
||
It was drawing a #2c2c2c strip with a #1e1e1e border in semibold — a header
|
||
three ways darker, harder and heavier than the real one. */
|
||
.ze-lhist-head {
|
||
position: sticky;
|
||
top: 0;
|
||
z-index: 1;
|
||
background: var(--panel-bg);
|
||
border-bottom: 1px solid var(--chrome-bg);
|
||
color: var(--chrome-fg);
|
||
font-weight: 400;
|
||
}
|
||
.ze-lhist-list {
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
overflow: auto;
|
||
}
|
||
.ze-lhist-row {
|
||
color: var(--chrome-fg);
|
||
cursor: default;
|
||
}
|
||
.ze-lhist-row .title,
|
||
.ze-lhist-row .time,
|
||
.ze-lhist-head .title,
|
||
.ze-lhist-head .time {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
/* ---------------------------------------------------------------------------
|
||
DIALOG_RESTORE_LOCAL_HISTORY's list, which is the SAME wxListCtrl widget as
|
||
the pane's — same rows, same header, same selection — with three differences
|
||
KiCad states in the constructor
|
||
(common/dialogs/dialog_restore_local_history.cpp:45-49, :89-91) against the
|
||
pane's (kicad/local_history_pane.cpp:42-44):
|
||
|
||
three columns, not two, at FromDIP 170 / 380 / 70
|
||
wxLC_HRULES | wxLC_VRULES, which the pane does not set
|
||
|
||
So it reuses `.ze-lhist-head` / `.ze-lhist-list` / `.ze-lhist-row` and states
|
||
only what actually differs. The alternative — a second list styled from
|
||
scratch — is how the tree ended up with per-editor copies of shared widgets
|
||
before.
|
||
--------------------------------------------------------------------------- */
|
||
.ze-lhist-head.cols3,
|
||
.ze-lhist-row.cols3 {
|
||
/* The three declared widths, as a ratio so the dialog can be resized without
|
||
the Time column being clipped first — the same treatment the pane's two
|
||
already get. */
|
||
grid-template-columns: minmax(0, 170fr) minmax(0, 380fr) minmax(0, 70fr);
|
||
}
|
||
.ze-lhist-row.cols3 .time,
|
||
.ze-lhist-row.cols3 .action,
|
||
.ze-lhist-row.cols3 .count,
|
||
.ze-lhist-head.cols3 .time,
|
||
.ze-lhist-head.cols3 .action,
|
||
.ze-lhist-head.cols3 .count {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
/* wxLC_HRULES: one hairline under each row.
|
||
[UNMEASURED] The generic wxListCtrl draws its rules with a system colour we
|
||
have not sampled, and no capture of this dialog exists yet. This uses the one
|
||
hairline in this control that HAS been measured — the header's rule, taken
|
||
off a running frame at rgb(44,44,44) — so the dialog is at worst internally
|
||
consistent rather than carrying an invented hue. Flagged for a capture. */
|
||
.ze-lhist-list.rules .ze-lhist-row {
|
||
border-bottom: 1px solid var(--chrome-bg);
|
||
}
|
||
/* wxLC_VRULES: the same hairline between columns, carried by each column but
|
||
the last. The gutter is the row's own `gap`, which the rule therefore sits at
|
||
the LEFT edge of rather than the middle of; restating that gap here to centre
|
||
it would be a local copy of a value the row already states, and the rule's
|
||
colour is unmeasured anyway. Both go in the same capture. */
|
||
.ze-lhist-list.rules .ze-lhist-row > span:not(:last-child) {
|
||
border-right: 1px solid var(--chrome-bg);
|
||
}
|
||
.ze-lhist-row:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-lhist-row.selected,
|
||
.ze-lhist-row.selected:hover {
|
||
background: var(--chrome-active);
|
||
color: #fff;
|
||
}
|
||
/* SetItemTextColour( row, wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) )
|
||
for a snapshot whose summary starts "Autosave" - it happened without anyone
|
||
asking, so it reads as background noise until it is wanted. */
|
||
.ze-lhist-row.autosave {
|
||
color: #9a9a9a;
|
||
}
|
||
/* SetItemTextColour( row, wxColour( 80, 120, 200 ) ) for "Backup". A literal in
|
||
the source rather than a system colour, so a literal here. */
|
||
.ze-lhist-row.backup {
|
||
color: rgb(80 120 200);
|
||
}
|
||
.ze-lhist-row.selected.autosave,
|
||
.ze-lhist-row.selected.backup {
|
||
color: #fff;
|
||
}
|
||
.ze-lhist-empty {
|
||
padding: 14px 8px;
|
||
font-size: 10pt;
|
||
color: #9a9a9a;
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
Message dialog (common/confirm.cpp, KICAD_MESSAGE_DIALOG_BASE): the shared
|
||
"Save Changes?" prompt and anything else built from wxMessageDialog.
|
||
|
||
A message dialog sizes itself to its text rather than to a layout, and the
|
||
platform - not the dialog - lays the buttons out: on GTK they are one row
|
||
spanning the full width, separated by hairlines, with the affirmative answer
|
||
last and focused. Hence the full-width row here instead of the usual
|
||
right-aligned .ze-modal-footer. Measured off the real dialog: 614 x 199. */
|
||
/* HTML_MESSAGE_BOX (`common/dialogs/html_message_box.cpp`), whose geometry is
|
||
all in the wxFormBuilder base it derives from:
|
||
|
||
this->SetSizeHints( wxSize( 500, 300 ), wxDefaultSize );
|
||
bMainSizer->SetMinSize( wxSize( 540, 240 ) );
|
||
bMainSizer->Add( m_htmlWindow, 1, wxALL|wxEXPAND, 10 );
|
||
common/dialogs/dialog_display_html_text_base.cpp:14-22
|
||
|
||
The body is a wxHtmlWindow rendering the <ul> that ListSet built, so the
|
||
list marker, indent and inter-item spacing are the HTML renderer's own
|
||
defaults - not values KiCad chose. This states none of them, for the same
|
||
reason: whatever our renderer does with a <ul> is the closest thing to
|
||
whatever wxHtmlWindow does with it. */
|
||
.ze-modal.ze-htmlmsg {
|
||
width: 540px; /* [data] bMainSizer->SetMinSize( wxSize( 540, 240 ) ) */
|
||
min-height: 240px; /* [data] the same line */
|
||
height: auto;
|
||
max-width: 92vw;
|
||
}
|
||
.ze-htmlmsg-body {
|
||
padding: 10px; /* [data] Add( m_htmlWindow, 1, wxALL|wxEXPAND, 10 ) */
|
||
max-height: 60vh;
|
||
overflow-y: auto;
|
||
}
|
||
/* HTML_WINDOW (common/widgets/html_window.tsx). SetPage wraps every page in
|
||
`<body text=WINDOWTEXT bgcolor=WINDOW link=HOTLIGHT>`; those three are
|
||
--view-fg, --chrome-bg2 and --link-fg. The page is set in the dialog's own
|
||
font (`SetStandardFonts( font.GetPointSize(), font.GetFaceName() ... )`). */
|
||
.ze-html-window {
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
overflow: auto;
|
||
/* A wxHtmlWindow's best size is 1 x 1, empty or after 300 long lines
|
||
(qa/probes/html_window_best_size_probe.cpp): its page never sizes the
|
||
dialog, it scrolls inside the slot the sizer gives it. Without this, DRC's
|
||
running report grew the dialog past its frame with every line. */
|
||
contain: size;
|
||
box-sizing: border-box;
|
||
/* [data] wxHtmlWindow's default SetBorders( 10 ). */
|
||
padding: 10px;
|
||
background: var(--chrome-bg2);
|
||
color: var(--view-fg);
|
||
font: inherit;
|
||
font-size: var(--ui-font-size);
|
||
outline: none;
|
||
}
|
||
.ze-html-window a {
|
||
color: var(--link-fg);
|
||
}
|
||
/* wxHW_NO_SELECTION. */
|
||
.ze-html-window.no-select {
|
||
user-select: none;
|
||
}
|
||
|
||
/* DIALOG_ABOUT (common/dialog_about/dialog_about.tsx). Every border below is
|
||
the `Add()` in dialog_about_base.cpp beside it; the sizes are
|
||
`qa/probes/dialog_about_probe.cpp`, the same sizer tree built with
|
||
wxWidgets: client 760 x 514, the notebook 750 x 350 at (5, 115). */
|
||
/* bSizerTitle, added with no border flags, so its 5 is inert. */
|
||
.ze-about-title {
|
||
display: flex;
|
||
flex-direction: row;
|
||
}
|
||
/* The three `Add( 0, 0, 1, wxEXPAND )` spacers. */
|
||
.ze-about-spacer {
|
||
flex: 1 1 0;
|
||
}
|
||
/* Add( m_bitmapApp, 1, wxALIGN_CENTER|wxALL, 5 ). */
|
||
.ze-about-bitmap {
|
||
flex: 1 1 auto;
|
||
margin: 5px; /* [data] wxALL, 5 */
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
/* [px] the frame icon, aParent->GetIcon(): a frame's SetIcons() bundle asked
|
||
for wxDefaultSize answers with its 32 member, because wxSYS_ICON_X is 32
|
||
here (dialog_about_probe, frame-icon). */
|
||
.ze-about-bitmap img {
|
||
width: 32px;
|
||
height: 32px; /* [px] the same 32 */
|
||
}
|
||
/* Add( b_apptitleSizer, 10, wxALL|wxEXPAND, 5 ). */
|
||
.ze-about-apptitle {
|
||
flex: 10 1 auto;
|
||
margin: 5px; /* [data] wxALL, 5 */
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
text-align: center;
|
||
}
|
||
/* m_staticTextAppTitle: Add( .., 0, wxALIGN_CENTER|wxALL, 5 ), and
|
||
[data] SetFont( wxFont( 14, ..., wxFONTWEIGHT_BOLD ) ) - KiCad's own size,
|
||
not the theme's. */
|
||
.ze-about-name {
|
||
margin: 5px; /* [data] wxALL, 5 */
|
||
font-size: 14pt; /* [data] wxFont( 14, ... ) */
|
||
font-weight: 700;
|
||
}
|
||
/* m_staticTextBuildVersion / m_staticTextLibVersion:
|
||
wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5. The lib line carries a "\n". */
|
||
.ze-about-build,
|
||
.ze-about-lib {
|
||
margin: 5px 5px 0; /* [data] wxLEFT|wxRIGHT|wxTOP, 5 */
|
||
white-space: pre-line;
|
||
}
|
||
/* Add( bSizer5, 0, wxEXPAND, 10 ): no side flags, so the 10 is inert. */
|
||
.ze-about-actions {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* Each button: Add( .., 0, wxALL|wxEXPAND, 5 ). */
|
||
.ze-about-actions .ze-btn {
|
||
margin: 5px; /* [data] wxALL, 5 */
|
||
}
|
||
/* Add( m_notebook, 2, wxEXPAND|wxALL, 5 ), SetMinSize( wxSize( 750, 350 ) ). */
|
||
.ze-about-notebook {
|
||
margin: 5px; /* [data] wxALL, 5 */
|
||
/* The dialog states no size: DIALOG_ABOUT Fit()s around this minimum, and
|
||
the probe's client width is 760 = 750 + wxALL 5 either side. */
|
||
width: 750px; /* [data] SetMinSize( wxSize( 750, 350 ) ) */
|
||
min-height: 350px; /* [data] the same line */
|
||
height: 350px; /* [data] the same 350 */
|
||
flex: 0 0 auto;
|
||
}
|
||
/* The tab strip with GtkNotebook's scroll arrows: nine tabs are wider than
|
||
750px, so a scrollable GtkNotebook shows them. */
|
||
.ze-about-tabstrip {
|
||
display: flex;
|
||
flex: 0 0 auto;
|
||
border-bottom: 1px solid var(--chrome-border); /* [css] the notebook frame line, as .ze-nb-tabs */
|
||
}
|
||
.ze-about-tabstrip .ze-nb-tabs {
|
||
flex: 1 1 auto;
|
||
overflow: hidden;
|
||
border-bottom: none;
|
||
}
|
||
/* [px] the probe: with the arrows showing, the first tab's content starts 37px
|
||
inside the notebook where an unscrolled strip puts it at 20 (8 lead-in + 12
|
||
tab padding), so each arrow takes 17. */
|
||
.ze-about-arrow {
|
||
flex: 0 0 17px; /* [px] 37 - 20, above */
|
||
height: var(--tab-strip-height);
|
||
padding: 0;
|
||
border: none;
|
||
background: none;
|
||
color: inherit;
|
||
font: inherit;
|
||
cursor: default;
|
||
}
|
||
.ze-about-arrow:disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* [px] the probe: a tab's 16px image and its label sit 10px apart. */
|
||
.ze-about-tabs button {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 10px; /* [px] the image-to-label gap, above */
|
||
white-space: nowrap;
|
||
}
|
||
.ze-about-tabs button img {
|
||
width: 16px; /* [data] c_iconSize = 16 */
|
||
height: 16px; /* [data] the same 16 */
|
||
}
|
||
.ze-about-body {
|
||
flex: 1 1 auto;
|
||
}
|
||
/* The page: Add( htmlWindow, 1, wxEXPAND, 0 ). */
|
||
.ze-about-page {
|
||
grid-area: 1 / 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
}
|
||
/* bSizerButtons: Add( .., 0, wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ), and the OK
|
||
button in it wxALL 5. */
|
||
.ze-about-buttons {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
margin: 0 5px; /* [data] wxRIGHT|wxLEFT, 5 */
|
||
}
|
||
.ze-about-buttons .ze-btn {
|
||
margin: 5px; /* [data] wxALL, 5 */
|
||
}
|
||
|
||
/* WX_HTML_REPORT_BOX (common/widgets/wx_html_report_box.tsx): generateHtml's
|
||
invisible `<img align=texttop height=%d width=0>` before every line, the
|
||
height `KiROUND( font.GetPixelSize().y * 0.6 )`. */
|
||
.ze-report-strut {
|
||
display: inline-block;
|
||
width: 0;
|
||
height: 0.6em; /* [data] font.GetPixelSize().y * 0.6 */
|
||
vertical-align: text-top;
|
||
}
|
||
.ze-html-report-box {
|
||
border: 1px solid var(--chrome-border); /* [css] wxBORDER_SIMPLE, as .ze-nb-frame */
|
||
}
|
||
|
||
/* DIALOG_BOOK_REPORTER (common/dialogs/dialog_book_reporter.tsx). Modeless,
|
||
so it floats over the frame rather than on a backdrop. */
|
||
.ze-modal.ze-bookreporter {
|
||
position: absolute;
|
||
top: 60px; /* [px] where the board editor has always put its inspector */
|
||
left: 80px; /* [px] the same */
|
||
z-index: 40;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.ze-bookreporter-notebook {
|
||
margin: 10px; /* [data] Add( m_notebook, 1, wxEXPAND|wxALL, 10 ) */
|
||
min-width: 550px; /* [data] m_notebook->SetMinSize( wxSize( 550,480 ) ) */
|
||
min-height: 480px; /* [data] the same line */
|
||
}
|
||
.ze-bookreporter-body {
|
||
flex: 1 1 auto;
|
||
}
|
||
.ze-bookreporter-page {
|
||
grid-area: 1 / 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
padding: 5px; /* [data] sizer->Add( reporter, 1, wxEXPAND | wxALL, 5 ) */
|
||
}
|
||
/* An AddBlankPage panel: each widget carries its own sizer border instead. */
|
||
.ze-bookreporter-page.blank {
|
||
padding: 0;
|
||
}
|
||
.ze-bookreporter-label {
|
||
margin: 5px 5px 0; /* [data] vbox->Add( layerLabel, 0, wxLEFT | wxRIGHT | wxTOP, 5 ) */
|
||
}
|
||
.ze-bookreporter-choice {
|
||
margin: 5px; /* [data] vbox->Add( choice, 0, wxEXPAND | wxALL, 5 ) */
|
||
}
|
||
.ze-bookreporter-report {
|
||
flex: 1 1 auto; /* [data] vbox->Add( reportBox, 1, wxEXPAND | wxALL, 5 ) */
|
||
display: flex;
|
||
flex-direction: column;
|
||
margin: 5px; /* [data] the same line */
|
||
}
|
||
|
||
/* wxStaticBox / wxStaticBoxSizer, once. `qa/probes/staticbox_inset_probe.cpp`
|
||
asks wx: GetBordersForSizer reports 18 px on top (the label line) and 0 on
|
||
every other side, the child sits flush inside, and the theme paints a 1 px
|
||
frame in rgb(24, 24, 24) - the borders colour, --ctl-border - down both
|
||
sides and along the bottom, with the top edge running behind the label, which
|
||
starts at the frame's own left edge and is not bold. A fieldset and its
|
||
legend are that shape. Dialogs used to restate a padding and border each. */
|
||
/* ---------------------------------------------------------------------------
|
||
The wx sizers (external/wx/sizer.tsx), once for every dialog. A dialog states
|
||
its proportions, flags and borders as props from its _base.cpp; nothing
|
||
below is a number, and no dialog adds layout CSS of its own.
|
||
--------------------------------------------------------------------------- */
|
||
.ze-sizer {
|
||
display: flex;
|
||
white-space: nowrap; /* a wxStaticText / wxCheckBox label never wraps */
|
||
}
|
||
.ze-gridsizer {
|
||
display: grid;
|
||
}
|
||
/* An item never shrinks below its minimum; its grow is its proportion (inline). */
|
||
.ze-szi {
|
||
display: flex;
|
||
flex-shrink: 0;
|
||
flex-basis: auto;
|
||
}
|
||
/* A box item fills the slot along the main axis, and a grid item with wxEXPAND its cell. */
|
||
.ze-szi-fill > * {
|
||
flex: 1 0 auto;
|
||
}
|
||
.ze-szspacer {
|
||
flex-shrink: 0;
|
||
}
|
||
/* The dialog's top sizer fills the window under the title bar, and a book page's (wxPanel)
|
||
sizer fills its page: the book sizes every page to itself. Without the pages, DRC's running
|
||
report got 22px of a 369px page and the test steps were never seen. */
|
||
.ze-shim > .ze-sizer,
|
||
.ze-shim > form > .ze-sizer,
|
||
.ze-nb-body > .ze-nb-page > .ze-sizer,
|
||
.ze-simplebook > .ze-simplebook-page > .ze-sizer,
|
||
.ze-wxsplitter-pane > .ze-sizer {
|
||
flex: 1 0 auto;
|
||
}
|
||
/* A dialog whose body is a <form> (Enter submits it, a password manager files its entry): the
|
||
form stands where the top sizer would, filling the window, its sizer filling it and the
|
||
buttons after - a page shorter than the window leaves its space above the buttons, as a
|
||
wxSimplebook's does, not below them. */
|
||
.ze-shim > form {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 0 auto;
|
||
}
|
||
/* wxStaticBoxSizer: the inner sizer flush inside the frame (GetBordersForSizer). */
|
||
fieldset.ze-sbox-sizer {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
fieldset.ze-sbox-sizer > .ze-sizer {
|
||
flex: 1 0 auto;
|
||
}
|
||
|
||
/* wxFilePickerCtrl with wxFLP_USE_TEXTCTRL: the entry takes the width, the button its own. */
|
||
.ze-filepicker {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.ze-filepicker > :first-child {
|
||
flex: 1 0 auto;
|
||
margin-right: 5px; /* [data] wxPickerBase::CreateBase: the entry's Border( wxRIGHT ), wxSizerFlags' default */
|
||
}
|
||
|
||
/* wxStaticText: Enable( false ) is GTK's label:disabled; Wrap( n ) lets it break (its width is
|
||
the n the dialog states, inline). */
|
||
.ze-statictext.disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
.ze-statictext.wrapped {
|
||
white-space: normal;
|
||
}
|
||
/* wxST_ELLIPSIZE_END: GtkLabel's minimum width is then the ellipsis alone, so the sizer may shrink
|
||
it and the text ends in "…". */
|
||
.ze-statictext.ellipsize {
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
/* SetFont( KIUI::GetInfoFont / GetSmallInfoFont ), and .Italic(). */
|
||
.ze-statictext.info {
|
||
font-size: var(--ui-font-size-info);
|
||
}
|
||
/* wxCheckBox SetFont( KIUI::GetInfoFont( this ) ). */
|
||
.ze-check.info {
|
||
font-size: var(--ui-font-size-info);
|
||
}
|
||
.ze-statictext.small-info {
|
||
font-size: var(--ui-font-size-small);
|
||
}
|
||
.ze-statictext.italic {
|
||
font-style: italic;
|
||
}
|
||
/* wxButton's SetMinSize( GetBestSize() ) of another label (controls.tsx Button minSizeLabel): both
|
||
labels share one cell, the other one invisible, so the wider sets the button's width. */
|
||
.ze-btn-minsize {
|
||
display: inline-grid;
|
||
}
|
||
.ze-btn-minsize > * {
|
||
grid-area: 1 / 1;
|
||
}
|
||
.ze-btn-minsize > [aria-hidden] {
|
||
visibility: hidden;
|
||
}
|
||
/* wxRadioBox (external/wx/controls.tsx RadioBox): the buttons in majorDimension columns. */
|
||
.ze-radiobox {
|
||
display: grid;
|
||
}
|
||
/* wxStaticBitmap (external/wx/controls.tsx): Enable( false ) is GTK's insensitive image. */
|
||
.ze-staticbitmap {
|
||
display: block;
|
||
}
|
||
.ze-staticbitmap.disabled {
|
||
filter: var(--bitmap-disabled-filter);
|
||
}
|
||
|
||
fieldset.ze-sbox {
|
||
border: 1px solid var(--ctl-border);
|
||
margin: 0;
|
||
padding: 0; /* [px] GetBordersForSizer: 0 on the sides and bottom */
|
||
min-width: auto;
|
||
}
|
||
fieldset.ze-sbox > legend {
|
||
padding: 0;
|
||
margin: 0;
|
||
font: inherit;
|
||
}
|
||
|
||
/* WX_UNIT_ENTRY_DIALOG / WX_PT_ENTRY_DIALOG (common/dialogs/dialog_unit_entry.tsx)
|
||
and WX_MULTI_ENTRY_DIALOG (dialog_multi_unit_entry.tsx): the same three
|
||
cells, with the same Add() flags in all three. */
|
||
.ze-unitentry-content {
|
||
display: flex;
|
||
align-items: center;
|
||
margin: 0 5px; /* [data] Add( bSizerContent, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ) */
|
||
}
|
||
.ze-unitentry-label {
|
||
margin: 5px 0 5px 5px; /* [data] wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 */
|
||
white-space: nowrap;
|
||
}
|
||
.ze-unitentry-ctrl {
|
||
flex: 1 1 auto;
|
||
margin: 5px; /* [data] Add( m_textCtrl, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ) */
|
||
}
|
||
.ze-unitentry-unit {
|
||
margin: 5px 5px 5px 0; /* [data] wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 */
|
||
white-space: nowrap;
|
||
}
|
||
/* DIALOG_DRAW_LAYERS_SETTINGS (gerbview/dialogs/dialog_draw_layers_settings_ui.tsx),
|
||
from its _base.cpp: every cell Add()ed wxALL 5, the flex grid's value column
|
||
the growable one. */
|
||
.ze-drawlayers-name {
|
||
display: flex; /* [data] bSizer3, wxHORIZONTAL */
|
||
}
|
||
.ze-drawlayers-grid {
|
||
display: grid;
|
||
grid-template-columns: max-content 1fr max-content; /* [data] AddGrowableCol( 1 ) */
|
||
align-items: center;
|
||
}
|
||
.ze-drawlayers-cell {
|
||
margin: 5px; /* [data] wxALL, 5 */
|
||
white-space: nowrap;
|
||
}
|
||
.ze-drawlayers-line {
|
||
height: 1px;
|
||
margin: 5px; /* [data] wxALL|wxEXPAND, 5 */
|
||
background: var(--gtk-separator);
|
||
}
|
||
.ze-drawlayers-scope {
|
||
flex: 0 0 auto; /* [data] proportion 0: .ze-props-group's flex: 1 is a panel's */
|
||
align-self: flex-start;
|
||
margin: 5px; /* [data] Add( m_rbScope, 0, wxALL, 5 ) */
|
||
}
|
||
/* DIALOG_MAP_GERBER_LAYERS_TO_PCB (gerbview/dialogs/dialog_map_gerber_layers_to_pcb_ui.tsx),
|
||
from its _base.cpp and initDialog: every length is a per-Add() border. */
|
||
.ze-mapgbr-upper {
|
||
display: flex; /* [data] sbUpperSizer, wxHORIZONTAL */
|
||
flex: 1 1 auto;
|
||
margin: 5px; /* [data] Add( sbUpperSizer, 1, wxEXPAND|wxALL, 5 ) */
|
||
}
|
||
.ze-mapgbr-selection {
|
||
display: flex; /* [data] bSizerLayerSelection, wxVERTICAL */
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
margin-right: 5px; /* [data] Add( bSizerLayerSelection, 1, wxEXPAND|wxRIGHT, 5 ) */
|
||
}
|
||
.ze-mapgbr-list {
|
||
display: flex; /* [data] m_bSizerLayerList, wxHORIZONTAL, proportion 1 */
|
||
flex: 1 1 auto;
|
||
}
|
||
.ze-mapgbr-indent {
|
||
margin: 0 10px; /* [data] Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 ) */
|
||
}
|
||
.ze-mapgbr-grid {
|
||
display: grid;
|
||
/* [data] wxFlexGridSizer( 16, 4, 0, 0 ): four columns, AddGrowableCol( 1 ) */
|
||
grid-template-columns: max-content 1fr max-content max-content;
|
||
align-items: center; /* [data] wxALIGN_CENTER_VERTICAL on every cell */
|
||
align-content: start;
|
||
flex: 1 1 auto; /* [data] Add( m_flex*ColumnBoxSizer, 1, wxEXPAND, 5 ) */
|
||
}
|
||
.ze-mapgbr-cell {
|
||
margin: 5px; /* [data] wxALL, 5 */
|
||
white-space: nowrap;
|
||
}
|
||
.ze-mapgbr-select {
|
||
margin: 0; /* [data] Add( Button, 0, wxALIGN_CENTER_VERTICAL | wxALL ): border 0 */
|
||
}
|
||
/* The mapped layer's foreground: `*wxBLUE` for "Do not export", and
|
||
`wxColour( 255, 0, 128 )` for a layer that is exported (:172, :242). */
|
||
.ze-mapgbr-layer.blue {
|
||
color: #0000ff; /* [data] wxBLUE */
|
||
}
|
||
.ze-mapgbr-layer.fuchsia {
|
||
color: #ff0080; /* [data] wxColour( 255, 0, 128 ) */
|
||
}
|
||
.ze-mapgbr-vline {
|
||
width: 1px; /* [css] a wxStaticLine is a GtkSeparator: Yaru `separator { min-width: 1px }` */
|
||
margin: 5px; /* [data] Add( m_staticlineSep, 0, wxEXPAND | wxALL, 5 ) */
|
||
background: var(--gtk-separator);
|
||
}
|
||
.ze-mapgbr-right {
|
||
display: flex; /* [data] bRightSizer, wxVERTICAL */
|
||
flex-direction: column;
|
||
margin: 0 5px; /* [data] Add( bRightSizer, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ) */
|
||
}
|
||
.ze-mapgbr-lyrcnt-label {
|
||
margin: 5px 5px 0; /* [data] wxTOP|wxRIGHT|wxLEFT, 5 */
|
||
white-space: nowrap;
|
||
}
|
||
.ze-mapgbr-lyrcnt {
|
||
margin: 0 5px 5px; /* [data] wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 */
|
||
}
|
||
.ze-mapgbr-stretch {
|
||
flex: 1 0 15px; /* [data] Add( 5, 15, 1, wxEXPAND, 5 ) */
|
||
}
|
||
.ze-mapgbr-button {
|
||
margin: 5px; /* [data] wxALL|wxEXPAND, 5 */
|
||
}
|
||
/* SELECT_LAYER_DIALOG (gerbview/dialogs/dialog_select_one_pcb_layer_ui.tsx),
|
||
whose sizers its constructor builds (dialog_select_one_pcb_layer.cpp:147-158). */
|
||
.ze-selectlayer-main {
|
||
display: flex; /* [data] mainSizer, wxHORIZONTAL */
|
||
}
|
||
.ze-selectlayer-box {
|
||
margin: 5px; /* [data] Add( m_layerRadioBox, 1, wxEXPAND | wxALIGN_TOP | wxALL, 5 ) */
|
||
}
|
||
.ze-selectlayer-grid {
|
||
display: grid;
|
||
grid-auto-flow: column; /* [data] wxRA_SPECIFY_ROWS fills each column first */
|
||
column-gap: inherit;
|
||
row-gap: inherit;
|
||
}
|
||
.ze-selectlayer-buttons {
|
||
display: flex; /* [data] buttonsSizer, wxVERTICAL */
|
||
flex-direction: column;
|
||
align-self: flex-end;
|
||
margin: 5px; /* [data] Add( buttonsSizer, 0, wxALIGN_BOTTOM | wxALL, 5 ) */
|
||
}
|
||
.ze-selectlayer-buttons > .ze-btn {
|
||
margin: 5px; /* [data] Add( button, 0, wxGROW | wxALL, 5 ) */
|
||
}
|
||
.ze-multientry-grid {
|
||
display: grid;
|
||
grid-template-columns: max-content 1fr max-content; /* [data] AddGrowableCol( 1 ) */
|
||
align-items: center;
|
||
margin: 0 5px; /* [data] Add( bSizerContent, 1, wxEXPAND | wxRIGHT | wxLEFT, 5 ) */
|
||
}
|
||
.ze-multientry-row {
|
||
display: contents;
|
||
}
|
||
.ze-multientry-ctrl {
|
||
margin: 5px; /* [data] wxALIGN_CENTER_VERTICAL | wxALL | wxEXPAND, 5 */
|
||
}
|
||
.ze-multientry-check {
|
||
grid-column: 1 / span 3;
|
||
margin: 5px; /* [data] wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL | wxALL, 5 */
|
||
}
|
||
|
||
/* DIALOG_EDIT_LIBRARY_TABLES (common/dialogs/dialog_edit_library_tables.tsx):
|
||
InstallPanel's sizer. */
|
||
.ze-libtables-content {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
margin: 5px 5px 0; /* [data] Add( m_contentPanel, 1, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 5 ) */
|
||
min-width: 1000px; /* [data] m_contentPanel->SetMinSize( FromDIP( wxSize( 1000, 600 ) ) ) */
|
||
min-height: 600px; /* [data] the same line */
|
||
gap: 8px; /* [px] the panel's own notebook-to-grid spacing, as before */
|
||
}
|
||
/* The installed panel takes the whole of it: [data] Add( m_contentPanel, 1, wxEXPAND, ... ), and a
|
||
wxPanel's sizer fills the panel. */
|
||
.ze-libtables-content > * {
|
||
flex: 1 1 auto;
|
||
}
|
||
|
||
/* LIB_TABLE_NOTEBOOK (common/lib_table_notebook_panel.tsx), a wxAuiNotebook: one window, its tab
|
||
row at its natural height and the page taking the rest. */
|
||
.ze-libtable-notebook {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
/* [data] Its rows never size the dialog: qa/probes/libtable_fit_probe.cpp has wx keep
|
||
DIALOG_EDIT_LIBRARY_TABLES at 1010 x 649 for 1 row and for 155 (notebook best size
|
||
1555 x 4560), m_contentPanel's 1000 x 600 minimum alone deciding, the grid scrolling. */
|
||
contain: size;
|
||
}
|
||
.ze-libtable-notebook > .ze-tabbar {
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
/* DIALOG_PLUGIN_OPTIONS (common/dialogs/dialog_plugin_options.tsx), each
|
||
border dialog_plugin_options_base.cpp's Add(). */
|
||
.ze-pluginopts-upper {
|
||
display: flex;
|
||
margin: 5px 5px 0; /* [data] Add( m_horizontal_sizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ) */
|
||
}
|
||
.ze-pluginopts-grid {
|
||
flex: 3 1 auto; /* [data] Add( m_grid_sizer, 3, ... ) */
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-width: 400px; /* [data] m_grid_sizer->SetMinSize( wxSize( 400,300 ) ) */
|
||
min-height: 300px; /* [data] the same line */
|
||
margin: 5px 5px 0; /* [data] wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 */
|
||
}
|
||
.ze-pluginopts-gridpane {
|
||
flex: 1 1 auto;
|
||
margin: 5px 5px 0; /* [data] Add( m_grid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ) */
|
||
}
|
||
.ze-pluginopts-btngap {
|
||
width: 20px; /* [data] bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 ) */
|
||
}
|
||
.ze-pluginopts-choices {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
margin: 5px 5px 0; /* [data] Add( m_options_sizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ) */
|
||
}
|
||
.ze-pluginopts-list {
|
||
flex: 3 1 auto; /* [data] Add( m_listbox, 3, wxALL|wxEXPAND, 5 ) */
|
||
margin: 5px; /* [data] the same Add() */
|
||
}
|
||
.ze-pluginopts-choice.selected {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
.ze-pluginopts-append {
|
||
margin: 0 5px 5px; /* [data] wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 */
|
||
}
|
||
.ze-pluginopts-spacer {
|
||
height: 10px; /* [data] Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ): 5 + 5 */
|
||
}
|
||
.ze-pluginopts-html {
|
||
flex: 2 1 auto; /* [data] Add( m_html, 2, wxALL|wxEXPAND, 5 ) */
|
||
margin: 5px; /* [data] the same Add() */
|
||
min-width: 280px; /* [data] m_html->SetMinSize( wxSize( 280,100 ) ) */
|
||
min-height: 100px; /* [data] the same line */
|
||
}
|
||
|
||
/* DIALOG_ASSIGN_NETCLASS (common/dialogs/dialog_assign_netclass.tsx), each
|
||
border dialog_assign_netclass_base.cpp's Add(). */
|
||
.ze-assignnc-upper {
|
||
display: flex;
|
||
align-items: center;
|
||
margin: 5px; /* [data] Add( bUpperSizer, 0, wxEXPAND|wxALL, 5 ) */
|
||
}
|
||
.ze-assignnc-patlabel {
|
||
margin-left: 10px; /* [data] wxALIGN_CENTER_VERTICAL|wxLEFT, 10 */
|
||
}
|
||
.ze-assignnc-pattern {
|
||
flex: 1 1 auto;
|
||
min-width: 240px; /* [data] m_patternCtrl->SetMinSize( wxSize( 240,-1 ) ) */
|
||
margin: 0 5px; /* [data] wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 */
|
||
}
|
||
.ze-assignnc-nclabel {
|
||
margin-left: 30px; /* [data] wxALIGN_CENTER_VERTICAL|wxLEFT, 30 */
|
||
}
|
||
.ze-assignnc-netclass {
|
||
margin: 5px; /* [data] Add( m_netclassCtrl, 0, wxALL, 5 ) */
|
||
}
|
||
.ze-assignnc-lower {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
margin: 0 10px 10px; /* [data] Add( bLowerSizer, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 10 ) */
|
||
}
|
||
.ze-assignnc-matching {
|
||
flex: 2 1 auto;
|
||
min-height: 200px; /* [data] m_matchingNets->SetMinSize( wxSize( -1,200 ) ) */
|
||
margin: 0 5px 5px; /* [data] wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 */
|
||
font-size: var(--ui-font-size-info); /* KIUI::GetInfoFont */
|
||
}
|
||
.ze-assignnc-info {
|
||
margin: 5px 5px 0; /* [data] Add( m_info, 0, wxTOP|wxRIGHT|wxLEFT, 5 ) */
|
||
font-size: var(--ui-font-size-info); /* KIUI::GetInfoFont( this ).Italic() */
|
||
font-style: italic;
|
||
}
|
||
|
||
/* Syntax Help states its own size where the Errors box takes the minimum:
|
||
|
||
dlg->SetMinSize( dlg->ConvertDialogToPixels( wxSize( 320, 320 ) ) );
|
||
dlg->SetDialogSizeInDU( 320, 320 ); (pcb_text.cpp:725-728)
|
||
|
||
Dialog units are a font measurement, so the two axes do not convert alike.
|
||
[px] `wxDialog::ConvertDialogToPixels( wxSize( 320, 320 ) )` reports 720 x 840
|
||
on this machine with this theme (`qa/probes/stc_bestsize_probe.cpp`). */
|
||
.ze-modal.ze-htmlmsg.ze-syntaxhelp {
|
||
width: 720px;
|
||
/* [px] the vertical half of that same `ConvertDialogToPixels( 320, 320 )`. */
|
||
height: 840px;
|
||
max-width: 92vw;
|
||
max-height: 92vh;
|
||
}
|
||
/* The window is what scrolls, not a capped body: this box is given a height
|
||
rather than growing to its content. */
|
||
.ze-modal.ze-htmlmsg.ze-syntaxhelp .ze-htmlmsg-body {
|
||
flex: 1 1 auto;
|
||
max-height: none;
|
||
min-height: 0;
|
||
}
|
||
/* `ConvertMarkdown2Html`'s table, which is what the help text is. wxHtmlWindow
|
||
draws a table with its own cellpadding; ours takes the same 3 and 2 the
|
||
library tree's details table does, for the same reason — they are
|
||
`wxHtmlWindow`'s defaults, not a choice made here. */
|
||
.ze-modal.ze-htmlmsg.ze-syntaxhelp table {
|
||
border-collapse: separate;
|
||
border-spacing: 2px;
|
||
}
|
||
.ze-modal.ze-htmlmsg.ze-syntaxhelp td,
|
||
.ze-modal.ze-htmlmsg.ze-syntaxhelp th {
|
||
/* [data] wxHtmlWindow's own cellpadding, the same 3 the library tree's
|
||
details table takes. */
|
||
padding: 3px;
|
||
text-align: left;
|
||
vertical-align: top;
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
KICAD_MESSAGE_DIALOG (include/confirm.h:50) is wxMessageDialog, and on GTK
|
||
that is not a wxDialog at all: `wxMessageDialog::GTKCreateMsgDialog`
|
||
(src/gtk/msgdlg.cpp) calls `gtk_message_dialog_new` and hands the result to
|
||
`gtk_dialog_run`. So everything below is GtkMessageDialog's own layout under
|
||
Yaru — a CLIENT-SIDE-DECORATED window with no WM title bar, one full-width
|
||
button row, and a label that wraps at 60 characters — and none of it is
|
||
`.ze-modal`'s. That is why this block restates the frame: the shared modal
|
||
is a mutter-framed wxDialog, and this dialog never gets that frame.
|
||
|
||
[px] every number here is read off the built widget by
|
||
`qa/probes/msgdlg_probe.py`, which builds the same GtkMessageDialog wx does
|
||
(same buttons, same title, same secondary text) on this machine's theme and
|
||
prints every child's allocation; its screenshot of the load-repair message
|
||
differs from a running eeschema's by 83 anti-aliasing pixels out of 661x179.
|
||
[css] cites ~/yaru_dark_gtk.css. Window coordinates below have the 10 px
|
||
CSD shadow margin already subtracted; the "614x199" an earlier reading of
|
||
this dialog recorded was the X window INCLUDING that margin.
|
||
|
||
plain message, OK client 641 x 159
|
||
titlebar (0,0 641x30) title label 18 tall, margin 6/6, bold
|
||
image (47,35 48x48) margin 12 each side
|
||
label (137,35 469x54) 3 lines of 18, max-width-chars 60
|
||
button (0,114 641x45) padding 10/14, border-top 1, label 24
|
||
with secondary text primary label gets weight bold + scale 1.2
|
||
(22 px lines); secondary 10 below it, 2 under
|
||
three buttons 594 wide; each button 198, the 2nd and 3rd
|
||
carry a 1 px border-left */
|
||
.ze-modal.ze-msgdlg {
|
||
/* `width: max-content` from .ze-modal: the width is the label's, which is
|
||
its text up to 60 chars — a short message makes a narrow box, exactly as
|
||
GTK's does (pcb_calculator's one-liners come out ~440 wide). */
|
||
height: auto;
|
||
max-width: 92vw;
|
||
/* [css] `messagedialog.csd decoration { border-radius: 12px; box-shadow:
|
||
0 1px 2px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.65) }` (:4534). All
|
||
four corners, unlike the SSD frame's top two; and no border of its own —
|
||
the 1 px ring is the shadow's. */
|
||
border: none;
|
||
border-radius: 12px; /* [css] messagedialog.csd decoration */
|
||
box-shadow:
|
||
0 1px 2px rgba(0, 0, 0, 0.2) /* [css] the same rule */,
|
||
0 0 0 1px rgba(0, 0, 0, 0.65) /* [css] the same rule */;
|
||
overflow: hidden;
|
||
}
|
||
/* The CSD title bar: not `.ze-modal-header` (mutter's 37 px #222 bar), but
|
||
GTK's own `.titlebar` inside the window. [css] `messagedialog .titlebar {
|
||
min-height: 20px; background-color: #2c2c2c; border-style: none }` (:4077)
|
||
over `.titlebar:not(headerbar) { padding: 0 6px; box-shadow: inset 0 1px
|
||
rgba(247,247,247,0.07) }` (:1662) and `.title { padding: 0 12px;
|
||
font-weight: bold }`. [px] the label is 18 tall with a 6 px margin above and
|
||
below, so the bar is 30. */
|
||
.ze-msgdlg-title {
|
||
position: relative; /* the close box's frame (.x) */
|
||
box-sizing: border-box;
|
||
height: 30px; /* [px] title label 18 + 6 + 6 */
|
||
padding: 6px 18px; /* [px] label margin 6; [css] .titlebar 6 + .title 12 */
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: var(--ui-font-size);
|
||
font-weight: 700;
|
||
line-height: var(--ui-line-height);
|
||
background: var(--chrome-bg);
|
||
box-shadow: inset 0 1px rgba(247, 247, 247, 0.07); /* [css] .titlebar:not(headerbar) */
|
||
}
|
||
/* [px] the message box sits at (35,35): 30 of `margin-start/end` plus the
|
||
dialog vbox's 5 px border, 5 under the 30 px title bar; and the button row
|
||
starts 25 px under it. */
|
||
.ze-msgdlg-body {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
padding: 5px 35px 25px; /* [px] box at (35,35), buttons 25 under it */
|
||
}
|
||
/* [px] GtkMessageDialog's image: 48 square (GTK_ICON_SIZE_DIALOG) with a 12 px
|
||
margin either side, and the label column 30 px further on — 137 from the
|
||
client edge. The artwork is the icon theme's `dialog-*-symbolic`, painted in
|
||
the dialog's foreground. */
|
||
.ze-msgdlg-icon {
|
||
flex: 0 0 auto;
|
||
width: 48px; /* [px] image 48x48 */
|
||
height: 48px; /* [px] the same */
|
||
margin: 0 42px 0 12px; /* [px] image at 47, label at 137 */
|
||
color: var(--chrome-fg);
|
||
}
|
||
/* The message area: a vertical box whose labels are `xalign 0.5` and
|
||
`justify left` — each label is as wide as its own text (up to the 60-char
|
||
limit), centred in the column, with its lines ragged-left inside that. A
|
||
short secondary line therefore sits centred under a wide primary, as in
|
||
the "Save Changes?" box. */
|
||
.ze-msgdlg-text {
|
||
flex: 1;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
/* [px] the vbox's spacing between primary and secondary. */
|
||
gap: 10px;
|
||
}
|
||
.ze-msgdlg-message,
|
||
.ze-msgdlg-extended {
|
||
/* [px] `max-width-chars: 60` in Ubuntu Sans 11 — 60 approximate character
|
||
widths — is 469, measured on the label itself. Stated in px because CSS's
|
||
`ch` is the width of "0", which is not Pango's approximate char width. */
|
||
max-width: 469px;
|
||
width: fit-content;
|
||
text-align: left;
|
||
/* A GtkLabel keeps every space it is given: `_( "...fixed. Please..." )`
|
||
shows both. */
|
||
white-space: pre-wrap;
|
||
font-size: var(--ui-font-size);
|
||
line-height: var(--ui-line-height);
|
||
}
|
||
/* [gtk] `gtk_message_dialog_format_secondary_text`: "setting a secondary
|
||
text makes the primary text become bold" — PANGO_WEIGHT_BOLD plus
|
||
PANGO_SCALE_LARGE (1.2), read off the label's attribute list by the probe.
|
||
Without a secondary text the message is the plain dialog face; ours used to
|
||
be bold in both cases. [px] a bold 13.2 pt line is 22. */
|
||
.ze-msgdlg-text:has(.ze-msgdlg-extended) .ze-msgdlg-message {
|
||
font-size: calc(var(--ui-font-size) * 1.2);
|
||
font-weight: 700;
|
||
line-height: 22px; /* [px] 88 tall over 4 lines */
|
||
}
|
||
.ze-msgdlg-extended {
|
||
/* [px] `margin-bottom: 2` on the secondary label. No `color`: the probe
|
||
reads the same #f7f7f7 on both labels, so the grey this used to carry was
|
||
an invention. */
|
||
margin-bottom: 2px;
|
||
}
|
||
/* [css] `messagedialog.csd .dialog-action-area button { padding: 10px 14px;
|
||
border-right-style: none; border-bottom-style: none; border-radius: 0 }`
|
||
(:4089), `button:first-child { border-left-style: none }`, over `button {
|
||
min-height: 24px; border: 1px solid #181818; background-image:
|
||
image(#373737); text-shadow: 0 -1px rgba(0,0,0,0.86) }` (:485). The box is
|
||
homogeneous: every button the same width. [px] 45 tall. */
|
||
.ze-msgdlg-buttons {
|
||
display: flex;
|
||
}
|
||
.ze-msgdlg-buttons .ze-btn {
|
||
flex: 1 1 0;
|
||
height: 45px; /* [px] button 45 tall */
|
||
min-width: 0;
|
||
padding: 10px 14px; /* [css] messagedialog.csd .dialog-action-area button */
|
||
border: none;
|
||
border-top: 1px solid var(--ctl-border);
|
||
border-radius: 0;
|
||
background: var(--ctl-face);
|
||
text-shadow: 0 -1px rgba(0, 0, 0, 0.86); /* [css] button */
|
||
line-height: 24px; /* [px] the button's label is 24 tall */
|
||
}
|
||
.ze-msgdlg-buttons .ze-btn + .ze-btn {
|
||
border-left: 1px solid var(--ctl-border);
|
||
}
|
||
/* [css] `button:hover { background-image: image(#3c3c3c) }` (:515). */
|
||
.ze-msgdlg-buttons .ze-btn:hover:not(:disabled) {
|
||
background: #3c3c3c; /* [css] button:hover */
|
||
}
|
||
/* `SetDefault()` is not a restyle on GTK (see .ze-btn.primary above), and
|
||
here it is not even a class: `gtk_dialog_set_default_response` only says
|
||
which button Enter presses. */
|
||
.ze-msgdlg-buttons .ze-btn.primary {
|
||
background: var(--ctl-face);
|
||
}
|
||
.ze-msgdlg-buttons .ze-btn.primary:hover:not(:disabled) {
|
||
background: #3c3c3c; /* [css] button:hover */
|
||
}
|
||
/* [css] `button { outline: 2px solid rgba(239,134,97,0.7); outline-offset:
|
||
-2px }` (:5816) — drawn only while GTK's focus is VISIBLE, which under
|
||
`gtk-visible-focus = automatic` means after keyboard input. A dialog that
|
||
opens with the OK focused shows no ring (the probe reads
|
||
`has_visible_focus() == False`, and a running eeschema's box has none);
|
||
:focus-visible is the web's same rule. The `.primary:focus` that forced the
|
||
ring on every open was the visible difference from KiCad's box. */
|
||
.ze-msgdlg-buttons .ze-btn:focus {
|
||
outline: none;
|
||
}
|
||
.ze-msgdlg-buttons .ze-btn:focus-visible {
|
||
outline: 2px solid var(--field-focus-border); /* [css] button, :5816 */
|
||
outline-offset: -2px; /* [css] the same rule */
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
KIDIALOG (include/kidialog.h, common/kidialog.cpp) — the message box with a
|
||
"Do not show again" checkbox.
|
||
|
||
It is NOT the dialog above. `KICAD_MESSAGE_DIALOG` is `wxMessageDialog`,
|
||
which on GTK is the platform's own message box; `KIDIALOG` derives from
|
||
`wxRichMessageDialog`, and `wx/richmsgdlg.h` resolves that to
|
||
`wxGenericRichMessageDialog` on every platform but MSW — a plain wxDialog wx
|
||
lays out itself. The two differ in the icon size, in whether there is a
|
||
separator, and in how the buttons are laid out, so this is its own chrome
|
||
rather than an override of `.ze-msgdlg`'s.
|
||
|
||
[px] every number below is read off the built widget by
|
||
`qa/probes/kidialog_probe.cpp`, which shows the real dialog on this machine
|
||
with this theme and walks it from inside its own modal loop (the controls do
|
||
not exist until `ShowModal` — `Fit()` before that asserts "invalid frame").
|
||
Four variants, so each border is a difference rather than a reading:
|
||
|
||
checkbox + extended client 588 x 179 icon(10,10 48x48)
|
||
message(78,10 500x25)
|
||
extended(78,55 462x21)
|
||
checkbox(10,86 158x25)
|
||
line(10,121 568x2)
|
||
buttons y=135 h=34, x=323/414
|
||
extended, no checkbox client 588 x 144 line(10,86), buttons y=100
|
||
checkbox, no extended client 484 x 161 message(78,23 396x21)
|
||
neither client 484 x 126 message(78,23), line(10,68)
|
||
|
||
Which gives: 10 of padding on all four sides, a 48 icon, 20 between icon and
|
||
text, 20 between the two text lines, 10 above and below the checkbox, a 2 px
|
||
rule, 12 under it, and a 34 px button row inset 12 from the right with 6
|
||
between the buttons. */
|
||
.ze-modal.ze-kidialog {
|
||
/* wx does not wrap: a 200-character message measured 1446 px of client on one
|
||
line, so shrink-to-fit IS the rule and there is no width to state. */
|
||
width: max-content;
|
||
/* Ours, and deliberate: wx would happily draw that 1446 px dialog off the
|
||
side of a small screen, and a browser modal has to stay reachable. */
|
||
max-width: 92vw;
|
||
height: auto;
|
||
}
|
||
.ze-kidialog-body {
|
||
display: flex;
|
||
/* [px] the icon sits at y=10 even when the text column is 66 tall, so it is
|
||
top-aligned; the text column is what centres (see below). */
|
||
align-items: flex-start;
|
||
/* [px] the message starts at x=78 and the icon is 48 wide at x=10. */
|
||
gap: 20px;
|
||
/* [px] the icon is at (10,10), and the 10 below the text is carried by the
|
||
checkbox or the rule, not by this row. */
|
||
padding: 10px 10px 0;
|
||
}
|
||
.ze-kidialog-icon {
|
||
flex: 0 0 auto;
|
||
/* [px] 48 square — wxArtProvider's wxART_MESSAGE_BOX size, the same 48 the
|
||
native message box's GTK_ICON_SIZE_DIALOG comes to. */
|
||
width: 48px;
|
||
/* [px] the same reading — `icon(10,10 48x48)`. */
|
||
height: 48px;
|
||
color: var(--chrome-fg);
|
||
}
|
||
/* [px] with no extended message the text is 21 tall and sits at y=23, which is
|
||
10 + (48 - 21) / 2 — centred against the icon. With one it is 66 tall, taller
|
||
than the icon, and centring is then the identity. */
|
||
.ze-kidialog-text {
|
||
flex: 1;
|
||
min-width: 0;
|
||
align-self: center;
|
||
}
|
||
/* [px] 13pt where every other control in this dialog is 11, and bold. wx
|
||
scales and bolds the primary text of a generic message dialog; the ratio is
|
||
written as the two measured sizes rather than a decimal so it stays readable
|
||
as what it is. Stated here rather than shared with `.ze-msgdlg-message`: that
|
||
is the NATIVE message box's heading, measured separately, and the two
|
||
agreeing today is not a reason to tie them together. */
|
||
.ze-kidialog-message {
|
||
font-size: calc(var(--ui-font-size) * 13 / 11);
|
||
font-weight: 700;
|
||
}
|
||
.ze-kidialog-extended {
|
||
/* [px] the message ends at y=35 and the extended message starts at 55. */
|
||
margin-top: 20px;
|
||
/* No `color`. The probe reads the SAME foreground on the message, the
|
||
extended message, the checkbox and both buttons — wx sets none, so the
|
||
extended message is the dialog's own ink. `.ze-msgdlg-extended` dims its
|
||
one, because GTK's native message box really does grey its secondary text;
|
||
copying that grey across to this dialog would have been an invention. */
|
||
}
|
||
/* The checkbox row. It takes `.ze-pref-check` for the box-to-label spacing —
|
||
that is GTK's, the same everywhere, and restating it here is how the two
|
||
would drift — and states only its own Add() border.
|
||
|
||
[px] x=10: the DIALOG's left margin, NOT the text column's 78. A checkbox
|
||
indented under the message is the thing this measurement ruled out. */
|
||
.ze-kidialog-check {
|
||
/* [px] the text ends at y=76 and the checkbox starts at 86. */
|
||
margin: 10px 10px 0;
|
||
}
|
||
/* `wxStaticLine`, which the generic dialog draws above its buttons and the
|
||
native message box has not got at all. */
|
||
.ze-kidialog-line {
|
||
/* [px] `line(10,121 568x2)` — two device pixels, spanning the content width. */
|
||
height: 2px;
|
||
/* [px] 10 below whatever is above it: the checkbox at 111, or, with no
|
||
checkbox, the text at 76 against a rule at 86. */
|
||
margin: 10px 10px 0;
|
||
background: var(--chrome-border);
|
||
}
|
||
.ze-kidialog-buttons {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
/* [px] Cancel ends at 408 and "Place Pin Anyway" starts at 414. */
|
||
gap: 6px;
|
||
/* [px] the rule ends at 123 and the buttons start at 135; they end at 169
|
||
against a client height of 179; and the row stops 12 short of the content's
|
||
right edge where everything else stops 10 short, so 10 + 12. */
|
||
padding: 12px 22px 10px;
|
||
}
|
||
.ze-kidialog-buttons .ze-btn {
|
||
/* [px] both buttons measured 34 tall, which is what `--ctl-height` already
|
||
carries — the token, not a second copy of the number. They are sized to
|
||
their own text: 85 for "Cancel", 152 for "Place Pin Anyway". */
|
||
height: var(--ctl-height);
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
Drawing Sheet Editor (PL_EDITOR_FRAME) chrome.
|
||
|
||
D5/D6 of the drawing-sheet audit, measured off a live pl_editor 10.0.5 at
|
||
1854x1057 against ours at the same client size:
|
||
|
||
surface KiCad ours property
|
||
top toolbar #373737 #2c2c2c background
|
||
left toolbar #373737 #2c2c2c background
|
||
message panel #373737 #2c2c2c background
|
||
menu bar #2c2c2c #2c2c2c background (already right)
|
||
status bar #2c2c2c #2c2c2c background (already right)
|
||
top toolbar 39px 32px height
|
||
right toolbar 39px 32px width
|
||
message panel ~37px 32px height
|
||
|
||
KiCad declares none of this. An ACTION_TOOLBAR and an EDA_MSG_PANEL are
|
||
docked wxAUI panes, so GTK paints them the FRAME background; only the menu
|
||
bar and the status bar get the darker chrome. That frame background is
|
||
already a token here - `--content-bg: #373737` - and it is what the project
|
||
manager's own docked toolbar (`.ze-mgrbar`) sits on, so the two launchers
|
||
now agree. (`--ctl-face` carries the same #373737 from the Yaru stylesheet,
|
||
but that one is the BUTTON face; our toolbar buttons are transparent until
|
||
hovered, and conflating the strip with the face would make a later change to
|
||
either one move the other.)
|
||
|
||
The BACKGROUND half is no longer scoped here. It was, because one editor's
|
||
evidence should not move five, and this block asked for a second frame to
|
||
confirm it. GerbView is that frame: [px] with no file loaded its whole
|
||
toolbar block, both stacked rows and the left vertical strip, samples
|
||
#373737 against #2c2c2c for the menu bar and the status bar - the same three
|
||
readings as pl_editor. So `background` now lives on `.ze-toolbar` itself and
|
||
the override that used to sit here is gone; the strip is right in all eight
|
||
launchers at once.
|
||
|
||
The SIZES stay scoped, because the two frames disagree and a disagreement is
|
||
not a measurement. GerbView reads a 34 px vertical strip (a 30 px button in
|
||
2 px of toolbar, x 66..99 with the button at 68..97) and a 36 px TOP_AUX row
|
||
(a 34 px combo, y 135..168, in a row spanning 135..170) against the 39/39
|
||
recorded above. The likeliest explanation is that 39 counted the pane's
|
||
border and sash and 34 counts the fill, but nobody has re-measured pl_editor
|
||
to say so, so both numbers stay where they were taken.
|
||
--------------------------------------------------------------------------- */
|
||
.ze-wks .ze-toolbar.horizontal {
|
||
height: 39px;
|
||
}
|
||
.ze-wks .ze-toolbar.vertical {
|
||
width: 39px;
|
||
}
|
||
.ze-wks .ze-msgpanel {
|
||
background: var(--content-bg);
|
||
min-height: 37px;
|
||
}
|
||
/* D4. `.ze-select` is `flex: 1` because in a dialog a combo fills its column;
|
||
in a TOOLBAR it must not. wxChoice sizes itself to its content, and
|
||
PL_EDITOR_FRAME::UpdateToolbarControlSizes
|
||
(pagelayout_editor/toolbars_pl_editor.cpp) then pins the origin box to a
|
||
minimum of its WIDEST of the five origin strings:
|
||
|
||
for( int ii = 0; ii < 5; ii++ )
|
||
minwidth = std::max( minwidth, KIUI::GetTextSize( m_originChoiceList[ii], ... ).x );
|
||
m_originSelectBox->SetMinSize( wxSize( minwidth, -1 ) );
|
||
|
||
`width: max-content` is that rule, computed by the layout engine instead of
|
||
by KIUI::GetTextSize - so it stays right if the font changes, which a pasted
|
||
pixel width would not. Measured targets are 214 px for the origin box and
|
||
122 px for the page box, against the 684 px each was stretching to.
|
||
|
||
Height is the shared GTK control height: KiCad's combo, button and text
|
||
field are all one height, which is why a row of mixed controls lines up.
|
||
Measured 34 px against our 23 px, and `--ctl-height` already carries it. */
|
||
/* The two combos beside the top toolbar are the shared `Combo`, which brings its
|
||
own height, padding and face — this only keeps them from stretching in the
|
||
flex strip. Their look is NOT restated here: an earlier local rule of exactly
|
||
this kind is what kept the Image Converter's combo painting the entry
|
||
interior after the shared widget had already been fixed. */
|
||
/* A combo added to a toolbar is a control, not a field: `aToolbar->Add( box )`
|
||
gives it its own best width and the strip does not stretch it. Scoped to the
|
||
toolbar rather than to one launcher, because gerbview's layer selector and
|
||
pl_editor's origin and page choices are the same case. Their LOOK is not
|
||
restated — an earlier local rule of exactly this kind kept the Image
|
||
Converter's combo painting the entry interior after the shared widget had
|
||
already been fixed. */
|
||
.ze-toolbar .ze-combo {
|
||
flex: 0 0 auto;
|
||
width: max-content;
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
wxChoice (ui/Combo.tsx).
|
||
|
||
A native <select>'s option list is drawn by the OS and cannot be themed:
|
||
measured against a real bitmap2component combo, its highlighted row came out
|
||
rgb(153,200,255) — Chrome's own blue — against KiCad's rgb(62,62,62), and its
|
||
popup rgb(44,44,44) against KiCad's rgb(29,29,29) with a rgb(75,75,75) border.
|
||
Those KiCad values are the same #1d1d1d/#4b4b4b the menu drop-downs already
|
||
use, so this reuses that palette rather than naming it twice.
|
||
|
||
Placement: GTK opens the list OVER the closed box with the selected row on
|
||
top of it, so the value does not jump. A native select drops below the box.
|
||
Combo.tsx computes that; the row height here must match its ROW_H. */
|
||
/* The font picker's own minimum. It has to be stated here, on both classes,
|
||
because `.ze-combo` below is declared AFTER `.ze-lp-font` and the two are
|
||
equally specific -- so a `min-width` on `.ze-lp-font` alone silently loses to
|
||
`.ze-combo`'s 121px floor, which is what held our font control at 115px
|
||
against KiCad's 275. Specificity is the trap CLAUDE.md names: the fix is to
|
||
state it once, where it wins, not to restate the value locally. */
|
||
.ze-combo.ze-lp-font {
|
||
/* [px] FONT_CHOICE GetBestSize().x = 275, field_props_width_probe. */
|
||
min-width: 275px;
|
||
}
|
||
.ze-combo {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
/* [px] An EMPTY combo is not sized by its content, and GTK gives it no
|
||
generous default either, and this number was 36px until the caveat that
|
||
came with it was tested. A bare GtkComboBox with a pixbuf+text cell pair
|
||
measures 36 x 34 empty under python-gi — but wxBitmapComboBox is wx's
|
||
wrapper, not that widget, and wx supplies a best size of its own.
|
||
[px] qa/probes/gerbview_toolbar_probe.cpp builds the control GerbView
|
||
builds — empty, wxDefaultSize, as toolbars_gerber.cpp:136-138 does — and
|
||
asks it: best 121 x 34. A capture of the real GerbView agrees, its empty
|
||
selector spanning about 118 px. 34 is --ctl-height, measured a third time.
|
||
Without a floor here, GerbView's layer selector - which is legitimately
|
||
empty until a file is loaded (Resync skips layers with no image,
|
||
gbr_layer_box_selector.cpp:89-90) - collapsed to a bare chevron. */
|
||
min-width: 121px;
|
||
height: var(--ctl-height);
|
||
padding: 0 var(--ctl-pad-x);
|
||
background: var(--ctl-face);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: var(--ctl-radius);
|
||
font: inherit;
|
||
cursor: default;
|
||
text-align: left;
|
||
}
|
||
/* `button` declares only `outline-color: rgba(239, 134, 97, 0.7)`, which is
|
||
GTK3's dashed keyboard-navigation rectangle. :focus-visible is the exact
|
||
web equivalent: it fires for keyboard traversal and not for a mouse click,
|
||
so a clicked combo shows nothing, as KiCad's does. */
|
||
.ze-combo:focus {
|
||
outline: none;
|
||
border-color: var(--ctl-border);
|
||
}
|
||
.ze-combo:focus-visible {
|
||
outline: 1px dashed var(--field-focus-border);
|
||
outline-offset: -3px;
|
||
}
|
||
.ze-combo:disabled {
|
||
background: var(--ctl-face-disabled);
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* GTK paints a choice with an empty model as INSENSITIVE - which is the other
|
||
half of "an empty wxChoice does not open". [px] the Regulators selector on a
|
||
fresh pcb_calculator is rgb(42,42,42), against rgb(55,55,55) for a populated
|
||
one; ours drew both the same. */
|
||
.ze-combo[data-empty] {
|
||
background: var(--ctl-face-disabled);
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
|
||
/* `wxComboBox` (TextCombo): GTK's combobox entry - the entry styled as every
|
||
field is, with the drop-down button joined to its right edge in the choice's
|
||
face. Every value is a token the entry and .ze-combo already use. */
|
||
.ze-textcombo {
|
||
display: inline-flex;
|
||
align-items: stretch;
|
||
/* Its best width, as an entry's (.ze-textctrl): the entry gives up what the button takes. */
|
||
width: var(--ctl-textcombo-width);
|
||
box-sizing: border-box;
|
||
}
|
||
.ze-szi-across > .ze-textcombo {
|
||
min-width: 100%;
|
||
}
|
||
.ze-textcombo > input {
|
||
flex: 1 1 auto;
|
||
width: 0;
|
||
min-width: 0;
|
||
border-top-right-radius: 0;
|
||
border-bottom-right-radius: 0;
|
||
}
|
||
.ze-textcombo-button {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: var(--ctl-height);
|
||
height: var(--ctl-height);
|
||
padding: 0;
|
||
background: var(--ctl-face);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-left: none;
|
||
border-radius: 0 var(--ctl-radius) var(--ctl-radius) 0;
|
||
}
|
||
.ze-textcombo-button:disabled {
|
||
background: var(--ctl-face-disabled);
|
||
}
|
||
|
||
/* A combo in a grid CELL is a RENDERER, not a control.
|
||
*
|
||
* `wxGrid` draws a cell with its `wxGridCellRenderer` and only swaps in the
|
||
* editor while the cell is being edited — and even the editor is built
|
||
* `wxCB_READONLY | … | wxBORDER_NONE` (`pcbnew/grid_layer_box_helpers.cpp:
|
||
* 126-128`), so there is no state in which KiCad frames one. What the user
|
||
* sees is `GRID_CELL_LAYER_RENDERER::Draw` (`:54-101`):
|
||
*
|
||
* wxRect rect = aRect; rect.Inflate( -1 );
|
||
* wxGridCellRenderer::Draw( … ); // erase: the cell
|
||
* // fill, or HIGHLIGHT
|
||
* int size = 14; // the swatch
|
||
* aDC.DrawBitmap( m_bitmap, rect.GetLeft() + 4, … );
|
||
* rect.SetLeft( rect.GetLeft() + m_bitmap.GetWidth() + 8 );
|
||
* SetTextColoursAndFont( aGrid, aAttr, aDC, isSelected );
|
||
* aGrid.DrawTextRectangle( aDC, layerName, rect, wxALIGN_LEFT, wxALIGN_CENTRE );
|
||
*
|
||
* — a swatch and a label on the cell's own background. No border, no fill of
|
||
* its own, and NO ARROW: a `wxChoice`'s chevron belongs to the editor, which
|
||
* is not on screen. Ours drew the full control in the cell, which is what put
|
||
* a dark rounded button with a chevron in the middle of a selected row's
|
||
* orange fill on Preferences > Footprint Editor > Footprint Defaults.
|
||
*
|
||
* Stated here rather than on those two pages because every choice cell in
|
||
* every KiCad grid is this: `wxGrid` is the base, the renderer/editor split is
|
||
* the base's, and a page that restated it would be the per-editor copy
|
||
* CLAUDE.md names. `:disabled` and `[data-empty]` are re-stated because the
|
||
* two rules above fill a box for them, and a read-only cell greys its INK —
|
||
* `SetTextColoursAndFont` reads the attr's colours; it does not paint a
|
||
* disabled control.
|
||
*
|
||
* Direct children throughout: the popup is rendered inside the same `<td>`
|
||
* (it is `position: fixed`, not a portal), and its rows carry
|
||
* `.ze-combo-swatch` too. */
|
||
.ze-grid td > .ze-combo,
|
||
.ze-grid td > .ze-combo:disabled,
|
||
.ze-grid td > .ze-combo[data-empty] {
|
||
width: 100%;
|
||
/* The cell's width is the column's; `min-width: 121px` is `GetBestSize()` for
|
||
a standalone wxBitmapComboBox and has no business in a 150 px column. */
|
||
min-width: 0;
|
||
height: auto;
|
||
border: none;
|
||
border-radius: 0;
|
||
background: transparent;
|
||
/* `SetTextColoursAndFont( …, isSelected )` — HIGHLIGHTTEXT on a selected row,
|
||
which `.ze-grid tr.selected td` already carries. */
|
||
color: inherit;
|
||
/* [data] `rect.Inflate( -1 )` then `rect.GetLeft() + 4`. The vertical is
|
||
ours and matches `.ze-grid td input[type="text"]`, so a row is the same
|
||
height whether its cells hold text or a choice — wx sizes the ROW, not the
|
||
renderer, and the two must agree. */
|
||
padding: 3px 5px;
|
||
/* The 8 below is stated on the swatch, so no gap here. */
|
||
gap: 0;
|
||
}
|
||
.ze-grid td > .ze-combo:disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* [data] `rect.SetLeft( rect.GetLeft() + m_bitmap.GetWidth() + 8 )`. */
|
||
.ze-grid td > .ze-combo > .ze-combo-swatch {
|
||
/* [data] the same `+ m_bitmap.GetWidth() + 8`. */
|
||
margin-right: 8px;
|
||
}
|
||
/* The chevron is the EDITOR's, and the editor is not what is drawn. */
|
||
.ze-grid td > .ze-combo > .ze-combo-arrow {
|
||
display: none;
|
||
}
|
||
|
||
.ze-combo-value {
|
||
flex: 1 1 auto;
|
||
display: grid;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* Every entry sits in the same grid cell, so the box is as wide as the widest
|
||
of them; only the selected one is painted. */
|
||
.ze-combo-shown,
|
||
.ze-combo-ghost {
|
||
grid-area: 1 / 1;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ze-combo-ghost {
|
||
visibility: hidden;
|
||
pointer-events: none;
|
||
}
|
||
/* A wxChoice's arrow points DOWN, always — it is not a disclosure triangle that
|
||
flips when the list opens. `.twisty.expandable::before` is (0,2,1) and would
|
||
otherwise beat a bare `.ze-combo-arrow::before` at (0,1,1) and paint its
|
||
right-pointing collapsed chevron here, which is exactly what it did. Matching
|
||
the base rule's specificity and coming later in the file wins the tie. */
|
||
.twisty.ze-combo-arrow::before {
|
||
transform: translate(-50%, -70%) rotate(135deg);
|
||
}
|
||
.ze-combo-popup {
|
||
z-index: 1000;
|
||
padding: 4px 0;
|
||
background: #1d1d1d;
|
||
border: 1px solid #4b4b4b;
|
||
border-radius: 6px;
|
||
box-shadow: 0 6px 18px rgb(0 0 0 / 45%);
|
||
max-height: calc(100vh - 8px);
|
||
overflow-y: auto;
|
||
}
|
||
/* The bitmap `Append( name, bitmap, ... )` puts before an entry's label -
|
||
`LAYER_PRESENTATION::DrawColorSwatch` (`common/widgets/layer_presentation.cpp:36-62`),
|
||
which fills the canvas background opaque, fills the layer colour over it and
|
||
then outlines it with `*wxBLACK_PEN*`.
|
||
|
||
[data] 14 is `const int size = 14` in `GBR_LAYER_BOX_SELECTOR::Resync`
|
||
(`gerbview/widgets/gbr_layer_box_selector.cpp:80`) - KiCad's own literal, and
|
||
not the COLOR_SWATCH dialog-unit size, which is a different widget.
|
||
[px] the 4 px gap to the label, off a live GerbView: the swatch's black edge
|
||
ends at x=473 inside a combo whose content starts at 451, and the first glyph
|
||
cell begins at 478. (Upstream's `bestSize.x + size + 10` at :121 is a width
|
||
floor for the whole control, not this gap.) */
|
||
.ze-combo-swatch {
|
||
width: 14px; /* [data] gbr_layer_box_selector.cpp:80 */
|
||
height: 14px;
|
||
flex: 0 0 auto;
|
||
margin-right: 4px;
|
||
border: 1px solid #000; /* bmpDC.SetPen( *wxBLACK_PEN ) */
|
||
box-sizing: content-box;
|
||
}
|
||
/* WX_COMBOBOX's SEPARATOR row: OnMeasureItem returns 11, and OnDrawItem draws a
|
||
1 px wxSYS_COLOUR_GRAYTEXT line across the middle. */
|
||
.ze-combo-separator {
|
||
/* [data] WX_COMBOBOX::OnMeasureItem returns 11 for SEPARATOR. */
|
||
height: 11px;
|
||
background:
|
||
linear-gradient(var(--ctl-fg-disabled), var(--ctl-fg-disabled)) center / 100% 1px no-repeat;
|
||
}
|
||
.ze-combo-item {
|
||
/* A wxChoice popup row is 30px, not a GtkMenu's 26 — measured on a real
|
||
pcb_calculator combo (highlight y=40..69 in a content box y=6..73 with 4px
|
||
padding). Must stay equal to ROW_H in ui/combo_popup.ts, which positions
|
||
the popup so the selected row lands over the closed box. */
|
||
height: 30px;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0 10px;
|
||
color: var(--chrome-fg);
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
}
|
||
/* Grey, not the platform accent — sampled rgb(62,62,62) off the real list. */
|
||
/* Hover and selection are two different things on a popup row and were one
|
||
flat grey here. GTK gives a hovered row the MENUHILIGHT overlay and a
|
||
SELECTED one the highlight itself — the same split a menu and a treeview
|
||
already have. */
|
||
.ze-combo-item:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-combo-item.selected {
|
||
background: var(--chrome-active);
|
||
color: var(--selection-fg);
|
||
}
|
||
.ze-combo-item.disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* `FONT_CHOICE::OnDrawItem`: the specimen sits `nameRect.GetRight() + 15`
|
||
from the name, in wxSYS_COLOUR_GRAYTEXT (--ctl-fg-disabled carries it) —
|
||
the highlight text colour on the selected row. Baselines are aligned by
|
||
the DC arithmetic there; a flex row of two inline spans does the same. */
|
||
.ze-combo-sample {
|
||
margin-left: 15px; /* [data] font_choice.cpp:367 */
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
.ze-combo-item.selected .ze-combo-sample {
|
||
color: var(--selection-fg);
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
wxOwnerDrawnComboBox (ui/OwnerDrawnCombo.tsx).
|
||
|
||
The OTHER combo. .ze-combo above is a wxChoice, whose list GTK draws as a
|
||
MENU: #1d1d1d, 30px rows, opened OVER the closed box. This one is a
|
||
wxComboCtrl, whose popup is a window of its own carrying a wxVListBox, and
|
||
it agrees with that on nothing:
|
||
|
||
wxChoice popup wxComboCtrl popup
|
||
background #1d1d1d (MENU) #272727 (LISTBOX)
|
||
text --chrome-fg --view-fg (#ffffff)
|
||
row height 30 18 (= GetCharHeight())
|
||
highlighted row #3e3e3e-ish #e95420 (SYS_HIGHLIGHT)
|
||
border 1px #4b4b4b, r6 1px #f7f7f7, square
|
||
placement over the box flush BELOW the box
|
||
width the control's the widest ROW's
|
||
|
||
So it is a second widget rather than a modifier on the first, exactly as
|
||
upstream has two classes. Every number below is measured, not read out of
|
||
Yaru or sampled off a screenshot: ~/kicad-probes/fp_choice_probe.cpp builds
|
||
the same read-only wxOwnerDrawnComboBox FOOTPRINT_CHOICE builds and asks it,
|
||
and ~/kicad-probes/fp_choice_pixels.cpp reads the popped-up window back out
|
||
of the display server pixel by pixel. */
|
||
.ze-odcombo {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [px] the control measures 420 x 34 - the same --ctl-height every button,
|
||
entry and choice in a KiCad row is, which is why they line up. */
|
||
height: var(--ctl-height);
|
||
/* [px] the text starts 4px in: GetTextRect().x is 1 and GetMargins().x is 3,
|
||
and `x = aRect.x + GetMargins().x` (footprint_choice.cpp:76) adds them.
|
||
NOT --ctl-pad-x (9px): a wxComboCtrl is not a GTK button. The 3 is on
|
||
.ze-odcombo-text so the focus highlight starts where wx's does. */
|
||
padding: 0 0 0 1px;
|
||
/* [px] rgb(44,44,44) under the closed control's text, unfocused, off the
|
||
rendered frame. That is wxSYS_COLOUR_MENU / --chrome-bg, not the #373737
|
||
3DFACE a wxChoice button takes. */
|
||
background: var(--chrome-bg);
|
||
/* [px] #f7f7f7 - wxSYS_COLOUR_BTNTEXT, the widget foreground. A LIST row is
|
||
a different colour (--view-fg); see .ze-odcombo-item. */
|
||
color: var(--chrome-fg);
|
||
/* Not measured separately, and deliberately not restated: a control border
|
||
is one answer for the whole app and these are the tokens that carry it. */
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: var(--ctl-radius);
|
||
font: inherit;
|
||
/* [px] the control's font is Ubuntu Sans 11pt, pixel size 18 - the window
|
||
font, which is what KIUI::GetControlFont returns. */
|
||
font-size: var(--ui-font-size);
|
||
cursor: default;
|
||
text-align: left;
|
||
min-width: 0;
|
||
}
|
||
.ze-odcombo:disabled {
|
||
background: var(--ctl-face-disabled);
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* GTK3's dashed keyboard-navigation rectangle, keyboard-only - the same rule
|
||
.ze-combo carries, for the same reason. */
|
||
.ze-odcombo:focus {
|
||
outline: none;
|
||
}
|
||
.ze-odcombo:focus-visible {
|
||
outline: 1px dashed var(--field-focus-border);
|
||
outline-offset: -3px;
|
||
}
|
||
.ze-odcombo-text {
|
||
flex: 1 1 auto;
|
||
min-width: 0;
|
||
/* [px] `GetMargins().x`, which OnDrawItem adds to the text rect's own x when
|
||
it paints the control (footprint_choice.cpp:76). The probe asks the control
|
||
for both: margins 3,-1 and a text rect at x=1, and the rendered frame has
|
||
the first glyph 4px inside the control's left edge. It is here rather than
|
||
in the button's padding so the focus highlight starts where wx's does. */
|
||
margin-left: 3px;
|
||
line-height: var(--ui-line-height);
|
||
/* KiCad's rows do not wrap and do not ellipsize; the box simply ends. */
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
}
|
||
/* wxComboCtrlBase::ShouldDrawFocus(): a read-only combo that HAS the focus with
|
||
its popup CLOSED paints its value as if it were a selected row -
|
||
wxODCB_PAINTING_SELECTED goes on, so FOOTPRINT_CHOICE's greying is skipped
|
||
and the whole string is flat. [px] the text area reads #e95420 behind
|
||
#ffffff text in that state and #2c2c2c behind #f7f7f7 without the focus; the
|
||
probe also confirms the flag drops again the moment the list opens. */
|
||
.ze-odcombo-text.selected {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
/* The chevron is .ze-combo-arrow's, shared rather than redrawn. */
|
||
.ze-odcombo-arrow {
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.ze-odcombo-popup {
|
||
z-index: 1000;
|
||
/* [px] the popup window is 1px larger than its client area on every side and
|
||
the corner pixel is that same colour, so: a square 1px border, and it is
|
||
LIGHT - #f7f7f7, wxSYS_COLOUR_BTNTEXT - where a menu's is #4b4b4b. It is
|
||
plainly visible round KiCad's footprint list in the reference screenshot. */
|
||
border: 1px solid var(--chrome-fg);
|
||
/* [px] rgb(39,39,39) between the rows: wxSYS_COLOUR_LISTBOX, because this
|
||
popup is a wxVListBox and not a menu. */
|
||
background: var(--chrome-bg2);
|
||
/* [px] row 0 begins at y=1, immediately inside the border: no padding, and no
|
||
shadow either - adding one would be an invention. */
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
/* [px] 398 with 200 items in the list, however many more there are: a 1px
|
||
border, 22 rows of 18 and a 1px border. wxComboCtrlBase clamps its popup to
|
||
a default maximum height and rounds down to whole rows. Must stay equal to
|
||
POPUP_MAX_H in ui/owner_drawn_combo_popup.ts, which decides whether the
|
||
list still fits below the control or has to flip above it. */
|
||
max-height: 398px;
|
||
overflow-y: auto;
|
||
/* The popup is as wide as its widest row - [px] 748 for a 420px control whose
|
||
widest entry measures 735 - which is why KiCad's footprint list hangs well
|
||
outside the Choose Symbol dialog. */
|
||
width: max-content;
|
||
}
|
||
.ze-odcombo-item {
|
||
/* [px] 18. wxOwnerDrawnComboBox::OnMeasureItem returns -1 for an ordinary
|
||
item, so wxVListBoxComboPopup falls back to the font's cell height, and
|
||
GetCharHeight() is 18 here - the same 18 --ui-line-height already carries.
|
||
Confirmed twice over: VirtualHitTest puts every row boundary 18 apart, and
|
||
the row rectangles read off the popup image are y 1..19, 19..37, 48..66. */
|
||
height: var(--ui-line-height);
|
||
line-height: var(--ui-line-height);
|
||
/* `x = aRect.x + 2` (footprint_choice.cpp:81) - a list row is inset by 2,
|
||
not by the control's margin. [data] KiCad's own literal. */
|
||
padding: 0 0 0 2px;
|
||
/* [px] #ffffff - wxSYS_COLOUR_LISTBOXTEXT. Brighter than the closed control's
|
||
#f7f7f7 above, and that difference is wx's, not ours. */
|
||
color: var(--view-fg);
|
||
font-size: var(--ui-font-size);
|
||
cursor: default;
|
||
/* KiCad's rows do not wrap: the popup grows to the widest one instead. */
|
||
white-space: nowrap;
|
||
}
|
||
/* wxODCB_PAINTING_SELECTED. There is no separate hover colour because there is
|
||
no separate hover STATE: wxVListBoxComboPopup moves its selection to the row
|
||
under the pointer, which is why FOOTPRINT_CHOICE has to veto wxEVT_MOTION to
|
||
keep the separator unhighlightable. [px] rgb(233,84,32) behind flat #ffffff. */
|
||
.ze-odcombo-item.selected {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
.ze-odcombo-item.disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* An empty item is a separator, and a separator is a RULE, not a blank row
|
||
(footprint_choice.cpp:62-69). */
|
||
.ze-odcombo-sep {
|
||
/* [data] `if( SafeGetString( aItem ) == wxS( "" ) ) return 11;`
|
||
(footprint_choice.cpp:127-128) - KiCad's own literal, and shorter than the
|
||
18 of a text row. [px] the separator row measures y 37..48 in the popup
|
||
image, which is 11. */
|
||
height: 11px;
|
||
cursor: default;
|
||
}
|
||
.ze-odcombo-sep::before {
|
||
content: "";
|
||
display: block;
|
||
/* `aRect.y + aRect.height / 2` - integer division, so 5 down a row of 11.
|
||
[px] the rule lands on y=42 of a row starting at 37. */
|
||
margin-top: 5px;
|
||
height: 1px;
|
||
background: var(--odcombo-grey);
|
||
}
|
||
|
||
/* FILTER_COMBOPOPUP (widgets/filter_combobox.tsx): a wxPanel in the same
|
||
wxComboCtrl popup window, holding "Filter:", the filter wxTextCtrl and a
|
||
wxListBox in one vertical sizer. Only the list scrolls. */
|
||
.ze-filter-popup {
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
}
|
||
.ze-filter-popup-label {
|
||
color: var(--chrome-fg);
|
||
}
|
||
.ze-filter-popup-list {
|
||
/* [data] mainSizer->Add( m_listBox, 1, wxEXPAND | wxTOP, 2 ) (filter_combobox.cpp:84) */
|
||
margin-top: 2px;
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
/* wxGetSingleChoice raises a wxSingleChoiceDialog, which is sized by its LIST -
|
||
[px] 240 px wide and 325 tall for the resistivity list, its title clipped to
|
||
"Electrical R..." because the dialog is narrower than the caption. Ours was
|
||
855x580 with a 340 px floor, i.e. three times the area. */
|
||
.ze-modal.ze-choicedlg,
|
||
.ze-modal.ze-themefolder {
|
||
width: fit-content;
|
||
height: auto;
|
||
min-width: 0;
|
||
max-width: 90vw;
|
||
}
|
||
.ze-choicedlg-body {
|
||
padding: 12px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
}
|
||
.ze-choicedlg-message {
|
||
color: var(--chrome-fg);
|
||
}
|
||
.ze-choicedlg-list {
|
||
background: var(--field-bg);
|
||
border: 1px solid var(--ctl-border);
|
||
border-radius: var(--ctl-radius);
|
||
/* [px] the list box runs y 490..710 - about nine rows - and scrolls. */
|
||
max-height: 220px;
|
||
overflow-y: auto;
|
||
outline: none;
|
||
}
|
||
.ze-choicedlg-item {
|
||
padding: 3px 8px;
|
||
cursor: default;
|
||
white-space: pre;
|
||
}
|
||
|
||
/* DELIBERATE DIVERGENCE (Akshay, 2026-08-20): KiCad's rows are one label with
|
||
an embedded tab, so GTK lands each name on whichever Pango tab stop the
|
||
value's width leaves free and the real dialog is ragged. A subgrid gives the
|
||
value and the name a genuinely shared column while the selection bar still
|
||
paints across the whole row. See ui/dialog_single_choice.tsx. */
|
||
.ze-choicedlg-list.cols {
|
||
display: grid;
|
||
grid-template-columns: max-content 1fr;
|
||
align-content: start;
|
||
}
|
||
.ze-choicedlg-item.cols {
|
||
display: grid;
|
||
grid-column: 1 / -1;
|
||
grid-template-columns: subgrid;
|
||
column-gap: calc(var(--wx-border) * 2);
|
||
}
|
||
.ze-choicedlg-item.selected {
|
||
background: var(--chrome-active);
|
||
}
|
||
|
||
/* A wxStdDialogButtonSizer: two ordinary buttons at the bottom RIGHT, not the
|
||
full-width split bar a GTK message dialog uses. [px] Cancel x 916..995 and
|
||
OK 1004..1088 inside a dialog ending at 1113. */
|
||
.ze-choicedlg-buttons {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: var(--wx-border);
|
||
padding: var(--wx-border) 10px 10px; /* [px] the buttons sit 10 px off the dialog's edges */
|
||
}
|
||
|
||
/* ---- Color Themes (dialogs/prefs/dialog_theme_folder.tsx) ----
|
||
A listing in a dialog, which is what `.ze-choicedlg` already is: the modal's
|
||
size, the body's padding, the list's chrome and the button row are all that
|
||
rule's, reused by name in the markup. What is left here is the only thing
|
||
that differs -- three columns instead of two -- and the ink for a line the
|
||
user has to read. */
|
||
.ze-themefolder-list {
|
||
grid-template-columns: max-content 1fr max-content;
|
||
}
|
||
/* No colour on the name column or the note: a dialog's text is the DIALOG's
|
||
foreground, and stating one here is the drift the report panel's legend
|
||
comment describes. The error line takes `generateHtml`'s error ink. */
|
||
.ze-themefolder-error {
|
||
color: var(--error-ink);
|
||
}
|
||
|
||
/* `wxBU_EXACTFIT` — "size the button to exactly fit its label", which drops the
|
||
standard button minimum rather than shrinking it. The `<<<` beside the date
|
||
is the only button in this dialog that carries it
|
||
(`dialog_page_settings_base.cpp:228`), so it is a modifier rather than a
|
||
change to `.ze-btn`, whose 85px IS the standard width everywhere else.
|
||
[px] the button measures 22px wide on a live pl_editor against our 85. */
|
||
.ze-btn.ze-btn-exactfit {
|
||
min-width: 0;
|
||
padding: 0 2px;
|
||
/* EXACTFIT collapses BOTH axes, not just the width: [px] the `<<<` button is
|
||
26px tall beside 34px entries on a live pl_editor, and centred on them. */
|
||
height: 26px;
|
||
}
|
||
/* wxDatePickerCtrl on GTK is an entry with its own drop-down button on the
|
||
right, [px] 24px wide. `<input type="date">` puts a native calendar glyph
|
||
INSIDE the field instead, which both looks wrong and steals the width that
|
||
made the date read as "08/22/202". The native indicator is hidden and the
|
||
button below stands in for it, still opening the browser's own picker. */
|
||
.ze-datepicker {
|
||
/* proportion 2 in bSizerDate, but never below what the date itself needs:
|
||
"08/22/2026" was being clipped to "08/22/202" because the flex basis let
|
||
the entry shrink under the button. */
|
||
/* proportion 2 in bSizerDate, and never narrower than the control needs.
|
||
`fit-content` is the entry's own intrinsic width plus the 24px button, so
|
||
the proportion decides how much EXTRA it gets and nothing can squeeze the
|
||
date out. A fixed floor here was a guess, and the wrong one twice. */
|
||
/* Basis 0, so the 3:2 that bSizerDate declares is what divides the row.
|
||
With an `auto` basis this control claimed its whole intrinsic width up
|
||
front and only then shared the remainder, which inverted the pair — the
|
||
picker came out wider than the entry that is meant to be half again its
|
||
size. `fit-content` stays as the FLOOR so nothing can clip the year. */
|
||
flex: 2 1 0;
|
||
min-width: fit-content;
|
||
display: flex;
|
||
align-items: stretch;
|
||
}
|
||
.ze-datepicker > input {
|
||
/* NO `min-width: 0`. A flex item's min-width defaults to `auto`, meaning
|
||
"do not shrink below your own content" — overriding it to 0 is exactly
|
||
what let Chrome clip "08/22/2026" to "08/22/202" behind the button. The
|
||
native date field renders its own text and cannot ellipsise or scroll it,
|
||
so the intrinsic minimum is the only thing keeping the year visible. */
|
||
flex: 1 1 auto;
|
||
border-top-right-radius: 0;
|
||
border-bottom-right-radius: 0;
|
||
border-right: 0;
|
||
}
|
||
.ze-datepicker > input::-webkit-calendar-picker-indicator {
|
||
display: none;
|
||
}
|
||
.ze-datepicker > button {
|
||
flex: 0 0 24px;
|
||
min-width: 0;
|
||
padding: 0;
|
||
border-top-left-radius: 0;
|
||
border-bottom-left-radius: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
/* UNIT_BINDER::Enable( false ) greys the label, the value control AND the unit
|
||
static text together (unit_binder.cpp:697-706) — by colour, as GTK's
|
||
`label:disabled { color: #929292 }` does, never by opacity. */
|
||
.ze-unit-label.disabled,
|
||
.ze-tbp-lbl.disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
DIALOG_RESTORE_LOCAL_HISTORY's own frame
|
||
(common/dialogs/dialog_restore_local_history.cpp:62-68).
|
||
|
||
topSizer->Add( m_list, 1, wxEXPAND | wxALL, 5 );
|
||
topSizer->Add( m_details, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
|
||
topSizer->Add( buttons, 0, wxEXPAND | wxALL, 5 );
|
||
|
||
Both proportion 1, so the list and the details box split the height evenly
|
||
and both grow with the window. The 5 is the wx border, --wx-border.
|
||
--------------------------------------------------------------------------- */
|
||
.ze-rlhist-body {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
flex: 1 1 auto;
|
||
/* wxALL 5 on the list, then LEFT|RIGHT|BOTTOM 5 on the details: the two
|
||
share one gap between them rather than stacking two. */
|
||
padding: var(--wx-border);
|
||
gap: var(--wx-border);
|
||
}
|
||
/* The list header and body are one control; the header must not shrink. */
|
||
.ze-rlhist-body > .ze-lhist-head {
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-rlhist-body > .ze-lhist-list,
|
||
.ze-rlhist-body > .ze-rlhist-details {
|
||
/* proportion 1 each. The header is part of the list's box, so the list keeps
|
||
a slightly smaller basis to leave the two panes even on screen. */
|
||
flex: 1 1 0;
|
||
min-height: 0;
|
||
}
|
||
.ze-rlhist-details {
|
||
resize: none;
|
||
font-family: inherit;
|
||
/* wxTE_MULTILINE: it wraps and scrolls rather than growing. */
|
||
overflow: auto;
|
||
}
|
||
|
||
/* wxAUI's dock sash: the bar between a docked pane and the centre one. It is
|
||
drawn, not invisible - KiCad's GerbView shows a solid strip there, which is
|
||
what Akshay caught this missing. Size and colour are wx's own; see the
|
||
--aui-sash tokens for the measurement.
|
||
|
||
It takes space in the layout rather than overlaying the pane, because that
|
||
is what wxAUI does: the sash sits *between* the panes and the dock is
|
||
narrower by its width. Overlaying it would leave the pane 5px wider than
|
||
KiCad's and put the sash on top of the caption. */
|
||
.ze-dock-sash {
|
||
flex: 0 0 auto;
|
||
width: var(--aui-sash-size);
|
||
background: var(--aui-sash);
|
||
cursor: col-resize;
|
||
}
|
||
|
||
/* ---- DIALOG_COLOR_PICKER (common/dialogs/dialog_color_picker.cpp) ---- */
|
||
.ze-cp-upper {
|
||
/* bSizerUpperMain, horizontal: the notebook then the transparency column. */
|
||
display: flex;
|
||
align-items: stretch;
|
||
}
|
||
/* m_notebook's page area. A wxNotebook is ONE size whatever page is showing:
|
||
`wxBookCtrlBase::DoGetBestSize` walks EVERY page and `IncTo`s the largest,
|
||
and only takes the current page's size when `SetFitToCurrentPage( true )`
|
||
has been called - which in all of KiCad is `PAGED_DIALOG`'s treebook and
|
||
nothing else (common/widgets/paged_dialog.cpp:73). So the picker is as wide
|
||
as its widest page and as tall as its tallest, and clicking Defined Colors
|
||
does not resize the dialog.
|
||
|
||
Stacking both pages in one grid cell is that rule: every page contributes
|
||
its size, the unselected one is hidden by VISIBILITY, and the cell is the
|
||
maximum of the two. Hiding by `display: none` instead is what let the two
|
||
pages come out different sizes - it takes the hidden page out of sizing
|
||
altogether, which is what wx does only in the fit-to-current-page case. */
|
||
.ze-cp-book {
|
||
display: grid;
|
||
}
|
||
.ze-cp-book > * {
|
||
grid-area: 1 / 1;
|
||
}
|
||
/* The unselected page still SIZES the book, so it may not be display:none —
|
||
and being `visibility: hidden` it is out of the tab order and untouchable,
|
||
which is the rest of what a wxNotebook page that is not showing is. */
|
||
.ze-cp-book > [hidden] {
|
||
visibility: hidden;
|
||
}
|
||
.ze-cp-panels {
|
||
/* bSizerPanels, horizontal: the RGB box beside the HSV box. Each goes in
|
||
with proportion 1, so the two share the notebook evenly - and the
|
||
notebook's own width comes from the 264 px palettes, not from the fields
|
||
under them. */
|
||
display: flex;
|
||
align-items: stretch;
|
||
}
|
||
/* `display` here beats the UA's `[hidden] { display: none }`, which is why
|
||
selecting Defined Colors underlined the tab and changed nothing on the page
|
||
beneath it. The page stays MOUNTED - unmounting it would throw away the two
|
||
palette bitmaps and repaint them on every tab click - and it stays LAID OUT,
|
||
because a wxNotebook is sized by its pages including the ones not showing. */
|
||
.ze-cp-panels[hidden] {
|
||
display: flex;
|
||
}
|
||
/* `bSizerPanels->Add( sbSizerViewRGB, 1, ... )` and the same for HSV
|
||
(dialog_color_picker_base.cpp:74, :131) — proportion 1 each.
|
||
|
||
A wx proportion shares out the EXTRA space; the base is the item's own
|
||
minimum, which here is the palette's `SetMinSize( wxSize( 264, 264 ) )`.
|
||
`flex: 1 1 0` is not that: basis ZERO means the item has no size of its own,
|
||
and inside `.ze-modal`'s `width: max-content` the container then resolves to
|
||
TWICE the larger box's content — the dialog opened about 1670 px wide around
|
||
two 264 px palettes swimming in space. `min-width: 0` removed the floor that
|
||
would have shown it up.
|
||
|
||
`flex-basis: auto` is proportion 1: content first, then an equal share of
|
||
what is left. */
|
||
.ze-cp-panels > fieldset {
|
||
flex: 1 1 auto;
|
||
}
|
||
.ze-cp-palette {
|
||
position: relative;
|
||
display: block;
|
||
line-height: 0;
|
||
}
|
||
/* The cursors and axes are repainted on every change over a palette bitmap
|
||
that is built once (`drawAll`, dialog_color_picker.cpp:579-595), so they are
|
||
a second canvas on top rather than a rebuild of the first. It carries the
|
||
pointer handlers, because it is the one on top. */
|
||
.ze-cp-overlay {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
}
|
||
/* A wxSpinCtrl is an entry with GTK's own -/+ beside it. */
|
||
.ze-cp-spinbox {
|
||
display: flex;
|
||
align-items: stretch;
|
||
}
|
||
.ze-cp-spinbox > input {
|
||
/* A wxSpinCtrl built with wxDefaultSize is as wide as its RANGE needs, and
|
||
these hold three digits at most (0..255, 0..359). An `<input>` defaults to
|
||
`size=20` and contributes that to its track's max-content, which is what
|
||
stretched each static box to three twenty-character fields and made the
|
||
dialog half again as wide as a real one. */
|
||
/* [px] as wide as the RANGE needs and no wider: three digits at most
|
||
(0..255, 0..359). `size` cannot express that - it counts average
|
||
characters - and `width: 0` clipped the value to a single glyph, which is
|
||
why the fields read "(" instead of "0". A real wxSpinCtrl's entry beside
|
||
these measures 3 digits plus the caret. */
|
||
width: 5ch;
|
||
min-width: 0;
|
||
flex: 1 1 auto;
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
.ze-cp-spinbtn {
|
||
flex: 0 0 auto;
|
||
/* [px] a GTK spin button is square at the entry's height, which
|
||
--ctl-height already holds for every entry in this shell. */
|
||
width: var(--ctl-height);
|
||
font-size: var(--ui-font-size);
|
||
color: var(--chrome-fg);
|
||
background: var(--chrome-bg2);
|
||
border: 1px solid var(--ctl-border);
|
||
border-left: none;
|
||
}
|
||
/* m_panelDefinedColors' grid: the 35 colours of colorRefs() as a swatch and a
|
||
name apiece, in the 7 x 5 matrix `initDefinedColors` reorders them into. */
|
||
.ze-cp-defined {
|
||
/* No height floor. It used to carry `min-height: 264px` — the palettes' size,
|
||
copied here so that selecting this page did not shrink the dialog. That was
|
||
the wxNotebook rule written out by hand for one page and one axis;
|
||
`.ze-cp-book` now states it once for both pages and both axes, so the floor
|
||
is the free page itself rather than a number repeated from it. */
|
||
/* [data] `m_SizerDefinedColors->Add( m_fgridColor, 1, wxALL|wxEXPAND, 10 )`
|
||
(dialog_color_picker_base.cpp:154). */
|
||
padding: 10px;
|
||
/* [data] `m_fgridColor = new wxFlexGridSizer( 0, 10, 25, 5 )` with
|
||
`AddGrowableCol` on 1, 3, 5, 7 and 9 (dialog_color_picker_base.cpp:144-149):
|
||
ten columns, five swatch-and-name pairs, and only the name columns grow.
|
||
A wxFlexGridSizer fills row by row, which is why the caller hands the
|
||
colours over already transposed - see ui/defined_colors.ts. */
|
||
display: grid;
|
||
grid-template-columns: repeat(5, auto 1fr);
|
||
column-gap: 5px; /* [data] the sizer's hgap */
|
||
row-gap: 25px; /* [data] the sizer's vgap */
|
||
align-content: start;
|
||
align-items: center; /* [data] wxALIGN_CENTER_VERTICAL on both cells */
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
/* The name beside each swatch - a wxStaticText, and the only cell in the grid
|
||
that carries a border of its own. */
|
||
.ze-cp-defined > span {
|
||
/* [data] `m_fgridColor->Add( label, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 15 )`
|
||
(dialog_color_picker_base.cpp:200). */
|
||
margin-right: 15px;
|
||
}
|
||
/* "Reset to Default" is one line in a wxButton, which sizes to its label. */
|
||
.ze-cp-reset {
|
||
white-space: nowrap;
|
||
flex: 0 0 auto;
|
||
}
|
||
/* The 8 px square cursor each palette draws over the picked pixel
|
||
(m_cursorsSize, dialog_color_picker.cpp:573-576). */
|
||
.ze-cp-cursor {
|
||
position: absolute;
|
||
/* [data] m_cursorsSize, `FromDIP( 8 )` (dialog_color_picker.cpp:575); the
|
||
negative margin is half of it, which is what centres the square on the
|
||
picked pixel the way `DrawRectangle( pos - size/2, size )` does. */
|
||
width: 8px; /* [data] m_cursorsSize, FromDIP( 8 ) */
|
||
height: 8px; /* [data] the same 8 */
|
||
margin: -4px 0 0 -4px; /* [data] half of it, to centre on the picked pixel */
|
||
border: 1px solid var(--chrome-fg);
|
||
pointer-events: none;
|
||
}
|
||
.ze-cp-spins {
|
||
/* fgSizerRGB: three growable columns, the labels on one row and the spins on
|
||
the next (dialog_color_picker_base.cpp:41-46). fgSizerHSV is the same with
|
||
two. */
|
||
display: grid;
|
||
/* THE SPIN ROW DOES NOT SET THE BOX'S WIDTH. Upstream adds it with
|
||
proportion ZERO and wxEXPAND:
|
||
|
||
sbSizerViewRGB->Add( m_RgbBitmap, 0, ...|wxEXPAND|wxSHAPED, 5 );
|
||
sbSizerViewRGB->Add( 0, 0, 1, wxEXPAND, 5 );
|
||
sbSizerViewRGB->Add( fgSizerRGB, 0, wxEXPAND, 5 );
|
||
|
||
— it takes the width the box gives it and never asks for more. The box's
|
||
width is the palette's, `m_RgbBitmap` at `SetMinSize( wxSize( 264, 264 ) )`.
|
||
|
||
A CSS grid does the opposite by default: `1fr` is `minmax(auto, 1fr)`, so
|
||
each column's min-content — a label plus a spin box plus two buttons —
|
||
pushes the box outward, the box pushes the notebook, and `.ze-modal`'s
|
||
`width: max-content` hands the dialog whatever comes out. That is what
|
||
opened the picker at its `max-width: 92vw` cap, 1766 px on a 1920 px
|
||
screen, around two 264 px palettes swimming in space.
|
||
|
||
`minmax(0, 1fr)` is proportion 0 + wxEXPAND: share the width, contribute
|
||
none of it. */
|
||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||
min-width: 0;
|
||
}
|
||
.ze-cp-spins.two {
|
||
grid-template-columns: repeat(2, 1fr);
|
||
}
|
||
.ze-cp-spin {
|
||
display: flex;
|
||
flex-direction: column;
|
||
font-size: var(--ui-font-size);
|
||
/* [data] the border wxFormBuilder gives every cell in these two sizers:
|
||
`wxTOP|wxRIGHT|wxLEFT, 5` on the labels and
|
||
`wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5` on the spins
|
||
(dialog_color_picker_base.cpp:48-64). The label sits directly on its spin,
|
||
so the gap between them is the sizer's own vgap, which is 0. */
|
||
padding: 5px;
|
||
gap: 0; /* [data] the sizer's vgap, 0 - the label sits on its spin */
|
||
}
|
||
.ze-cp-hsvrow {
|
||
display: flex;
|
||
align-items: stretch;
|
||
/* Its palette states the width; the slider column beside it does not add to
|
||
it (`m_SizerTransparency` and the Value column are proportion 0 columns of
|
||
a wxEXPAND row). */
|
||
min-width: 0;
|
||
}
|
||
.ze-cp-hsvcol {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* bSizerBright and m_SizerTransparency: a label over a VERTICAL wxSlider. */
|
||
.ze-cp-slidercol {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
font-size: var(--ui-font-size);
|
||
/* [data] `wxALL|wxALIGN_CENTER_HORIZONTAL, 5` on the label and 10 on the
|
||
slider (dialog_color_picker_base.cpp:120-124, :169-173); the gap between
|
||
them is the label's own bottom border. */
|
||
padding: 5px;
|
||
gap: 5px; /* [data] the label's own wxALL border */
|
||
}
|
||
/* The slider itself is `.ze-slider.vertical` - see ui/Slider.tsx. */
|
||
.ze-cp-slidercol > .ze-slider {
|
||
flex: 1;
|
||
}
|
||
.ze-cp-buttons {
|
||
/* bButtonsSizer, horizontal, with the standard button sizer at the end. */
|
||
display: flex;
|
||
align-items: center;
|
||
font-size: var(--ui-font-size);
|
||
/* [data] `bSizerMain->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT, 10 )` for the
|
||
inset, and the 5 px border every child of that sizer carries. */
|
||
padding-left: 10px;
|
||
gap: 5px; /* [data] the 5 px border every child of bButtonsSizer carries */
|
||
}
|
||
/* m_OldColorRect / m_NewColorRect: SetMinSize( 24, 24 ) in the base file, which
|
||
the dialog then overrides with FromDIP( 20, 20 ) at
|
||
dialog_color_picker.cpp:65-66 - the later call is the one that stands. */
|
||
.ze-cp-preview {
|
||
/* [data] `FromDIP( wxSize( 20, 20 ) )`, dialog_color_picker.cpp:65-66. */
|
||
width: 20px;
|
||
height: 20px; /* [data] the same FromDIP( 20 ) */
|
||
flex: 0 0 auto;
|
||
border: 1px solid var(--ctl-border);
|
||
}
|
||
/* `updatePreview` calls the same `COLOR_SWATCH::MakeBitmap`
|
||
(dialog_color_picker.cpp:128-140), so an UNSPECIFIED preview checkerboards
|
||
exactly as a swatch does rather than showing a transparent square that reads
|
||
as the dialog's own background. The rule is `.ze-swatch.unspecified`'s, taken
|
||
by the same class rather than copied. */
|
||
.ze-cp-hex {
|
||
/* [data] `m_colorValue->SetMinSize( wxSize( 176, -1 ) )`. */
|
||
min-width: 175px;
|
||
font-size: var(--ui-font-size);
|
||
}
|
||
.ze-cp-gap {
|
||
/* [data] `bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 )` - a fixed 20 px
|
||
spacer between the hex entry and Reset to Default. */
|
||
width: 20px;
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-cp-buttons .ze-modal-footer {
|
||
flex: 1;
|
||
}
|
||
/* ---- Preferences > Toolbars (PANEL_TOOLBAR_CUSTOMIZATION) ----------------
|
||
Every length below is a wxFormBuilder border or spacer from
|
||
`common/dialogs/panel_toolbar_customization_base.cpp:15-133` — KiCad's own
|
||
layout data, marked per occurrence. The colours are tokens, because the tree
|
||
and the action list are a wxTreeCtrl and a wxListCtrl and take
|
||
wxSYS_COLOUR_LISTBOX like every other list in the app. */
|
||
|
||
/* Like `.ze-prefs-panel > .ze-hotkeys-panel` above, and for the same reason:
|
||
the tree and the action list scroll inside themselves, so the page has to
|
||
fill its height rather than size to its content. */
|
||
.ze-prefs-panel > .ze-tbcust {
|
||
height: 100%;
|
||
}
|
||
.ze-tbcust {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
}
|
||
.ze-tbcust > .ze-pref-check {
|
||
margin: 10px; /* [data] `bPanelSizer->Add( m_customToolbars, 0, wxALL, 10 )` */
|
||
}
|
||
.ze-tbcust-rule {
|
||
margin: 0 5px 5px; /* [data] `m_staticline1`, `wxBOTTOM|wxRIGHT|wxLEFT, 5` */
|
||
border: 0;
|
||
border-top: 1px solid var(--chrome-border);
|
||
}
|
||
/* `wxFlexGridSizer( 1, 3, 0, 0 )` growing columns 0 and 2: the toolbar being
|
||
edited, the add button, the action list. The middle column does not grow, so
|
||
it takes only what the button needs. */
|
||
.ze-tbcust-cols {
|
||
display: flex;
|
||
flex: 1;
|
||
min-height: 0;
|
||
}
|
||
.ze-tbcust-col {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
}
|
||
/* `bSizer6` centres `m_btnAddTool` between two growing spacers. */
|
||
.ze-tbcust-mid {
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 5px; /* [data] `bSizer6->Add( m_btnAddTool, 0, wxALL, 5 )` */
|
||
}
|
||
/* The wxTreeCtrl (`wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5`) and the wxListCtrl
|
||
(`wxALL|wxEXPAND, 5`). */
|
||
.ze-tbcust-tree,
|
||
.ze-tbcust-list {
|
||
flex: 1;
|
||
min-height: 0;
|
||
overflow: auto;
|
||
margin: 5px; /* [data] both controls' sizer border */
|
||
padding: 0;
|
||
list-style: none;
|
||
background: var(--chrome-bg2);
|
||
border: 1px solid var(--ctl-border);
|
||
}
|
||
.ze-tbcust-tree ul {
|
||
margin: 0;
|
||
padding: 0;
|
||
list-style: none;
|
||
}
|
||
/* The two lists' rows. Every number here is the widget's own, read off the
|
||
controls PANEL_TOOLBAR_CUSTOMIZATION builds by asking wx for them on this
|
||
machine and this theme (`qa/probes/toolbar_customization_probe.cpp`):
|
||
|
||
tree GetIndent() 15
|
||
tree row height (24 px image) 26
|
||
tree label x, top level, no image 33 <- the expander gutter
|
||
tree label x, top level, with image 61 <- so the image cell is 28
|
||
tree label x, one level in, image 76 <- 61 + GetIndent()
|
||
list row height 30
|
||
list icon rect x=2 w=29
|
||
list label rect x=31
|
||
wxRendererNative expander size 16 x 16
|
||
|
||
The icons are 24, not 16: `populateActions` builds every bundle at
|
||
`const int c_defSize = 24` (panel_toolbar_customization.cpp:583) and hands
|
||
the same vector to the tree and the list. Ours drew them at 16 in rows of
|
||
~25, against KiCad's 24 in rows of 26 and 30 — the whole page read a size
|
||
small, which is what Akshay saw. */
|
||
.ze-tbcust-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 0;
|
||
font-size: var(--ui-font-size);
|
||
cursor: default;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-tbcust-tree .ze-tbcust-row {
|
||
height: 26px; /* [px] the tree's own row height at a 24 px image */
|
||
}
|
||
.ze-tbcust-list .ze-tbcust-row {
|
||
height: 30px; /* [px] the list's */
|
||
padding-left: 2px; /* [px] the list's icon rect starts at 2 */
|
||
}
|
||
.ze-tbcust-row.sel {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
/* The expander cell. EVERY tree row reserves it — that is what puts a leaf's
|
||
icon at the same x as a group's label — and only a group draws a button in
|
||
it. */
|
||
.ze-tbcust-tree .ze-tbcust-row > .twisty {
|
||
width: 16px; /* [px] `wxRendererNative::GetExpanderSize`, probed */
|
||
margin-right: 17px; /* [px] the rest of the 33 px gutter the probe reports */
|
||
}
|
||
/* One level in. `.ze-tbcust-tree` IS the outer <ul>, so a group's children are
|
||
`ul` and not `ul ul` — the doubled selector matched a grandchild list that
|
||
this tree never builds, and every child sat at its parent's x. */
|
||
.ze-tbcust-tree li > ul {
|
||
/* [px] `m_toolbarTree->GetIndent()`, applied per level. */
|
||
margin-left: 15px;
|
||
}
|
||
/* There is no rule for a MISSING icon, and that is the point. `AppendItem( …,
|
||
-1 )` and a `wxListItem` with no image reserve no image cell at all, so an
|
||
iconless row's text starts where the image would have. Probed on this
|
||
machine's wx:
|
||
|
||
tree "Show Grid" (image) label x=61 "Separator" (none) label x=33
|
||
list row with image label x=31 row with none label x=2
|
||
|
||
A 24 px spacer stood in for the missing image, which lined every row's text
|
||
up and put "Separator", "Units" and "Crosshair modes" 28 px right of where
|
||
KiCad draws them. */
|
||
.ze-tbcust-row img {
|
||
width: 24px; /* [data] `c_defSize`, the size every bundle is built at */
|
||
height: 24px; /* [data] as above */
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-tbcust-tree .ze-tbcust-row img {
|
||
/* [px] 61 - 33 - 24: the tree's image cell less the image inside it. */
|
||
margin-right: 4px;
|
||
}
|
||
.ze-tbcust-list .ze-tbcust-row img {
|
||
/* [px] 31 - 2 - 24: the same in the list, whose label starts at 31. */
|
||
margin-right: 5px;
|
||
}
|
||
.ze-tbcust-btns {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px; /* [data] `wxTOP|wxBOTTOM, 5` on the buttons of bSizerToolbarBtns */
|
||
padding: 5px; /* [data] `wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5` on the row */
|
||
}
|
||
/* SPLIT_BUTTON (`common/widgets/split_button.cpp:225-327`). `OnPaint` calls
|
||
`DrawPushButton` TWICE — once over `[0, width)` and once over
|
||
`[width - 2, width - 2 + m_arrowButtonWidth)` — so the two halves are two
|
||
whole buttons that overlap by two pixels, each with its own border, its own
|
||
rounded corners and its own hover state. We had drawn one slab with the seam
|
||
flattened out, which is a different control. */
|
||
.ze-splitbtn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
}
|
||
.ze-splitbtn > .ze-btn:first-child {
|
||
/* [data] `m_widthPadding = FromDIP( 10 )`, the label's own padding. */
|
||
padding-left: 10px;
|
||
padding-right: 10px; /* [data] the same padding, the other side */
|
||
}
|
||
.ze-splitbtn-arrow {
|
||
/* [data] `m_arrowButtonWidth = FromDIP( 20 )`. */
|
||
width: 20px;
|
||
min-width: 20px; /* [data] the same 20: a sizer minimum, not a preference */
|
||
padding: 0;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
/* [data] `r2.x -= 2` — the arrow half sits two pixels into the label half. */
|
||
margin-left: -2px;
|
||
}
|
||
/* `bToolbarSizer`: the label with `wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5`
|
||
and `m_tbChoice` added at proportion ONE with `wxALL, 5`, so the choice takes
|
||
the whole width the column has left. */
|
||
.ze-tbcust-tbrow {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [data] the choice's `wxALL, 5`; the label carries the left edge itself. */
|
||
padding: 5px 5px 5px 0;
|
||
}
|
||
.ze-tbcust-tbrow > .lbl {
|
||
/* [data] `m_toolbarChoiceLabel`'s `wxLEFT, 5`, and the 5 the choice's own
|
||
wxALL puts between the two. */
|
||
padding: 0 5px;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-tbcust-tbrow > .ze-combo {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.ze-tbcust-filter {
|
||
/* [data] `bSizer9->Add( m_actionFilter, 0, wxALL|wxEXPAND, 5 )`. */
|
||
margin: 5px;
|
||
width: auto;
|
||
}
|
||
.ze-tbcust-gap {
|
||
width: 20px; /* [data] `bSizerToolbarBtns->Add( 20, 0, 0, 0, 5 )`, the fixed spacer before Delete */
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
/* ---- PANEL_SIMULATOR_PREFERENCES (eeschema/dialogs/panel_simulator_preferences_base.cpp)
|
||
`bScrollMargins` is horizontal: the two choice tables on the left at
|
||
proportion 1 with `wxLEFT, 5`, the two reset buttons on the right with
|
||
`wxLEFT, 50`. Every control on the page is disabled — we ship no simulator,
|
||
so nothing reads these — and the greying is the shared `:disabled` treatment,
|
||
not anything stated here. */
|
||
.ze-simprefs {
|
||
display: flex;
|
||
/* [data] `Add( bScrollMargins, 1, wxEXPAND|wxTOP|wxRIGHT, 10 )`. */
|
||
padding: 10px 10px 0 0;
|
||
}
|
||
.ze-simprefs-col {
|
||
flex: 1;
|
||
min-width: 0;
|
||
/* [data] `Add( bScrollSizerLeft, 1, wxEXPAND|wxLEFT, 5 )`. */
|
||
margin-left: 5px;
|
||
}
|
||
.ze-simprefs-heading {
|
||
/* [data] `m_lblVScrollMovement`'s `wxBOTTOM|wxRIGHT|wxLEFT, 5`. */
|
||
padding: 0 5px;
|
||
/* [data] that label's own wxBOTTOM plus the `Add( 0, 5 )` spacer under it. */
|
||
margin-bottom: 10px;
|
||
}
|
||
.ze-simprefs-heading2 {
|
||
/* [data] the `Add( 0, 20 )` spacer above `m_lblHScrollMovement`. */
|
||
margin-top: 20px;
|
||
/* [data] its own `wxALL, 5`, where the first heading has three sides. */
|
||
padding: 5px;
|
||
}
|
||
/* `fgVScroll` / `fgHScroll`: two columns, growable col 0, `Add( …, 0,
|
||
wxRIGHT|wxLEFT, 24 )`. The vertical one has a 5 px vgap; the horizontal one
|
||
has none. */
|
||
.ze-simprefs-grid {
|
||
display: grid;
|
||
/* BOTH columns hug. `AddGrowableCol( 0 )` names the LABEL column, and the
|
||
grid itself is added at proportion 0 with no wxEXPAND —
|
||
`bScrollSizerLeft->Add( fgVScroll, 0, wxRIGHT|wxLEFT, 24 )` — so the sizer
|
||
never receives slack to give it and every column stays at its minimum. A
|
||
wxChoice added at proportion 0 without wxEXPAND takes its own best size,
|
||
which is its widest item plus the arrow; ours had `1fr` on that column and
|
||
stretched the control to the width of the page. */
|
||
grid-template-columns: max-content max-content;
|
||
justify-content: start;
|
||
align-items: center;
|
||
/* [data] `wxFlexGridSizer( 0, 2, 5, 0 )` — a 5 px vgap and no hgap. */
|
||
row-gap: 5px;
|
||
/* [data] the sizer's own `wxRIGHT|wxLEFT, 24`. */
|
||
padding: 0 24px;
|
||
}
|
||
.ze-simprefs-colhead {
|
||
/* `wxALIGN_BOTTOM` on both column headings. */
|
||
align-self: end;
|
||
}
|
||
.ze-simprefs-action {
|
||
/* [data] `wxALIGN_CENTER_HORIZONTAL` on the Action heading alone. */
|
||
text-align: center;
|
||
/* [data] the choices' own `wxRIGHT|wxLEFT, 5`, so the heading sits over the
|
||
control and not over its border. */
|
||
padding: 0 5px;
|
||
}
|
||
.ze-simprefs-choice {
|
||
/* [data] `Add( m_choiceVScroll…, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 )`. */
|
||
margin: 0 5px;
|
||
}
|
||
/* `bScrollSizerRight`, `Add( …, 0, wxEXPAND|wxLEFT, 50 )`. Both buttons are
|
||
wxEXPAND, so they stretch to the wider of the two rather than each taking
|
||
its own width. */
|
||
.ze-simprefs-btns {
|
||
display: flex;
|
||
flex-direction: column;
|
||
/* [data] the sizer's own wxLEFT. */
|
||
margin-left: 50px;
|
||
/* [data] `wxBOTTOM, 5` on the first and `wxTOP|wxBOTTOM, 5` on the second. */
|
||
gap: 10px;
|
||
}
|
||
|
||
/* ---- PANEL_SCH_DATA_SOURCES (eeschema/dialogs/panel_sch_data_sources.cpp:39-73)
|
||
No _base.cpp: the panel builds its own vertical box, and every border in it
|
||
is `FromDIP( 12 )`. The page holds no settings — it reads the Plugin and
|
||
Content Manager — so nothing here is disabled. */
|
||
.ze-datasources {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
}
|
||
.ze-datasources-desc {
|
||
/* [data] `Add( m_description, 0, wxALL|wxEXPAND, 12 )`. */
|
||
margin: 12px;
|
||
/* [data] `m_description->Wrap( FromDIP( 480 ) )`. */
|
||
max-width: 480px;
|
||
/* `SetFont( KIUI::GetInfoFont( this ) )` — the GUI font one point down. */
|
||
font-size: var(--ui-font-size-info);
|
||
}
|
||
.ze-datasources-list {
|
||
flex: 1;
|
||
overflow: auto;
|
||
/* [data] `Add( m_sourcesList, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 12 )`. */
|
||
margin: 0 12px 12px;
|
||
/* [data] `m_sourcesList->SetMinSize( FromDIP( wxSize( -1, 160 ) ) )`. */
|
||
min-height: 160px;
|
||
background: var(--chrome-bg2);
|
||
color: var(--view-fg);
|
||
border: 1px solid var(--ctl-border);
|
||
}
|
||
/* A wxListBox row, which GTK draws exactly as it draws a treeview one — so
|
||
this is `.ze-gridlist-row`'s padding, reached for the same reason and stated
|
||
once there. */
|
||
.ze-datasources-row {
|
||
/* [px] GtkCellRendererText's `ypad` of 2 above and below, and half of
|
||
`-GtkTreeView-horizontal-separator: 4` either side. */
|
||
padding: 2px;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-datasources-status {
|
||
/* [data] `Add( m_status, 0, wxLEFT|wxBOTTOM|wxEXPAND, 12 )`. */
|
||
margin: 0 0 12px 12px;
|
||
/* `KIUI::GetSmallInfoFont( this ).Italic()` — two points down, italic, and
|
||
no foreground of its own. */
|
||
font-size: var(--ui-font-size-small);
|
||
font-style: italic;
|
||
}
|
||
.ze-datasources-btnrow {
|
||
display: flex;
|
||
/* [data] `wxALIGN_RIGHT` on `m_manageButton`. */
|
||
justify-content: flex-end;
|
||
/* [data] its `wxRIGHT, 12`. */
|
||
margin-right: 12px;
|
||
}
|
||
|
||
/* ---- PANEL_TEMPLATE_FIELDNAMES (eeschema/dialogs/panel_template_fieldnames_base.cpp)
|
||
The Name / Visible / URL grid, on both the Preferences page and Schematic
|
||
Setup — one panel upstream, so one set of rules here.
|
||
|
||
`bPanelSizer` is vertical and full-bleed: the title `wxTOP|wxLEFT|wxEXPAND, 8`,
|
||
a 3 px spacer, `m_grid` at proportion 1 with `wxEXPAND|wxRIGHT, 5`, then the
|
||
button row `wxEXPAND|wxTOP, 3`. Measured against a live 10.0.5 page: the
|
||
header band runs x 660..1536 where the notebook page is 655..1541, which is
|
||
the same 5 px page inset the Colors page carries plus the grid's own wxRIGHT
|
||
and no wxLEFT at all. */
|
||
.ze-prefs-panel:has(> .ze-fieldnames) {
|
||
padding: 0;
|
||
}
|
||
.ze-fieldnames {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
/* [px] the notebook page's own inset, the same one Preferences > Colors
|
||
measures. */
|
||
padding-left: 5px;
|
||
}
|
||
/* `SetColLabelSize( wxGRID_AUTOSIZE )`, not the fixed 30 the design inspector
|
||
asks for: this header sizes to its own text, and the live page's band
|
||
measures 25 px. */
|
||
.ze-fieldnames .ze-grid th {
|
||
height: auto;
|
||
}
|
||
.ze-fieldnames > .ze-grid-btns {
|
||
/* [data] `Add( bSizer10, 0, wxEXPAND|wxTOP, 3 )` — this row's own 3, where
|
||
the shared rule carries another page's 6. */
|
||
margin-top: 3px;
|
||
}
|
||
|
||
.ze-fieldnames-gap {
|
||
/* [data] `bSizer10->Add( 20, 0, 0, wxEXPAND, 5 )`, the fixed gap before
|
||
Delete. */
|
||
width: 20px;
|
||
flex: 0 0 auto;
|
||
}
|
||
/* ---- HOTKEY_CYCLE_POPUP (common/dialogs/hotkey_cycle_popup.cpp) -------------
|
||
The panel that flashes when a single-stroke hotkey cycles a setting. Its
|
||
layout is EDA_VIEW_SWITCHER_BASE (common/dialogs/eda_view_switcher_base.cpp:
|
||
12-32): a vertical box sizer with the title added `wxALL|wxEXPAND, 5` and a
|
||
borderless wxListBox added `wxBOTTOM|wxLEFT|wxRIGHT, 5`, both of which are
|
||
--wx-border. Nothing here states a colour or a font: the frame IS .ze-modal,
|
||
which already holds the dialog face, border and shadow. */
|
||
.ze-hkcycle-layer {
|
||
/* `Centre()` after `Show( true )` (hotkey_cycle_popup.cpp:132-133) centres the
|
||
dialog on the frame that owns it, and this popup is the whole frame's, not
|
||
one pane's. */
|
||
position: fixed;
|
||
inset: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
/* wxSTAY_ON_TOP: above the canvas, below .ze-modal-backdrop's 200. */
|
||
z-index: 150; /* [art] */
|
||
/* `TryBefore` (hotkey_cycle_popup.cpp:139-150) hands every key it receives
|
||
straight to the canvas: this window is feedback, never a target. */
|
||
pointer-events: none;
|
||
}
|
||
.ze-modal.ze-hkcycle {
|
||
/* The base class's dialog style defaults to wxSTAY_ON_TOP ALONE
|
||
(eda_view_switcher_base.h:40), so the window manager draws no caption and
|
||
none of .ze-modal's title-bar geometry applies. */
|
||
border-radius: 0;
|
||
/* wxNORMAL_FONT, set explicitly on the title at
|
||
eda_view_switcher_base.cpp:21 and the wxListBox default besides. */
|
||
font-family: var(--ui-font-family);
|
||
font-size: var(--ui-font-size);
|
||
line-height: var(--ui-line-height);
|
||
}
|
||
.ze-hkcycle-title {
|
||
margin: var(--wx-border);
|
||
/* `Popup()` sizes the LIST BOX to `max( titleWidth, itemWidths ) +
|
||
LIST_BOX_H_PADDING` (hotkey_cycle_popup.cpp:83-94), so the title's own
|
||
width has to demand that same padding of the column while the text itself
|
||
still starts at the sizer's 5px border - which is what an end-padding does
|
||
and a symmetric one would not. */
|
||
padding-inline-end: var(--hkcycle-list-h-padding);
|
||
}
|
||
.ze-hkcycle-list {
|
||
margin: 0 var(--wx-border) var(--wx-border);
|
||
/* wxSYS_COLOUR_LISTBOX, and wxBORDER_NONE means no control border. */
|
||
background: var(--chrome-bg2);
|
||
/* `SetMinSize( width + LIST_BOX_H_PADDING, height + LIST_BOX_V_PADDING * 2 )`
|
||
(hotkey_cycle_popup.cpp:93-94) - the H padding is the total across both
|
||
edges, the V padding is per edge. */
|
||
padding: var(--hkcycle-list-v-padding) calc(var(--hkcycle-list-h-padding) / 2);
|
||
}
|
||
.ze-hkcycle-item {
|
||
/* `height += extents.y + LIST_BOX_V_PADDING` per item (`:90`): one line of
|
||
text plus the padding, which is the row pitch this list is measured at. */
|
||
line-height: calc(var(--ui-line-height) + var(--hkcycle-list-v-padding));
|
||
white-space: pre;
|
||
}
|
||
.ze-hkcycle-item.selected {
|
||
/* `SetSelection` on a wxListBox: wxSYS_COLOUR_HIGHLIGHT / _HIGHLIGHTTEXT. */
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
|
||
/* wxCheckListBox, once (`.ze-checklistbox`): a bordered scrolling list, added
|
||
at proportion 1 so it takes its box's height. Change Symbols' `m_fieldsBox`
|
||
and the board Print dialog's layer list are both this.
|
||
|
||
Its fill is wxSYS_COLOUR_LISTBOX, which is --chrome-bg2. It said --ctl-face
|
||
(#373737), the BUTTON face, which is 16 levels too light and made the list
|
||
read as raised where KiCad's is inset. Two independent measurements agree:
|
||
`qa/probes/change_symbols_probe.cpp` reports wxSYS_COLOUR_LISTBOX as
|
||
#272727 and the real wxTextCtrl beside it as the same #272727, and in
|
||
Akshay's side-by-side capture the list interior and an entry interior are
|
||
the same value while the dialog face is lighter than both.
|
||
(wxWindow::GetBackgroundColour on the wxCheckListBox itself answers with the
|
||
inherited dialog face, #2C2C2C — it reports what wx was told, not what GTK
|
||
paints, so it is not the number to take.) */
|
||
.ze-checklistbox {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
border: 1px solid var(--chrome-border);
|
||
background: var(--chrome-bg2);
|
||
}
|
||
|
||
/* `m_borderStyleCombo->Append( name, KiBitmapBundle( bitmap ) )` — the stroke
|
||
beside its name in a wxBitmapComboBox. Sized like the colour swatch it sits
|
||
in place of, since both are the second argument of the same Append. */
|
||
.ze-combo-bitmap {
|
||
flex: 0 0 auto;
|
||
/* The stroke bitmaps are WIDE: `viewBox="0 0 64 16"`, a 4:1 sample of the
|
||
line drawn across the cell. Squashing one into a square is what made ours
|
||
a short grey dash where KiCad shows a long stroke. Height comes from the
|
||
row and the width follows the ratio, so nothing here is a pixel count. */
|
||
aspect-ratio: 64 / 16;
|
||
height: 1em;
|
||
object-fit: contain;
|
||
}
|
||
/* `ZOOM_CORRECTION_CTRL` (`common/widgets/zoom_correction_ctrl.cpp:138-180`),
|
||
which is the whole of Preferences > Common's Scaling group. Two stacked
|
||
sizers, and the second is a HORIZONTAL one:
|
||
|
||
rulerSizer->Add( m_ruler, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, GetStdMargin() );
|
||
rulerSizer->Add( m_unitsChoice, 0, wxALIGN_CENTER_VERTICAL|…, GetStdMargin() );
|
||
|
||
so the ruler takes every pixel the units choice does not, and the choice
|
||
sits at its RIGHT. There was no rule here at all: the two children stacked,
|
||
which put `mm` under the ruler and left the ruler at whatever fixed width
|
||
the component asked for -- visibly shorter than KiCad's, which is why the
|
||
scale read smaller. */
|
||
.ze-zoomcorrection {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.ze-zoomcorrection-ruler {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [px] `KIUI::GetStdMargin()`, which is 5 on every platform but Mac
|
||
(`common/widgets/ui_common.cpp`). */
|
||
gap: 5px;
|
||
/* [data] the ruler sizer's own `wxTOP, KIUI::GetStdMargin()`. */
|
||
margin-top: 5px;
|
||
}
|
||
/* `ZOOM_CORRECTION_RULER( … FromDIP( wxSize( 200, 30 ) ) … )` then
|
||
`Add( m_ruler, 1, wxEXPAND )`: 200 px is the ruler's MINIMUM, and proportion
|
||
1 lets it grow into whatever the group has spare. The two are different
|
||
numbers and both matter — a ruler that reports its grown width as its own
|
||
size makes the dialog grow to fit it, which then gives it more width, which
|
||
is how this page reached the 1500 px cap with a 190 mm ruler on it. */
|
||
.ze-zoomcorrection-ruler > svg {
|
||
flex: 1 1 200px;
|
||
min-width: 200px;
|
||
}
|
||
/* `wxSpinCtrl`, which on GTK is a GtkSpinButton: the entry and its two stepper
|
||
buttons in one frame. [px] `qa/probes/spin_ctrl_probe.py` asks GTK for the
|
||
natural sizes -- 34 tall, and the pair of buttons 70 wide, so 35 each. */
|
||
.ze-spinctrl {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
/* The entry gives up its right-hand corners to the buttons, as the frame is
|
||
continuous in GTK — and it does NOT take `.ze-search`'s `width: 100%`, which
|
||
in a flex row would push the buttons off the end.
|
||
|
||
[px] 46: a GtkSpinButton's natural width is 116 with the two buttons taking
|
||
70 of it (`qa/probes/spin_ctrl_probe.py`), so 46 is the entry the theme
|
||
itself asks for. A caller that needs more says so, as the row it sits in
|
||
does. */
|
||
.ze-spinctrl > input {
|
||
width: 46px;
|
||
flex: none;
|
||
border-top-right-radius: 0;
|
||
border-bottom-right-radius: 0;
|
||
}
|
||
.ze-spinbtn {
|
||
box-sizing: border-box;
|
||
/* [px] 35 wide, measured; the height is the control height every entry and
|
||
button on the page already takes. */
|
||
width: 35px;
|
||
height: var(--ctl-height);
|
||
padding: 0;
|
||
background: var(--ctl-face);
|
||
border: 1px solid var(--ctl-border);
|
||
/* One continuous frame: the middle button shares its edges with both sides. */
|
||
border-left-width: 0;
|
||
color: inherit;
|
||
cursor: default;
|
||
font: inherit;
|
||
}
|
||
.ze-spinbtn:last-child {
|
||
border-top-right-radius: var(--ctl-radius);
|
||
border-bottom-right-radius: var(--ctl-radius);
|
||
}
|
||
/* The same hover face every other button on the page takes; a second value
|
||
here is how two buttons in one dialog end up hovering differently. */
|
||
.ze-spinbtn:hover:not(:disabled) {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-spinbtn:disabled {
|
||
background: var(--ctl-face-disabled);
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
Preferences > Footprint Editor — the four pages whose layout is not one of
|
||
the shared prefs shapes. Every number below is an `Add()` border, a
|
||
`SetColSize` or a spacer from the panel's own wxFormBuilder file; where a
|
||
value is a bare `[px]` it is one wxFormBuilder wrote and nothing derives.
|
||
--------------------------------------------------------------------------- */
|
||
|
||
/* `fgSizerCmdsWinLin = new wxFlexGridSizer( 0, 2, 8, 0 )`
|
||
(`pcbnew/dialogs/panel_edit_options_base.cpp:127-130`): two columns, an 8 px
|
||
vgap, no hgap of its own — the space between the two columns is each cell's
|
||
`wxRIGHT|wxLEFT, 5`. The label column is `max-content`, as a flex grid's
|
||
column 0 always is. */
|
||
.ze-fp-mousecmds {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content;
|
||
/* [data] the sizer's vgap 8, and 5 + 5 from the two cells' own borders. */
|
||
gap: 8px 10px;
|
||
/* [data] `Add( fgSizerCmdsWinLin, 1, wxEXPAND|wxTOP, 5 )`. */
|
||
padding-top: 5px;
|
||
}
|
||
.ze-fp-mousecmd {
|
||
display: contents;
|
||
}
|
||
|
||
/* `SetCellAlignment( row, col, wxALIGN_CENTER, wxALIGN_CENTER )` on a
|
||
`wxGridCellBoolRenderer` column — the Show column of Footprint Defaults and
|
||
the Italic column of Graphics Defaults are both that
|
||
(`panel_fp_editor_field_defaults.cpp:349-353`,
|
||
`panel_fp_editor_graphics_defaults.cpp:128-133`). */
|
||
td.ze-grid-bool {
|
||
text-align: center;
|
||
}
|
||
|
||
/* `disableCell( row, col )`: `SetReadOnly` plus
|
||
`SetCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_FRAMEBK ) )`
|
||
(`panel_fp_editor_graphics_defaults.cpp:98-104`).
|
||
|
||
The border goes with it, because a cell keeping its gridlines would still
|
||
read as a cell: the four dead cells of Edge Cuts and Courtyards are one
|
||
unbroken block on a live footprint editor. */
|
||
.ze-grid-disabled {
|
||
/* `wxSYS_COLOUR_FRAMEBK` **is** `wxSYS_COLOUR_BTNFACE` — they are the same
|
||
enumerator (`wx/settings.h:94`), so this is the colour the grid already
|
||
paints its labels with and not a second value. [px] the four dead cells of
|
||
Edge Cuts and Courtyards measure rgb(55,55,55) on the live footprint
|
||
editor, the same as the column-label band above them; `--chrome-bg` here
|
||
was the DIALOG's rgb(44,44,44), which read as a hole in the grid rather
|
||
than as a filled-in cell. */
|
||
background: var(--grid-label-bg);
|
||
border: none;
|
||
}
|
||
|
||
/* `PAGED_DIALOG::SetError`'s message (`common/widgets/paged_dialog.cpp`), which
|
||
upstream puts in an infobar across the top of the dialog. Ours is beside the
|
||
grid that raised it, so a page shown on its own still says which control is
|
||
wrong. */
|
||
.ze-prefs-error {
|
||
/* The shared token, never a literal: `--error-ink` is what every other error
|
||
line in the app takes. */
|
||
color: var(--error-ink);
|
||
/* `errorsMsg` is built with `\n` inside a message and `\n\n` between two of
|
||
them (`panel_fp_editor_graphics_defaults.cpp:204-275`); a KIDIALOG prints
|
||
those breaks, so this has to as well. */
|
||
white-space: pre-line;
|
||
/* [data] the same `wxLEFT, 8` the headings above it carry. */
|
||
padding: 4px 0 0 8px;
|
||
}
|
||
|
||
/* ---- Board Setup (DIALOG_BOARD_SETUP) --------------------------------------
|
||
|
||
NO FONT SIZES AND NO COLOURS IN THIS SECTION, for the reason the Preferences
|
||
block above states: a `PAGED_DIALOG`'s pages take the GUI font like every
|
||
other dialog, and none of pcbnew's `panel_setup_*.cpp` calls SetFont for a
|
||
size. Every rule here is a sizer border or a stated wx minimum.
|
||
|
||
These panels are otherwise built from `dialogs/prefs/widgets.tsx` — the same
|
||
`Group` / `Num` / `Sel` / `Check` every Preferences page uses — so their
|
||
spacing, their label columns and their controls come from `.ze-pref-*` and
|
||
are not restated here. */
|
||
|
||
/* PANEL_SETUP_TUNING_PATTERNS (`panel_setup_tuning_patterns_base.cpp`), three
|
||
times over — one group per meander kind, all from the same wxFormBuilder
|
||
block, so one set of rules. */
|
||
|
||
/* `wxHyperlinkCtrl` — the clickable text KiCad puts beside a heading ("Syntax
|
||
help" on Custom Rules, `panel_setup_rules_base.cpp:30`). One rule, because wx
|
||
has one control: the panels that grew their own `.ze-link` each picked a blue
|
||
that no GTK theme here produces, and picked a font size as well, where the
|
||
real control is the dialog's own font in the theme's link colour. */
|
||
/* wxStaticLine (common/wx/controls.tsx StaticLine): a GtkSeparator, whose
|
||
colour is the measured --gtk-separator - it darkens whatever it is drawn on. */
|
||
/* wxPanel. With wxBORDER_SIMPLE, the same one-pixel frame every wxBORDER_SIMPLE
|
||
here draws (.ze-bgjob-list, .ze-bgjob-panel); the panel sizes to its sizer. */
|
||
.ze-panel {
|
||
display: flex;
|
||
}
|
||
.ze-panel.border-simple,
|
||
.ze-simplebook.border-simple {
|
||
border: 1px solid var(--chrome-border);
|
||
}
|
||
/* GRID_CELL_COLOR_RENDERER at wxDefaultSize (common/widgets/grid_color_swatch_helpers.tsx):
|
||
the swatch fills the cell with the colour the cell holds. */
|
||
.ze-grid-color-cell {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
background: var(--swatch-color);
|
||
}
|
||
|
||
.ze-staticline {
|
||
height: 1px; /* [css] Yaru `separator { min-height: 1px }` */
|
||
background: var(--gtk-separator);
|
||
}
|
||
.ze-staticline.vertical {
|
||
height: auto;
|
||
width: 1px; /* [css] Yaru `separator { min-width: 1px }` */
|
||
align-self: stretch;
|
||
}
|
||
.ze-hyperlink {
|
||
background: none;
|
||
border: none;
|
||
padding: 0;
|
||
font: inherit;
|
||
color: var(--link-fg);
|
||
text-decoration: underline;
|
||
/* A GtkLinkButton keeps the arrow cursor, like every other KiCad control. */
|
||
cursor: default;
|
||
}
|
||
.ze-hyperlink:visited {
|
||
color: var(--link-visited-fg);
|
||
}
|
||
.ze-hyperlink:disabled {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
|
||
/* PANEL_SETUP_RULES (`pcbnew/dialogs/panel_setup_rules_base.cpp`): a title row
|
||
with the Syntax-help link at its right, then the rule editor. */
|
||
/* wxStyledTextCtrl with a line-number margin (external/wx/stc.tsx), the code-editor form. */
|
||
.ze-stc {
|
||
flex: 1;
|
||
display: flex;
|
||
border: 1px solid var(--chrome-border); /* [css] Yaru's `entry { border-width: 1px }`. */
|
||
border-radius: 3px; /* [css] the same rule's `border-radius`, which every field here takes. */
|
||
background: var(--field-bg);
|
||
overflow: hidden;
|
||
}
|
||
/* `SetMarginWidth( 0, TextWidth( wxSTC_STYLE_LINENUMBER, "_99999" ) )`: six characters. */
|
||
.ze-stc-margin {
|
||
flex: 0 0 auto;
|
||
box-sizing: content-box;
|
||
width: 6ch;
|
||
padding: 6px 4px; /* [css] the entry padding Yaru gives a text view; the margin is inside it. */
|
||
text-align: right;
|
||
color: var(--ctl-fg-disabled);
|
||
background: var(--chrome-bg);
|
||
border-right: 1px solid var(--chrome-border); /* [css] the 1px separator between margin and text. */
|
||
overflow: hidden;
|
||
user-select: none;
|
||
white-space: pre;
|
||
}
|
||
.ze-stc-text {
|
||
flex: 1;
|
||
border: none;
|
||
outline: none;
|
||
resize: none;
|
||
padding: 6px 8px; /* [css] the same entry padding on the text side. */
|
||
background: transparent;
|
||
color: var(--view-fg);
|
||
white-space: pre;
|
||
overflow: auto;
|
||
}
|
||
/* Scintilla: a fixed-pitch face and a 4-column tab. */
|
||
.ze-stc-margin,
|
||
.ze-stc-text {
|
||
font-family: monospace;
|
||
font-size: var(--ui-font-size);
|
||
line-height: var(--ui-line-height);
|
||
tab-size: 4;
|
||
}
|
||
|
||
/* PANEL_SETUP_TEARDROPS (`panel_setup_teardrops_base.cpp`), three groups from
|
||
one wxFormBuilder block, so one set of rules. */
|
||
|
||
/* PANEL_SETUP_DIMENSIONS, the lower half of the Defaults page
|
||
(`panel_setup_dimensions_base.cpp`). */
|
||
|
||
/* wxScrolledWindow (external/wx/scrolwin.tsx): no minimum of its own, so a sizer item holding
|
||
it shrinks to the space it is given and the window scrolls the rest. */
|
||
.ze-scrolledwindow {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
}
|
||
|
||
/* `GRID_CELL_TEXT_BUTTON`'s editor: the entry, and its button at the right. */
|
||
.ze-grid-textbtn {
|
||
display: flex;
|
||
align-items: stretch;
|
||
}
|
||
.ze-grid-textbtn .ze-grid-input {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.ze-grid-textbtn .ze-grid-cellbtn img {
|
||
width: 16px; /* [art] small_refresh.svg, KiCad's 16 px small_* bitmap. */
|
||
height: 16px; /* [art] small_refresh.svg, KiCad's 16 px small_* bitmap. */
|
||
}
|
||
|
||
/* PANEL_ASSIGN_COMPONENT_CLASSES + PANEL_COMPONENT_CLASS_ASSIGNMENT
|
||
(`panel_assign_component_classes_base.cpp`). */
|
||
.ze-compclass {
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* The heading row carries the Add button at its right, so it is the shared
|
||
group title plus a flex row — the rule under it is `.ze-pref-group-title`'s. */
|
||
.ze-compclass-title {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 8px; /* [data] the facing wxLEFT/wxRIGHT 4 of the two panels, met. */
|
||
}
|
||
.ze-compclass-list {
|
||
flex: 1;
|
||
min-height: 0;
|
||
overflow: auto;
|
||
}
|
||
.ze-compclass-empty {
|
||
height: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
/* One PANEL_COMPONENT_CLASS_ASSIGNMENT: a wxPanel with a border, holding the
|
||
class name, the match-mode radios and the condition rows. */
|
||
.ze-compclass-card {
|
||
border: 1px solid var(--chrome-border); /* [css] Yaru's `frame { border-width: 1px }` — the assignment panel's frame. */
|
||
border-radius: 4px; /* [css] the same frame's radius. */
|
||
background: var(--chrome-bg2);
|
||
padding: 10px; /* [data] the wxALL 5 on the panel's own sizer, doubled by its child rows' 5. */
|
||
margin-bottom: 10px; /* [data] the wxBOTTOM 5 each assignment Add() carries, plus the next one's wxTOP. */
|
||
}
|
||
.ze-compclass-row {
|
||
display: flex;
|
||
align-items: center;
|
||
/* [data] the wxLEFT/wxRIGHT 5 each control in these rows carries, meeting. */
|
||
gap: 8px;
|
||
margin: 5px 0; /* [data] the wxTOP|wxBOTTOM 5 of a row inside the assignment panel. */
|
||
}
|
||
.ze-compclass-name {
|
||
width: 180px; /* [px] the class-name entry's own width; upstream leaves it to the sizer. */
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-compclass-spacer {
|
||
flex: 1;
|
||
}
|
||
/* wxEXPAND on the condition's value control — it takes the rest of the row. */
|
||
.ze-compclass-grow {
|
||
flex: 1;
|
||
}
|
||
.ze-compclass-addcond {
|
||
margin-top: 4px; /* [data] the wxTOP 4 on the Add-condition button. */
|
||
}
|
||
|
||
/* PANEL_SETUP_BOARD_STACKUP (`panel_board_stackup_base.cpp` /
|
||
`panel_board_stackup.cpp`). */
|
||
/* [data] `Add( m_layerOffsetsGrid, 0, wxALL, 5 )` — the grid is added with
|
||
proportion 0, so it takes its own height and does not stretch. */
|
||
.ze-zone-layer-grid {
|
||
/* [data] that Add()'s `wxALL, 5`. */
|
||
margin: 5px;
|
||
align-self: flex-start;
|
||
overflow: auto;
|
||
}
|
||
/* The read-only layer cell: GRID_CELL_LAYER_RENDERER draws the swatch then the
|
||
name, so they sit on one line — and the space between them is arithmetic in
|
||
that renderer rather than a number anyone chose:
|
||
|
||
aDC.DrawBitmap( m_bitmap, rect.GetLeft() + 4, … );
|
||
rect.SetLeft( rect.GetLeft() + m_bitmap.GetWidth() + 8 );
|
||
(pcbnew/grid_layer_box_helpers.cpp)
|
||
|
||
The swatch starts 4 in and the text starts 8 past the swatch's own width, so
|
||
what is left between them is 8 - 4. */
|
||
.ze-zone-layer-name {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px; /* [data] that 8 minus that 4. */
|
||
}
|
||
|
||
.ze-stackup {
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
/* The Layer column's `wxStaticBitmap`, filled by `updateIconColor()` with a
|
||
`wxBitmap( m_colorIconsSize.x, m_colorIconsSize.y / 2 )`. That is the ICON
|
||
size (24 x 14) HALVED in height, so the swatch is a wide flat bar. This was
|
||
a 14 x 14 square, which is `m_colorSwatchesSize` — the size of the bitmaps
|
||
INSIDE the Color dropdown, a different widget. */
|
||
.ze-stackup-swatch {
|
||
display: inline-block;
|
||
width: 24px; /* [data] `m_colorIconsSize.x` (`panel_board_stackup.cpp:101`). */
|
||
height: 7px; /* [data] `m_colorIconsSize.y / 2` (`:1608`). */
|
||
}
|
||
|
||
/* PANEL_SETUP_CONSTRAINTS (`panel_setup_constraints_base.cpp`). No font size
|
||
and no colour: the one SetFont on the page is `m_stCircleToPolyWarning`'s
|
||
`KIUI::GetSmallInfoFont( this ).Italic()` (`panel_setup_constraints.cpp:74`),
|
||
which is `.ze-pref-hint`. */
|
||
|
||
/* A wxGrid's column labels do not scroll with its rows. */
|
||
.ze-sticky-head {
|
||
position: sticky;
|
||
top: 0;
|
||
}
|
||
/* `bSizerButtons->Add( 20, 0, 0, wxEXPAND )` — the gap that separates the
|
||
add/sort pair from the delete button in KiCad's grid button rows. */
|
||
.ze-gridbtn-gap {
|
||
width: 20px; /* [data] the 20 of `bSizerButtons->Add( 20, 0, 0, wxEXPAND )`. */
|
||
}
|
||
|
||
/* `GRID_CELL_CHOICE_EDITOR` — a wxChoice living inside a wxGrid cell
|
||
(`common/widgets/grid_combobox.cpp`). It is the shared combo, so its popup
|
||
and its entries are ours; only its BOX takes the cell's own geometry, the
|
||
same way `.ze-grid td .ze-grid-input` strips a text editor's frame. */
|
||
.ze-grid td .ze-combo.ze-grid-combo {
|
||
width: 100%;
|
||
min-width: 0;
|
||
height: auto;
|
||
border: none;
|
||
border-radius: 0;
|
||
background: transparent;
|
||
/* [data] the same `3px 6px` the in-cell text editor carries. */
|
||
padding: 3px 6px;
|
||
}
|
||
|
||
/* `m_importColorsButton`, at the right of the netclass grid's button row. */
|
||
.ze-nc-importcolors {
|
||
margin-left: 12px; /* [data] the import button's `wxLEFT, 12`. */
|
||
}
|
||
|
||
/* A `PAGED_DIALOG` page we have not built yet. Greyed the way GTK greys an
|
||
insensitive control — by colour, from the token — not by a picked hex, and at
|
||
the dialog's own font like every other page. */
|
||
.ze-paged-unimplemented {
|
||
padding: 16px; /* [data] the wxALL 16 a placeholder page's message carries. */
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
|
||
/* ---- Support chat (cross-origin iframe, see support/ChatWidget.tsx) -------
|
||
|
||
The frame is the whole viewport (above the status bar where a frame has
|
||
one), so Crisp lays out exactly as it does on the site: any narrower and it
|
||
renders for a phone. It is transparent, and a clip-path decides what takes
|
||
clicks - pointer events are not dispatched outside an element's clip - so
|
||
the app underneath keeps working: closed, only the bubble; open, the panel
|
||
and the close button under it.
|
||
|
||
The bubble's geometry is Crisp's default launcher as it renders on the
|
||
site, sampled off a 1905x1200 window: 54px, 24px in from the right, 20px
|
||
up from the bottom, so its centre is 51 / 47 from the corner. (The site's
|
||
own CSS asks for 34px; that selector matches nothing.) The handle in the
|
||
app that sits over it and the clip share these numbers with
|
||
ChatWidget.tsx. */
|
||
.ze-chat-frame {
|
||
position: fixed;
|
||
right: 0;
|
||
bottom: var(--statusbar-height);
|
||
width: 100vw;
|
||
height: calc(100vh - var(--statusbar-height));
|
||
border: 0;
|
||
color-scheme: normal;
|
||
background: transparent;
|
||
/* Closed: the bubble, and only the bubble. Its centre is 24 + 27 in from
|
||
the right and 20 + 27 up from the bottom; the circle is a little wider
|
||
than the bubble for its shadow. */
|
||
clip-path: circle(
|
||
30px at calc(100% - 51px) calc(100% - 47px)
|
||
); /* [px] Crisp's launcher as sampled */
|
||
/* Above the modal backdrop (200), so support is reachable from the sign-in
|
||
wall -- which is exactly where someone who cannot get in needs it -- but
|
||
below the loading overlay (300), which must not be clicked past. */
|
||
z-index: 210;
|
||
}
|
||
.ze-chat-frame.open {
|
||
/* The panel, its shadow, and the close button under it. */
|
||
clip-path: inset(
|
||
calc(100% - 860px) 0 0 calc(100% - 460px)
|
||
); /* [px] Crisp's open panel as sampled */
|
||
}
|
||
/* The drag handle: invisible, exactly over the bubble, in our origin. */
|
||
.ze-chat-handle {
|
||
position: fixed;
|
||
right: 24px; /* [px] Crisp's default launcher inset */
|
||
bottom: calc(20px + var(--statusbar-height)); /* [px] Crisp's default launcher inset, lifted */
|
||
width: 54px; /* [data] Crisp's launcher diameter */
|
||
height: 54px; /* [data] Crisp's launcher diameter */
|
||
border-radius: 50%;
|
||
cursor: grab;
|
||
touch-action: none;
|
||
z-index: 211;
|
||
}
|
||
.ze-chat-handle:active {
|
||
cursor: grabbing;
|
||
}
|
||
/* The bubble's close x, on its upper-right rim, always there. Ours; the chrome's own face,
|
||
border and ink, like every other popup surface. */
|
||
.ze-chat-close {
|
||
position: absolute;
|
||
top: -4px; /* [art] ours: the badge overlaps the bubble's rim; the chat has no KiCad counterpart */
|
||
right: -4px; /* [art] ours, the same overlap */
|
||
width: 18px; /* [art] ours: the badge disc */
|
||
height: 18px; /* [art] ours: the badge disc */
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border-radius: 50%;
|
||
border: 1px solid var(--chrome-border);
|
||
background: var(--chrome-bg);
|
||
color: var(--chrome-fg);
|
||
cursor: default;
|
||
}
|
||
|
||
/* Cross-tab presence badge (designer/src/sync/) — no upstream KiCad
|
||
counterpart, KiCad has no notion of another viewer on the same document.
|
||
Clickable: opens .ze-presence-panel below, listing who that is. */
|
||
.ze-presence-badge {
|
||
position: fixed;
|
||
top: 8px;
|
||
right: 8px;
|
||
z-index: 999;
|
||
padding: 4px 10px;
|
||
border-radius: 12px;
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
font: inherit;
|
||
/* The info size, not a literal. This file's own rule: a number the theme
|
||
decides is never restated here, and 12px is the GTK info size on one
|
||
machine at one scale rather than a value anybody chose. */
|
||
font-size: var(--ui-font-size-info);
|
||
border: none;
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* PresencePanel.tsx: the presence badge's own popup, same dismiss-on-outside-
|
||
click/blur behaviour as .ze-bgjob-list right above (no upstream KiCad
|
||
counterpart to match either, so no fixed size is dictated the way that
|
||
one's is — this sizes to its rows). Opens directly under the badge, which
|
||
is itself pinned to the same corner (top: 8px; right: 8px), so this needs
|
||
no dynamically-computed anchor the way BackgroundJobList's does.
|
||
Deliberately states no font-size of its own, unlike the badge above:
|
||
.ze-bgjob-list doesn't either, and ui_font_tokens.test.ts tracks every
|
||
literal one against a baseline that only ever goes down. */
|
||
.ze-presence-panel {
|
||
position: fixed;
|
||
top: 36px;
|
||
right: 8px;
|
||
z-index: 999;
|
||
min-width: 180px;
|
||
border: 1px solid var(--chrome-border);
|
||
background: var(--chrome-bg);
|
||
color: var(--chrome-fg);
|
||
border-radius: 6px;
|
||
padding: 4px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
}
|
||
.ze-presence-panel:focus {
|
||
outline: none;
|
||
}
|
||
.ze-presence-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 3px 6px;
|
||
border-radius: 4px;
|
||
}
|
||
.ze-presence-row:hover {
|
||
background: var(--chrome-hover);
|
||
}
|
||
.ze-presence-dot {
|
||
width: 8px;
|
||
height: 8px;
|
||
border-radius: 50%;
|
||
/* Set inline per row, from peerColor.ts — this is only the fallback if
|
||
that's ever omitted. */
|
||
background: var(--selection-bg);
|
||
flex: 0 0 auto;
|
||
}
|
||
.ze-presence-name {
|
||
flex: 1;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
.ze-presence-role {
|
||
color: var(--ctl-fg-disabled);
|
||
}
|
||
.ze-presence-role-select {
|
||
font: inherit;
|
||
background: var(--chrome-bg2);
|
||
color: var(--chrome-fg);
|
||
border: 1px solid var(--chrome-border);
|
||
border-radius: 3px;
|
||
}
|
||
|
||
/* ---------------------------------------------------------------------------
|
||
DIALOG_ITEMS_LIST (dialog_items_list.cpp), built by hand: message
|
||
`wxALL|wxEXPAND, 10`, the collapsible pane `wxALL|wxEXPAND, 10` at proportion
|
||
1, then the separated OK/Cancel sizer `wxEXPAND|wxALL, 10`. */
|
||
.ze-modal.ze-items-list .ze-modal-body.ze-items-list-body {
|
||
flex-direction: column;
|
||
padding: 0;
|
||
}
|
||
.ze-items-list-message {
|
||
margin: 10px; /* [data] `mainSizer->Add( m_message, 0, wxALL | wxEXPAND, 10 )`. */
|
||
}
|
||
.ze-items-list-pane {
|
||
margin: 10px; /* [data] `mainSizer->Add( m_collapsiblePane, 1, wxALL | wxEXPAND, 10 )`. */
|
||
flex: 1;
|
||
}
|
||
.ze-items-list-list {
|
||
margin: 5px; /* [data] `paneSizer->Add( m_listCtrl, 1, wxEXPAND | wxALL, 5 )`. */
|
||
width: 400px; /* [data] `wxSize( 400, 200 )`, the list's stated size. */
|
||
height: 200px; /* [data] same. */
|
||
}
|
||
.ze-modal-footer.ze-items-list-foot {
|
||
margin: 10px; /* [data] `mainSizer->Add( buttonsSizer, 0, wxEXPAND | wxALL, 10 )`. */
|
||
}
|
||
|
||
.ze-fp3d {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1;
|
||
min-height: calc(2 * 112px); /* [data] two panes of `SetMinimumPaneSize( 112 )`. */
|
||
}
|
||
/* wxDataViewCtrl (external/wx/dataview_ui.tsx): the window scrolls its rows; an icon-text cell
|
||
puts its icon before the text.
|
||
Its width is its slot's, never its rows': wxGTK reports a data view's best size as 48 x 48
|
||
whatever it holds, so a dialog fitted with an empty list keeps that width when DRC fills it
|
||
with long violations, and a row too long for the column is clipped (the text renderer's
|
||
ellipsize mode is NONE) - measured, qa/probes/drc_dataview_probe.cpp. Without the containment
|
||
the longest violation widened DRC Control past its frame. A stated SetMinSize (ERC's 640) still
|
||
holds. */
|
||
.ze-dataview-window {
|
||
overflow: auto;
|
||
min-height: 0;
|
||
contain: inline-size;
|
||
}
|
||
.ze-dataview {
|
||
outline: none;
|
||
}
|
||
.ze-dataview-icon {
|
||
display: inline-flex;
|
||
vertical-align: middle;
|
||
margin-right: 5px; /* [data] wxDataViewIconText's icon-to-text gap, GTK cell padding */
|
||
}
|
||
|
||
/* wxNotebook's image list: a page's image before its tab text. */
|
||
.ze-nb-tab-image {
|
||
display: inline-flex;
|
||
vertical-align: middle;
|
||
margin-right: 5px; /* [data] the tab's icon-to-label gap, GTK notebook */
|
||
}
|
||
|
||
/* GRID_CELL_STATUS_ICON_RENDERER (common/widgets/grid_icon_text_helpers.cpp): the icon centred. */
|
||
.ze-grid-status-cell {
|
||
display: flex;
|
||
justify-content: center;
|
||
}
|
||
.ze-grid-status-icon {
|
||
width: 16px; /* [px] `wxART_BUTTON`'s message-box icon. */
|
||
height: 16px; /* [px] the same icon, square. */
|
||
}
|
||
|
||
/* DIALOG_DESIGN_BLOCK_PROPERTIES (common/dialogs/dialog_design_block_properties_ui.tsx),
|
||
each border dialog_design_block_properties_base.cpp's Add(). */
|
||
.ze-dbprops-margins {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
margin: 0 5px; /* [data] Add( bMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ) */
|
||
}
|
||
.ze-dbprops-fields {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
margin: 5px 5px 0; /* [data] Add( sbFields, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ) */
|
||
}
|
||
.ze-dbprops-gridpane {
|
||
flex: 1 1 auto;
|
||
min-height: 120px; /* [px] the grid's natural height of a few rows */
|
||
margin: 0 5px 5px; /* [data] Add( m_fieldsGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ) */
|
||
}
|
||
.ze-dbprops-btns {
|
||
gap: 0; /* each button carries its own wxRIGHT, 5 */
|
||
margin: 0 0 5px 5px; /* [data] Add( bButtonSizer, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 ) */
|
||
}
|
||
.ze-dbprops-btns > * {
|
||
margin-right: 5px; /* [data] Add( m_bp*, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ) */
|
||
}
|
||
.ze-dbprops-btngap {
|
||
width: 20px; /* [data] bButtonSizer->Add( 20, 0, 0, wxEXPAND, 10 ) */
|
||
}
|
||
.ze-dbprops-props {
|
||
display: grid;
|
||
grid-template-columns: max-content 1fr; /* [data] wxFlexGridSizer( 0, 2, 5, 0 ) */
|
||
row-gap: 5px; /* [data] the flex grid's vgap */
|
||
align-items: center;
|
||
margin: 10px; /* [data] Add( fgProperties, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 ) */
|
||
}
|
||
.ze-dbprops-props > label {
|
||
margin-right: 5px; /* [data] Add( m_staticText*, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ) */
|
||
}
|
||
|
||
/* PANEL_DESIGN_BLOCK_CHOOSER (common/widgets/panel_design_block_chooser_ui.tsx):
|
||
the tree over the preview, a wxSplitterWindow split horizontally. */
|
||
.ze-dbchooser {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
}
|
||
.ze-dbchooser-tree {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
min-height: 20px; /* [data] m_vsplitter->SetMinimumPaneSize( 20 ) */
|
||
}
|
||
.ze-dbchooser-details {
|
||
display: flex;
|
||
min-height: 20px; /* [data] the same minimum pane size */
|
||
}
|
||
|
||
/* HK_PROMPT_DIALOG (common/widgets/widget_hotkey_list.cpp:87-135), the sizer tree in
|
||
widget_hotkey_list.tsx. Every border is one Add()'s. */
|
||
.ze-hkprompt {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.ze-hkprompt-inst {
|
||
text-align: center; /* [data] wxALIGN_CENTRE_HORIZONTAL */
|
||
margin: 10px; /* [data] mainSizer->Add( inst_label, 0, wxALL, 10 ) */
|
||
}
|
||
.ze-hkprompt-line {
|
||
margin: 2px; /* [data] Add( new wxStaticLine( this ), 0, wxALL | wxEXPAND, 2 ) */
|
||
}
|
||
.ze-hkprompt-current {
|
||
display: grid;
|
||
grid-template-columns: max-content max-content; /* [data] wxFlexGridSizer( 2 ) */
|
||
align-items: center;
|
||
margin: 5px; /* [data] Add( panelDisplayCurrent, 0, wxALL | wxEXPAND, 5 ) */
|
||
}
|
||
.ze-hkprompt-current > span {
|
||
margin: 5px; /* [data] each label: wxALL | wxALIGN_CENTRE_VERTICAL, 5 */
|
||
}
|
||
.ze-hkprompt-bold {
|
||
font-weight: bold; /* [data] SetFont( GetFont().Bold() ) */
|
||
}
|
||
.ze-hkprompt-reset {
|
||
align-self: center; /* [data] wxALIGN_CENTRE_HORIZONTAL */
|
||
margin: 5px; /* [data] Add( resetButton, 0, wxALL | wxALIGN_CENTRE_HORIZONTAL, 5 ) */
|
||
}
|
||
|
||
/* SYMBOL_PREVIEW_WIDGET (eeschema/widgets/symbol_preview_widget.cpp): m_preview fills the panel
|
||
(proportion 1, wxEXPAND); with a status panel, its text is centred between two stretch spacers.
|
||
Its colours are the canvas's, set inline from the colour theme. */
|
||
.ze-symbol-preview {
|
||
position: relative;
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
}
|
||
.ze-symbol-preview > canvas {
|
||
flex: 1 1 auto;
|
||
width: 100%;
|
||
height: 100%;
|
||
display: block;
|
||
}
|
||
.ze-symbol-preview-status {
|
||
flex: 1 1 auto;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
/* DIALOG_IMPORT_SYMBOL_SELECT's IMPORT_SYMBOL_LIST_STORE::GetAttrByRow: a derived symbol's name
|
||
in italics, as the symbol library tree draws one. */
|
||
.ze-dataview-italic {
|
||
font-style: italic;
|
||
}
|