204 lines
8.6 KiB
CSS
204 lines
8.6 KiB
CSS
/* SPDX-License-Identifier: GPL-3.0-or-later
|
|
Copyright (C) 2026 ZiroEDA and contributors.
|
|
Portions derived from KiCad, copyright The KiCad Developers. See NOTICE.md.
|
|
|
|
APPEARANCE_CONTROLS' own chrome — the metrics that live in
|
|
`pcbnew/widgets/appearance_controls.cpp`'s createControls() and in
|
|
`appearance_controls_base.cpp`'s sizers, rather than in the GTK theme.
|
|
|
|
The widget owns this file so the numbers sit beside the component that draws
|
|
them. It states ONLY what is this widget's own; every colour, font and
|
|
control metric still comes from the shared tokens in `ui/shell.css`, which
|
|
also carries the row rules (.ze-layer-row, .ze-object-row, .ze-collapsepane,
|
|
.ze-appearance-bottom …) these selectors sit on top of. Nothing here
|
|
restates a property those rules already set — a local restatement at higher
|
|
specificity is how a shared fix stops arriving.
|
|
|
|
Every rule below is a sizer flag, which is a number KiCad writes itself, so
|
|
each is cited to the Add() call it comes from. */
|
|
|
|
/* m_sizerOuter is a vertical box: the notebook takes proportion 1 and the
|
|
presets/viewports block proportion 0 (appearance_controls_base.cpp:174-192).
|
|
The pane's height is the AUI dock's; the notebook body is what scrolls. */
|
|
.ze-appearance {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* The wxNotebook: `m_sizerOuter->Add( m_notebook, 1, wxEXPAND|wxTOP|wxBOTTOM,
|
|
5 )` (appearance_controls_base.cpp:153). wxTOP|wxBOTTOM and no wxLEFT or
|
|
wxRIGHT, which is why the frame sits 5px under the caption and runs to the
|
|
pane's own left and right edges - [px] pcbnew 1920x1200, pane x 1671..1919:
|
|
the frame's #181818 at x=1671 and x=1919 on every row, and its top edge at
|
|
y=193 with 5px of pane face above it.
|
|
|
|
`.ze-nb-frame` is the shared notebook box, the same one PANEL_SYMBOL_PROPS
|
|
takes; only this widget's sizer border is stated here. */
|
|
.ze-appearance > .ze-nb-frame {
|
|
/* [data] wxTOP|wxBOTTOM, 5 (appearance_controls_base.cpp:153). */
|
|
margin: 5px 0;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* The notebook PAGE. Painted on the pane instead, `m_layerPanelColour` flooded
|
|
the tab strip, the Presets block and the Selection Filter with the list grey.
|
|
It belongs to one page: `m_windowLayers->SetBackgroundColour(
|
|
m_layerPanelColour )` and a loop over `m_layersOuterSizer`'s children
|
|
(appearance_controls.cpp:1242-1248). `m_windowObjects` is not in that
|
|
function at all, so the Objects page - and the Nets page with it - keeps the
|
|
notebook page's own background. [px] pcbnew: #4b4b4b behind a layer row,
|
|
#272727 behind an object row. */
|
|
.ze-appearance > .ze-nb-frame > .ze-appearance-page {
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
overflow: auto;
|
|
}
|
|
.ze-appearance > .ze-nb-frame > .page-layers {
|
|
background: var(--panel-list-bg);
|
|
}
|
|
.ze-appearance > .ze-nb-frame > .page-objects,
|
|
.ze-appearance > .ze-nb-frame > .page-nets {
|
|
background: var(--panel-bg);
|
|
}
|
|
/* The Nets page is not one scroller: it is `m_netsTabSplitter`, two panels
|
|
that each scroll inside their own half (appearance_controls_base.cpp:49-144).
|
|
Left as one, a board's 220 nets pushed Net Classes off the bottom. */
|
|
.ze-appearance > .ze-nb-frame > .page-nets {
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.ze-appearance > .ze-nb-frame > .ze-collapsepane,
|
|
.ze-appearance > .ze-appearance-bottom {
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
/* WX_COLLAPSIBLE_PANE, and it is inside the notebook: `new WX_COLLAPSIBLE_PANE(
|
|
m_panelLayers, ... )` with
|
|
`SetBackgroundColour( m_notebook->GetThemeBackgroundColour() )`
|
|
(appearance_controls.cpp:625-629). [px] that theme background reads #272727,
|
|
a step DARKER than both the list above it and the pane below - the strip at
|
|
y 809..833 between the list ending at 808 and the notebook's bottom edge at
|
|
834. It inherited the list grey here. */
|
|
.ze-appearance > .ze-nb-frame > .ze-collapsepane {
|
|
background: var(--panel-bg);
|
|
}
|
|
|
|
/* The three-radio rows: "Inactive layers", "Net colors" and "Ratsnest
|
|
display". Each is a horizontal wxBoxSizer built the same way
|
|
(appearance_controls.cpp:648-674, :726-792):
|
|
|
|
sizer->Add( first, 0, wxRIGHT, 5 ); sizer->AddStretchSpacer();
|
|
sizer->Add( second, 0, wxRIGHT, 5 ); sizer->AddStretchSpacer();
|
|
sizer->Add( third, 0, 0, 5 ); sizer->AddStretchSpacer();
|
|
|
|
Note the THIRD stretch spacer, after the last radio. The free space is split
|
|
three ways, one third of it trailing "Hide"/"None" — so this is not
|
|
`space-between` over three items, which leaves nothing after the last. The
|
|
::after below is that trailing spacer; with it, space-between divides the
|
|
free space into the three equal gaps the sizer does. Ours was a bare
|
|
`justifyContent: space-between` written inline, which pushed the last radio
|
|
hard against the right edge. */
|
|
.ze-appearance .ze-radio-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.ze-appearance .ze-radio-row::after {
|
|
content: "";
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
/* The third radio adds no border of its own. */
|
|
.ze-appearance .ze-radio-row > label:not(:last-of-type) {
|
|
/* [data] wxRIGHT, 5 (appearance_controls.cpp:657, :667). */
|
|
margin-right: 5px;
|
|
}
|
|
|
|
/* The two net rows are added with wxBOTTOM (:750, :792); the contrast row is
|
|
added `wxEXPAND, 5` with no wxBOTTOM at all (:674), so it gets none. */
|
|
.ze-appearance .ze-radio-gap {
|
|
/* [data] wxBOTTOM, 5 (appearance_controls.cpp:750, :792). */
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
/* wxLEFT, 2 on the captions that carry it: m_txtNetDisplayTitle and
|
|
m_txtRatsnestVisibility (appearance_controls.cpp:723, :765) and
|
|
m_presetsLabel / m_viewportsLabel (appearance_controls_base.cpp:150, :168).
|
|
m_inactiveLayersLabel is added wxEXPAND|wxBOTTOM only (:646) and so is left
|
|
alone — which is why this is a class and not a descendant rule. */
|
|
.ze-appearance .ze-inset {
|
|
/* [data] wxLEFT, 2 (appearance_controls.cpp:723, :765;
|
|
appearance_controls_base.cpp:150, :168). */
|
|
margin-left: 2px;
|
|
}
|
|
|
|
/* The spacer between the presets group and the viewports group. */
|
|
.ze-appearance .ze-appearance-bottom > .ze-viewports-label {
|
|
/* [data] bBottomMargin->Add( 0, 2, 0, wxEXPAND, 5 )
|
|
(appearance_controls_base.cpp:157). */
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* The wxStaticLine above the checkbox carries its own wxTOP of 4 through
|
|
.ze-hr, so only the checkbox's border is stated here. */
|
|
.ze-appearance .ze-collapse-body > label {
|
|
/* [data] layerDisplayOptionsSizer->Add( m_cbFlipBoard, 0,
|
|
wxTOP | wxBOTTOM, 3 ) (appearance_controls.cpp:682). */
|
|
margin: 3px 0;
|
|
}
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
APPEARANCE_CONTROLS_3D (3d-viewer/dialogs/appearance_controls_3D_base.cpp),
|
|
the 3D viewer's pane. It has no notebook: m_panelLayers is the scrolled row
|
|
list with the two checkboxes under it, then bBottomMargin. Only the sizer
|
|
flags are stated here; the row, eye, swatch, choice and info-font rules are
|
|
the ones the PCB pane's rows already take. */
|
|
.ze-appearance-3d-layers {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
}
|
|
/* m_panelLayersSizer->Add( m_windowLayers, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
|
the sizer inside it opens with AddSpacer( 5 ) and each row is wxLEFT|wxRIGHT 5
|
|
with a 2px spacer after. */
|
|
.ze-appearance-3d-rows {
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
overflow: auto;
|
|
/* [data] wxLEFT|wxRIGHT|wxTOP, 5 (appearance_controls_3D_base.cpp:22). */
|
|
margin: 5px 5px 0;
|
|
/* [data] m_layersOuterSizer->AddSpacer( 5 ) (appearance_controls_3D.cpp:558). */
|
|
padding: 5px 0 0;
|
|
}
|
|
.ze-appearance-3d-rows > .ze-layer-row {
|
|
/* [data] sizer->AddSpacer( 5 ) either side of a row (appearance_controls_3D.cpp:607,
|
|
:648) and m_layersOuterSizer->AddSpacer( 2 ) after it (:652). */
|
|
margin: 0 5px 2px;
|
|
}
|
|
/* RR(): m_layersOuterSizer->AddSpacer( m_pointSize ) — the GUI font's point
|
|
size, 11 (the PCB pane's .ze-object-sep is the same number halved). */
|
|
.ze-appearance-3d-sep {
|
|
/* [data] m_pointSize, the GUI font's point size (appearance_controls_3D.cpp:662). */
|
|
height: 11px;
|
|
flex: 0 0 auto;
|
|
}
|
|
/* sizer->AddSpacer( swatchWidth ): a swatch-wide gap where a row has no
|
|
colour, or no eye (the two background rows). */
|
|
.ze-appearance-3d-swatch-gap {
|
|
visibility: hidden;
|
|
}
|
|
/* bBottomMargin opens with a wxStaticLine, wxBOTTOM|wxLEFT|wxRIGHT 3
|
|
(_base.cpp:34), which the PCB pane's block does not have — there the line is
|
|
the notebook's own edge. A wxStaticLine is a GtkSeparator. */
|
|
.ze-appearance-3d-bottom {
|
|
border-top: 1px solid var(--gtk-separator);
|
|
/* [data] wxBOTTOM|wxLEFT|wxRIGHT, 3 (appearance_controls_3D_base.cpp:34), and the
|
|
2px spacer that closes the last row above it (appearance_controls_3D.cpp:652). */
|
|
margin: 2px 3px 0;
|
|
}
|