|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
Named design tokens for the editor chrome (design doc 0054, Graphite). More...
#include "donner/editor/EditorTheme.h"
Public Member Functions | |
| css::RGBA | selectionRgba (uint8_t alpha=0xFF) const |
| The accent tinted to alpha (0-255) as a css::RGBA, for overlay stroke/fill draws that use Donner's css color type. | |
| void | applyToImGuiStyle (ImGuiStyle &style) const |
| Map these tokens onto an ImGuiStyle (colors + rounding / padding / spacing vars) and publish this theme as the process-wide active theme. Replaces ImGui::StyleColorsDark() at the editor's init site. | |
Static Public Member Functions | |
| static EditorTheme | Dark (Accent accent=Accent::SignalTeal) |
| Build the dark theme for the given accent (design doc 0054 palette). Defaults to the shipped SignalTeal (variant B). | |
| static const EditorTheme & | Active () |
| The process-wide active theme, published by applyToImGuiStyle so raw ImDrawList widgets read the same tokens without threading the struct through every call site. Defaults to Dark(SignalTeal) before any apply. | |
| static void | SetActive (const EditorTheme &theme) |
| Publish theme as the active theme (called by applyToImGuiStyle). | |
Public Attributes | |
| ImU32 | surfaceCanvas |
| #111215 artboard letterbox / deepest backdrop. | |
| ImU32 | surfaceSunken |
| #151619 scroll troughs, wells, inset regions. | |
| ImU32 | surfaceBase |
| #1B1D20 panels, sidebar, primary window bg. | |
| ImU32 | surfaceRaised |
| #24272B toolbar, menu bar, titlebars, field idle. | |
| ImU32 | surfaceOverlay |
| #2B2F34 popovers, dropdowns, tooltips, chips. | |
| ImU32 | surfaceHover |
| #343940 row / button hover. | |
| ImU32 | surfaceActive |
| #3C424A pressed / selected row background. | |
| ImU32 | borderSubtle |
| #30343A hairline dividers, panel edges. | |
| ImU32 | borderStrong |
| #464C55 field outlines, focused container. | |
| ImU32 | textPrimary |
| #F1F2F4 body text, values (AAA). | |
| ImU32 | textMuted |
| #A8ADB5 secondary labels, meta (AA). | |
| ImU32 | textDisabled |
| #656B74 disabled controls only (intentionally sub-AA). | |
| ImU32 | accentActive |
| Darker, pressed. | |
| ImU32 | accentDefault |
| Base accent (foreground icons, focus ring, links). | |
| ImU32 | accentHover |
| Lighter, hover. | |
| ImU32 | accentInk |
| #111215 dark ink for labels ON accent fills. | |
| ImU32 | selectionStroke |
| = accentDefault, opaque; marquee / handle stroke. | |
| float | selectionFillAlpha |
| 0.22 fill alpha (accent-at-22%, not solid fill). | |
| ImU32 | warning |
| #E3B341 amber: promote-refused, over-budget frames. | |
| ImU32 | destructive |
| #F0616A red: delete, errors, stalls. | |
| ImU32 | success |
| #3FB984 green: committed / in-budget. | |
| float | space1 {4.0f} |
| float | space2 {8.0f} |
| float | space3 {12.0f} |
| float | space4 {16.0f} |
| float | space6 {24.0f} |
| float | space8 {32.0f} |
| float | radiusControl {4.0f} |
| Buttons, fields, toggles, swatches, chips. | |
| float | radiusContainer {6.0f} |
| Panels, cards, popovers, tooltips. | |
| float | toolButtonSize {32.0f} |
| float | treeRowHeight {24.0f} |
| float | scrollbarSize {12.0f} |
| css::RGBA | accentColor |
| The overlay/selection chrome draws through Donner's own css::Color path, not ImGui packing, so it reads the accent from here rather than unpacking selectionStroke. | |
Named design tokens for the editor chrome (design doc 0054, Graphite).