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.
Loading...
Searching...
No Matches
EditorTheme.h File Reference

Donner editor design language (design doc 0054): a single source of truth for the editor chrome's palette, spacing grid, rounding, and control metrics. Replaces the scattered color literals and ad-hoc PushStyleVar values that previously lived per-widget across the editor tree. More...

Include dependency graph for EditorTheme.h:

Classes

struct  donner::editor::EditorTheme
 Named design tokens for the editor chrome (design doc 0054, Graphite). More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Enumerations

enum class  donner::editor::Accent {
  AzimuthBlue ,
  SignalTeal ,
  UltraViolet
}
 Accent hue variants from design doc 0054. The editor ships SignalTeal (operator-approved variant B); the others are retained so the token table and its tests cover every accent and a future re-tint is a one-line change. More...

Functions

ImU32 donner::editor::WithAlpha (ImU32 color, uint8_t alpha)
 Returns color with its alpha channel replaced by alpha (ImGui packing). Lets raw ImDrawList chrome reuse an opaque theme token at reduced opacity (e.g. translucent scrollbar rails and info chips).

Variables

constexpr int donner::editor::kAccentCount = 3
 Number of Accent values, for token-completeness tests and iteration.

Detailed Description

Donner editor design language (design doc 0054): a single source of truth for the editor chrome's palette, spacing grid, rounding, and control metrics. Replaces the scattered color literals and ad-hoc PushStyleVar values that previously lived per-widget across the editor tree.

The tokens are ImGui-packed ImU32 (built with IM_COL32) so both the central ImGuiStyle and the raw ImDrawList draws (overlay chrome, toolbar selection, chips) read the same values. Metrics are logical px; callers multiply by displayScale exactly as they did before.

Enumeration Type Documentation

◆ Accent

enum class donner::editor::Accent
strong

Accent hue variants from design doc 0054. The editor ships SignalTeal (operator-approved variant B); the others are retained so the token table and its tests cover every accent and a future re-tint is a one-line change.

Enumerator
AzimuthBlue 

Variant A: #4C8DF6, classic / calm.

SignalTeal 

Variant B: #31C6B3, highest contrast (shipped default).

UltraViolet 

Variant C: #9A7CF7, warmer / creative.