载入中...
搜索中...
未找到
UiThemeTokens.cpp
浏览该文件的文档.
2
3#include <cmath>
4#include <cstring>
5#include <utility>
6
7namespace eve::ui_editing {
8namespace {
9
10EditorDiagnostic tokenDiagnostic(const char* rule, std::string message) {
12 DiagnosticSeverity::Error, std::move(message));
13}
14
15struct ColorTok {
16 const char* path;
17 float (ui::Theme::*member)[4];
18};
19
20struct FloatTok {
21 const char* path;
22 float ui::Theme::* member;
23 float minimum;
24 float maximum;
25 const char* category;
26};
27
28struct LayoutTok {
29 const char* path;
30 float ui::ThemeLayout::* member;
31 float minimum;
32 float maximum;
33};
34
35const ColorTok kColors[] = {
36 {"color.text", &ui::Theme::text},
37 {"color.textDisabled", &ui::Theme::textDisabled},
38 {"color.windowBg", &ui::Theme::windowBg},
39 {"color.childBg", &ui::Theme::childBg},
40 {"color.popupBg", &ui::Theme::popupBg},
41 {"color.border", &ui::Theme::border},
42 {"color.borderShadow", &ui::Theme::borderShadow},
43 {"color.frameBg", &ui::Theme::frameBg},
44 {"color.frameBgHovered", &ui::Theme::frameBgHovered},
45 {"color.frameBgActive", &ui::Theme::frameBgActive},
46 {"color.titleBg", &ui::Theme::titleBg},
47 {"color.titleBgActive", &ui::Theme::titleBgActive},
48 {"color.titleBgCollapsed", &ui::Theme::titleBgCollapsed},
49 {"color.menuBarBg", &ui::Theme::menuBarBg},
50 {"color.button", &ui::Theme::button},
51 {"color.buttonHovered", &ui::Theme::buttonHovered},
52 {"color.buttonActive", &ui::Theme::buttonActive},
53 {"color.header", &ui::Theme::header},
54 {"color.headerHovered", &ui::Theme::headerHovered},
55 {"color.headerActive", &ui::Theme::headerActive},
56 {"color.checkMark", &ui::Theme::checkMark},
57 {"color.sliderGrab", &ui::Theme::sliderGrab},
58 {"color.sliderGrabActive", &ui::Theme::sliderGrabActive},
59 {"color.separator", &ui::Theme::separator},
60 {"color.scrollbarBg", &ui::Theme::scrollbarBg},
61 {"color.scrollbarGrab", &ui::Theme::scrollbarGrab},
62 {"color.scrollbarGrabHovered", &ui::Theme::scrollbarGrabHovered},
63 {"color.scrollbarGrabActive", &ui::Theme::scrollbarGrabActive},
64 {"color.tab", &ui::Theme::tab},
65 {"color.tabHovered", &ui::Theme::tabHovered},
66 {"color.tabActive", &ui::Theme::tabActive},
67 {"color.tabUnfocused", &ui::Theme::tabUnfocused},
68 {"color.tabUnfocusedActive", &ui::Theme::tabUnfocusedActive},
69 {"color.tableHeaderBg", &ui::Theme::tableHeaderBg},
70 {"color.tableBorderStrong", &ui::Theme::tableBorderStrong},
71 {"color.tableBorderLight", &ui::Theme::tableBorderLight},
72 {"color.tableRowBg", &ui::Theme::tableRowBg},
73 {"color.tableRowBgAlt", &ui::Theme::tableRowBgAlt},
74 {"color.plotLines", &ui::Theme::plotLines},
75 {"color.plotLinesHovered", &ui::Theme::plotLinesHovered},
76 {"color.plotHistogram", &ui::Theme::plotHistogram},
77 {"color.plotHistogramHovered", &ui::Theme::plotHistogramHovered},
78 {"color.textSelectedBg", &ui::Theme::textSelectedBg},
79 {"color.navHighlight", &ui::Theme::navHighlight},
80 {"color.modalDimBg", &ui::Theme::modalDimBg},
81};
82
83const FloatTok kFloats[] = {
84 {"geometry.windowRounding", &ui::Theme::windowRounding, 0.f, 24.f, "Geometry"},
85 {"geometry.childRounding", &ui::Theme::childRounding, 0.f, 24.f, "Geometry"},
86 {"geometry.frameRounding", &ui::Theme::frameRounding, 0.f, 24.f, "Geometry"},
87 {"geometry.popupRounding", &ui::Theme::popupRounding, 0.f, 24.f, "Geometry"},
88 {"geometry.scrollbarRounding", &ui::Theme::scrollbarRounding, 0.f, 24.f, "Geometry"},
89 {"geometry.grabRounding", &ui::Theme::grabRounding, 0.f, 24.f, "Geometry"},
90 {"geometry.tabRounding", &ui::Theme::tabRounding, 0.f, 24.f, "Geometry"},
91 {"geometry.windowBorderSize", &ui::Theme::windowBorderSize, 0.f, 8.f, "Geometry"},
92 {"geometry.childBorderSize", &ui::Theme::childBorderSize, 0.f, 8.f, "Geometry"},
93 {"geometry.popupBorderSize", &ui::Theme::popupBorderSize, 0.f, 8.f, "Geometry"},
94 {"geometry.frameBorderSize", &ui::Theme::frameBorderSize, 0.f, 8.f, "Geometry"},
95 {"spacing.windowPaddingX", &ui::Theme::windowPaddingX, 0.f, 64.f, "Spacing"},
96 {"spacing.windowPaddingY", &ui::Theme::windowPaddingY, 0.f, 64.f, "Spacing"},
97 {"spacing.framePaddingX", &ui::Theme::framePaddingX, 0.f, 64.f, "Spacing"},
98 {"spacing.framePaddingY", &ui::Theme::framePaddingY, 0.f, 64.f, "Spacing"},
99 {"spacing.itemSpacingX", &ui::Theme::itemSpacingX, 0.f, 64.f, "Spacing"},
100 {"spacing.itemSpacingY", &ui::Theme::itemSpacingY, 0.f, 64.f, "Spacing"},
101 {"spacing.itemInnerSpacingX", &ui::Theme::itemInnerSpacingX, 0.f, 64.f, "Spacing"},
102 {"spacing.itemInnerSpacingY", &ui::Theme::itemInnerSpacingY, 0.f, 64.f, "Spacing"},
103 {"spacing.cellPaddingX", &ui::Theme::cellPaddingX, 0.f, 64.f, "Spacing"},
104 {"spacing.cellPaddingY", &ui::Theme::cellPaddingY, 0.f, 64.f, "Spacing"},
105 {"spacing.indentSpacing", &ui::Theme::indentSpacing, 0.f, 64.f, "Spacing"},
106 {"spacing.scrollbarSize", &ui::Theme::scrollbarSize, 1.f, 64.f, "Spacing"},
107 {"spacing.grabMinSize", &ui::Theme::grabMinSize, 1.f, 64.f, "Spacing"},
108 {"typography.fontScale", &ui::Theme::fontScale, 0.25f, 4.f, "Typography"},
109};
110
111const LayoutTok kLayout[] = {
112 {"layout.toolbarHeight", &ui::ThemeLayout::toolbarHeight, 16.f, 128.f},
113 {"layout.statusBarHeight", &ui::ThemeLayout::statusBarHeight, 16.f, 128.f},
114 {"layout.sidebarWidth", &ui::ThemeLayout::sidebarWidth, 80.f, 640.f},
115 {"layout.toolboxCellSize", &ui::ThemeLayout::toolboxCellSize, 16.f, 128.f},
116 {"layout.splitterSize", &ui::ThemeLayout::splitterSize, 2.f, 24.f},
117 {"layout.minPaneSize", &ui::ThemeLayout::minPaneSize, 32.f, 640.f},
118 {"layout.panelPaddingX", &ui::ThemeLayout::panelPaddingX, 0.f, 64.f},
119 {"layout.panelPaddingY", &ui::ThemeLayout::panelPaddingY, 0.f, 64.f},
120 {"layout.cardPaddingX", &ui::ThemeLayout::cardPaddingX, 0.f, 64.f},
121 {"layout.cardPaddingY", &ui::ThemeLayout::cardPaddingY, 0.f, 64.f},
122 {"layout.barPaddingX", &ui::ThemeLayout::barPaddingX, 0.f, 64.f},
123 {"layout.barPaddingY", &ui::ThemeLayout::barPaddingY, 0.f, 64.f},
124 {"layout.sectionSpacingY", &ui::ThemeLayout::sectionSpacingY, 0.f, 64.f},
125 {"layout.searchMinWidth", &ui::ThemeLayout::searchMinWidth, 32.f, 640.f},
126 {"layout.searchIconGap", &ui::ThemeLayout::searchIconGap, 0.f, 32.f},
127};
128
129const EditorValue* field(const EditorValue& value, const char* key) {
130 const auto* object = value.getIf<EditorValue::Object>();
131 if (!object) return nullptr;
132 const auto found = object->find(key);
133 return found == object->end() ? nullptr : &found->second;
134}
135
136bool readColor(const EditorValue& value, float dest[4]) {
137 const auto* array = value.getIf<EditorValue::Array>();
138 if (!array || array->size() < 4) return false;
139 for (int i = 0; i < 4; ++i) {
140 const auto* number = (*array)[static_cast<std::size_t>(i)].getIf<double>();
141 if (!number || !std::isfinite(*number) || *number < 0.0 || *number > 1.0) return false;
142 dest[i] = static_cast<float>(*number);
143 }
144 return true;
145}
146
147EditorValue colorValue(const float src[4]) {
148 return EditorValue::Array{static_cast<double>(src[0]), static_cast<double>(src[1]), static_cast<double>(src[2]),
149 static_cast<double>(src[3])};
150}
151
152PropertyDescriptor colorProperty(const char* path) {
155 descriptor.displayNameKey = path;
156 descriptor.category = "Colors";
157 descriptor.type = PropertyType::Color;
158 descriptor.flags = PropertyFlag::Runtime;
159 descriptor.numeric.minimum = 0.0;
160 descriptor.numeric.maximum = 1.0;
161 descriptor.defaultValue = EditorValue::Array{1.0, 1.0, 1.0, 1.0};
162 return descriptor;
163}
164
165PropertyDescriptor floatProperty(const FloatTok& token) {
168 descriptor.displayNameKey = token.path;
169 descriptor.category = token.category;
170 descriptor.type = PropertyType::Float;
171 descriptor.flags = PropertyFlag::Runtime;
172 descriptor.numeric.minimum = token.minimum;
173 descriptor.numeric.maximum = token.maximum;
174 descriptor.defaultValue = static_cast<double>(token.minimum);
175 return descriptor;
176}
177
178PropertyDescriptor layoutProperty(const LayoutTok& token) {
181 descriptor.displayNameKey = token.path;
182 descriptor.category = "Layout";
183 descriptor.type = PropertyType::Float;
184 descriptor.flags = PropertyFlag::Runtime;
185 descriptor.numeric.minimum = token.minimum;
186 descriptor.numeric.maximum = token.maximum;
187 descriptor.defaultValue = static_cast<double>(token.minimum);
188 return descriptor;
189}
190
191bool inRange(float value, float minimum, float maximum) {
192 return std::isfinite(value) && value >= minimum && value <= maximum;
193}
194
195} // namespace
196
199 for (const ColorTok& token : kColors) object[token.path] = colorValue(theme.*(token.member));
200 for (const FloatTok& token : kFloats)
201 object[token.path] = static_cast<double>(theme.*(token.member));
202 for (const LayoutTok& token : kLayout)
203 object[token.path] = static_cast<double>(theme.layout.*(token.member));
204 object["nav.keyboard"] = theme.navEnableKeyboard;
205 object["nav.gamepad"] = theme.navEnableGamepad;
206 return EditorValue(std::move(object));
207}
208
210 if (!value.getIf<EditorValue::Object>())
211 return eve::editing::failed<ui::Theme>(EditorStatus::Rejected, RuleId("editor.ui-theme.tokens"),
212 "Theme tokens must be an object");
214 for (const ColorTok& token : kColors) {
215 const EditorValue* entry = field(value, token.path);
216 if (!entry || !readColor(*entry, theme.*(token.member)))
217 return eve::editing::failed<ui::Theme>(EditorStatus::Rejected, RuleId("editor.ui-theme.color"),
218 std::string("Theme color is missing or invalid: ") + token.path);
219 }
220 for (const FloatTok& token : kFloats) {
221 const EditorValue* entry = field(value, token.path);
222 const auto* number = entry ? entry->getIf<double>() : nullptr;
223 if (!number || !std::isfinite(*number))
224 return eve::editing::failed<ui::Theme>(EditorStatus::Rejected, RuleId("editor.ui-theme.float"),
225 std::string("Theme number is missing or invalid: ") + token.path);
226 theme.*(token.member) = static_cast<float>(*number);
227 }
228 for (const LayoutTok& token : kLayout) {
229 const EditorValue* entry = field(value, token.path);
230 const auto* number = entry ? entry->getIf<double>() : nullptr;
231 if (!number || !std::isfinite(*number))
232 return eve::editing::failed<ui::Theme>(
233 EditorStatus::Rejected, RuleId("editor.ui-theme.layout"),
234 std::string("Theme layout number is missing or invalid: ") + token.path);
235 theme.layout.*(token.member) = static_cast<float>(*number);
236 }
237 const EditorValue* keyboard = field(value, "nav.keyboard");
238 const EditorValue* gamepad = field(value, "nav.gamepad");
239 const auto* keyboardFlag = keyboard ? keyboard->getIf<bool>() : nullptr;
240 const auto* gamepadFlag = gamepad ? gamepad->getIf<bool>() : nullptr;
241 if (!keyboardFlag || !gamepadFlag)
242 return eve::editing::failed<ui::Theme>(EditorStatus::Rejected, RuleId("editor.ui-theme.nav"),
243 "Theme navigation flags are required");
244 theme.navEnableKeyboard = *keyboardFlag;
245 theme.navEnableGamepad = *gamepadFlag;
246 auto diagnostics = validateThemeTokens(theme);
247 if (!diagnostics.empty())
248 return eve::editing::failed<ui::Theme>(EditorStatus::Rejected, RuleId("editor.ui-theme.range"),
249 diagnostics.front().message());
250 return eve::editing::applied<ui::Theme>(theme);
251}
252
254 for (const ColorTok& token : kColors) {
255 if (path != PropertyPath(token.path)) continue;
256 if (!readColor(value, theme.*(token.member)))
257 return eve::editing::failed<void>(EditorStatus::Rejected, RuleId("editor.ui-theme.token-color"),
258 std::string("Theme color token is invalid: ") + token.path);
259 return eve::editing::applied<void>();
260 }
261 for (const FloatTok& token : kFloats) {
262 if (path != PropertyPath(token.path)) continue;
263 const auto* number = value.getIf<double>();
264 if (!number || !inRange(static_cast<float>(*number), token.minimum, token.maximum))
265 return eve::editing::failed<void>(EditorStatus::Rejected, RuleId("editor.ui-theme.token-float"),
266 std::string("Theme number token is invalid: ") + token.path);
267 theme.*(token.member) = static_cast<float>(*number);
268 return eve::editing::applied<void>();
269 }
270 for (const LayoutTok& token : kLayout) {
271 if (path != PropertyPath(token.path)) continue;
272 const auto* number = value.getIf<double>();
273 if (!number || !inRange(static_cast<float>(*number), token.minimum, token.maximum))
274 return eve::editing::failed<void>(EditorStatus::Rejected, RuleId("editor.ui-theme.token-layout"),
275 std::string("Theme layout token is invalid: ") + token.path);
276 theme.layout.*(token.member) = static_cast<float>(*number);
277 return eve::editing::applied<void>();
278 }
279 if (path == PropertyPath("nav.keyboard")) {
280 const auto* flag = value.getIf<bool>();
281 if (!flag)
282 return eve::editing::failed<void>(EditorStatus::Rejected, RuleId("editor.ui-theme.token-nav"),
283 "Theme navigation token is invalid");
284 theme.navEnableKeyboard = *flag;
285 return eve::editing::applied<void>();
286 }
287 if (path == PropertyPath("nav.gamepad")) {
288 const auto* flag = value.getIf<bool>();
289 if (!flag)
290 return eve::editing::failed<void>(EditorStatus::Rejected, RuleId("editor.ui-theme.token-nav"),
291 "Theme navigation token is invalid");
292 theme.navEnableGamepad = *flag;
293 return eve::editing::applied<void>();
294 }
295 return eve::editing::failed<void>(EditorStatus::NotFound, RuleId("editor.ui-theme.token"),
296 "Unknown theme token: " + path.value());
297}
298
300 for (const ColorTok& token : kColors) {
301 if (path == PropertyPath(token.path)) return colorValue(theme.*(token.member));
302 }
303 for (const FloatTok& token : kFloats) {
304 if (path == PropertyPath(token.path)) return static_cast<double>(theme.*(token.member));
305 }
306 for (const LayoutTok& token : kLayout) {
307 if (path == PropertyPath(token.path)) return static_cast<double>(theme.layout.*(token.member));
308 }
309 if (path == PropertyPath("nav.keyboard")) return theme.navEnableKeyboard;
310 if (path == PropertyPath("nav.gamepad")) return theme.navEnableGamepad;
311 return {};
312}
313
315 PropertySchema schema;
316 schema.typeId = "ui.theme";
317 schema.properties.push_back(colorProperty("color.text"));
318 schema.properties.push_back(colorProperty("color.windowBg"));
319 schema.properties.push_back(colorProperty("color.childBg"));
320 schema.properties.push_back(colorProperty("color.frameBg"));
321 schema.properties.push_back(colorProperty("color.button"));
322 schema.properties.push_back(colorProperty("color.buttonHovered"));
323 schema.properties.push_back(colorProperty("color.buttonActive"));
324 schema.properties.push_back(colorProperty("color.header"));
325 schema.properties.push_back(colorProperty("color.checkMark"));
326 schema.properties.push_back(colorProperty("color.sliderGrab"));
327 for (const FloatTok& token : kFloats) schema.properties.push_back(floatProperty(token));
328 for (const LayoutTok& token : kLayout) schema.properties.push_back(layoutProperty(token));
329 PropertyDescriptor keyboard;
330 keyboard.path = PropertyPath("nav.keyboard");
331 keyboard.displayNameKey = "nav.keyboard";
332 keyboard.category = "Typography";
333 keyboard.type = PropertyType::Bool;
334 keyboard.flags = PropertyFlag::Runtime;
335 keyboard.defaultValue = true;
336 schema.properties.push_back(keyboard);
337 PropertyDescriptor gamepad = keyboard;
338 gamepad.path = PropertyPath("nav.gamepad");
339 gamepad.displayNameKey = "nav.gamepad";
340 gamepad.defaultValue = false;
341 schema.properties.push_back(std::move(gamepad));
342 return schema;
343}
344
345std::vector<EditorDiagnostic> validateThemeTokens(const ui::Theme& theme) {
346 std::vector<EditorDiagnostic> diagnostics;
347 for (const ColorTok& token : kColors) {
348 const float* color = theme.*(token.member);
349 for (int i = 0; i < 4; ++i) {
350 if (!inRange(color[i], 0.f, 1.f)) {
351 diagnostics.push_back(tokenDiagnostic("editor.ui-theme.color-range",
352 std::string("Theme color channel is out of range: ") + token.path));
353 break;
354 }
355 }
356 }
357 for (const FloatTok& token : kFloats) {
358 if (!inRange(theme.*(token.member), token.minimum, token.maximum))
359 diagnostics.push_back(tokenDiagnostic("editor.ui-theme.float-range",
360 std::string("Theme number is out of range: ") + token.path));
361 }
362 for (const LayoutTok& token : kLayout) {
363 if (!inRange(theme.layout.*(token.member), token.minimum, token.maximum))
364 diagnostics.push_back(tokenDiagnostic("editor.ui-theme.layout-range",
365 std::string("Theme layout number is out of range: ") + token.path));
366 }
367 return diagnostics;
368}
369
373
374std::string presetName(UiThemeBasePreset preset) {
375 switch (preset) {
376 case UiThemeBasePreset::Light: return "light";
377 case UiThemeBasePreset::Custom: return "custom";
378 case UiThemeBasePreset::Dark: return "dark";
379 }
380 return "dark";
381}
382
384 if (name == "dark") return eve::editing::applied<UiThemeBasePreset>(UiThemeBasePreset::Dark);
385 if (name == "light") return eve::editing::applied<UiThemeBasePreset>(UiThemeBasePreset::Light);
386 if (name == "custom") return eve::editing::applied<UiThemeBasePreset>(UiThemeBasePreset::Custom);
387 return eve::editing::failed<UiThemeBasePreset>(EditorStatus::Rejected, RuleId("editor.ui-theme.preset"),
388 "Theme base preset must be dark, light, or custom");
389}
390
391} // namespace eve::ui_editing
double value
std::string descriptor
Object::Ptr theme
std::string message
float maximum[3]
float minimum[3]
std::uint32_t key
std::string name
std::string path
Definition PlayHost.cpp:110
uint64_t token
double number
bool found
Json object
const char * category
float(ui::Theme::* member)[4]
Move-only operation result carrying either a value or Status.
Definition Result.h:155
const std::string & value() const noexcept
Returns the exact legacy or canonical compatibility spelling.
Definition Identity.h:362
Dotted property path (layout.size) compared and persisted as text.
Definition EditingIds.h:78
Deterministic owning value tree shared by authoring hosts.
std::vector< Value > Array
std::map< std::string, Value > Object
const T * getIf() const
Return an immediately borrowed typed value.
editing::PropertyDescriptor PropertyDescriptor
editing::PropertyPath PropertyPath
Diagnostic ruleDiagnostic(eve::DiagnosticCode code, RuleId rule, DiagnosticSeverity severity, std::string message)
Build a common diagnostic carrying an open editing rule identity.
const EditorValue * field(const EditorValue &value, const char *name)
EditorValue readThemeToken(const ui::Theme &theme, const PropertyPath &path)
Reads theme token.
ui::Theme themeFromPreset(UiThemeBasePreset preset)
Theme from preset.
Result< void > assignThemeToken(ui::Theme &theme, const PropertyPath &path, const EditorValue &value)
Assign theme token.
editing::Diagnostic EditorDiagnostic
Definition UiDocument.h:45
std::vector< EditorDiagnostic > validateThemeTokens(const ui::Theme &theme)
Validate theme tokens.
std::string presetName(UiThemeBasePreset preset)
Preset name.
PropertySchema themeTokenSchema()
Theme token schema.
Result< UiThemeBasePreset > parsePreset(const std::string &name)
Parse preset.
UiThemeBasePreset
Base preset used when resetting a named theme asset.
Definition UiTheme.h:44
editing::Value EditorValue
Definition UiDocument.h:44
Result< ui::Theme > parseThemeTokens(const EditorValue &value)
Parse theme tokens.
EditorValue themeTokensValue(const ui::Theme &theme)
Theme tokens value.
PropertyDescriptor public API.
EVENGINE_API_PLATFORM public API.
std::vector< PropertyDescriptor > properties
float panelPaddingY
Definition Theme.h:24
float searchIconGap
Definition Theme.h:31
float toolbarHeight
Definition Theme.h:17
float toolboxCellSize
Definition Theme.h:20
float searchMinWidth
Definition Theme.h:30
float panelPaddingX
Definition Theme.h:23
float sectionSpacingY
Definition Theme.h:29
float statusBarHeight
Definition Theme.h:18
Unified UI design tokens (colors, geometry, typography). Applied to ImGui each frame via applyThemeTo...
Definition Theme.h:39
float titleBg[4]
Definition Theme.h:54
float tableBorderLight[4]
Definition Theme.h:79
float navHighlight[4]
Definition Theme.h:87
float frameBg[4]
Definition Theme.h:51
float checkMark[4]
Definition Theme.h:64
float itemSpacingX
Definition Theme.h:108
float scrollbarSize
Definition Theme.h:115
float indentSpacing
Definition Theme.h:114
float sliderGrab[4]
Definition Theme.h:65
float scrollbarGrab[4]
Definition Theme.h:69
float buttonHovered[4]
Definition Theme.h:59
float tableRowBgAlt[4]
Definition Theme.h:81
float itemSpacingY
Definition Theme.h:109
float menuBarBg[4]
Definition Theme.h:57
float buttonActive[4]
Definition Theme.h:60
float windowPaddingX
Definition Theme.h:104
float frameBorderSize
Definition Theme.h:102
float modalDimBg[4]
Definition Theme.h:88
float childRounding
Definition Theme.h:92
float textDisabled[4]
Definition Theme.h:45
float separator[4]
Definition Theme.h:67
float titleBgActive[4]
Definition Theme.h:55
float popupBg[4]
Definition Theme.h:48
float tabActive[4]
Definition Theme.h:74
float fontScale
Definition Theme.h:120
float header[4]
Definition Theme.h:61
float grabMinSize
Definition Theme.h:116
float windowPaddingY
Definition Theme.h:105
float plotHistogram[4]
Definition Theme.h:84
float cellPaddingY
Definition Theme.h:113
float titleBgCollapsed[4]
Definition Theme.h:56
float framePaddingY
Definition Theme.h:107
float scrollbarGrabHovered[4]
Definition Theme.h:70
float tableHeaderBg[4]
Definition Theme.h:77
float text[4]
Definition Theme.h:44
float itemInnerSpacingX
Definition Theme.h:110
float scrollbarGrabActive[4]
Definition Theme.h:71
float scrollbarRounding
Definition Theme.h:95
float borderShadow[4]
Definition Theme.h:50
float grabRounding
Definition Theme.h:96
float frameBgActive[4]
Definition Theme.h:53
float windowBg[4]
Definition Theme.h:46
float windowRounding
Definition Theme.h:91
float windowBorderSize
Definition Theme.h:99
float framePaddingX
Definition Theme.h:106
float tabUnfocusedActive[4]
Definition Theme.h:76
static Theme light()
Light.
Definition Theme.cpp:180
float tabUnfocused[4]
Definition Theme.h:75
float sliderGrabActive[4]
Definition Theme.h:66
float itemInnerSpacingY
Definition Theme.h:111
float headerHovered[4]
Definition Theme.h:62
float tabHovered[4]
Definition Theme.h:73
float frameBgHovered[4]
Definition Theme.h:52
float textSelectedBg[4]
Definition Theme.h:86
float plotLinesHovered[4]
Definition Theme.h:83
float popupBorderSize
Definition Theme.h:101
float tab[4]
Definition Theme.h:72
float cellPaddingX
Definition Theme.h:112
float childBg[4]
Definition Theme.h:47
float plotLines[4]
Definition Theme.h:82
float childBorderSize
Definition Theme.h:100
float frameRounding
Definition Theme.h:93
float headerActive[4]
Definition Theme.h:63
float button[4]
Definition Theme.h:58
float scrollbarBg[4]
Definition Theme.h:68
float plotHistogramHovered[4]
Definition Theme.h:85
float tableBorderStrong[4]
Definition Theme.h:78
float tabRounding
Definition Theme.h:97
static Theme dark()
Built-in presets with matching geometry; only colors differ.
Definition Theme.cpp:174
float border[4]
Definition Theme.h:49
float popupRounding
Definition Theme.h:94
float tableRowBg[4]
Definition Theme.h:80
glm::vec4 color