1mod theme_registry;
2
3use gpui::{
4 color::Color,
5 elements::{ContainerStyle, ImageStyle, LabelStyle, Shadow, TooltipStyle},
6 fonts::{HighlightStyle, TextStyle},
7 Border, MouseState,
8};
9use serde::{de::DeserializeOwned, Deserialize};
10use serde_json::Value;
11use std::{collections::HashMap, sync::Arc};
12
13pub use theme_registry::*;
14
15#[derive(Deserialize, Default)]
16pub struct Theme {
17 #[serde(default)]
18 pub meta: ThemeMeta,
19 pub workspace: Workspace,
20 pub context_menu: ContextMenu,
21 pub contacts_popover: ContactsPopover,
22 pub contacts_panel: ContactsPanel,
23 pub contact_finder: ContactFinder,
24 pub project_panel: ProjectPanel,
25 pub command_palette: CommandPalette,
26 pub picker: Picker,
27 pub editor: Editor,
28 pub search: Search,
29 pub project_diagnostics: ProjectDiagnostics,
30 pub breadcrumbs: ContainedText,
31 pub contact_notification: ContactNotification,
32 pub update_notification: UpdateNotification,
33 pub tooltip: TooltipStyle,
34 pub terminal: TerminalStyle,
35 pub color_scheme: ColorScheme,
36}
37
38#[derive(Deserialize, Default, Clone)]
39pub struct ThemeMeta {
40 pub name: String,
41 pub is_light: bool,
42}
43
44#[derive(Deserialize, Default)]
45pub struct Workspace {
46 pub background: Color,
47 pub titlebar: Titlebar,
48 pub tab_bar: TabBar,
49 pub pane_divider: Border,
50 pub leader_border_opacity: f32,
51 pub leader_border_width: f32,
52 pub sidebar: Sidebar,
53 pub status_bar: StatusBar,
54 pub toolbar: Toolbar,
55 pub disconnected_overlay: ContainedText,
56 pub modal: ContainerStyle,
57 pub notification: ContainerStyle,
58 pub notifications: Notifications,
59 pub joining_project_avatar: ImageStyle,
60 pub joining_project_message: ContainedText,
61 pub dock: Dock,
62}
63
64#[derive(Clone, Deserialize, Default)]
65pub struct Titlebar {
66 #[serde(flatten)]
67 pub container: ContainerStyle,
68 pub height: f32,
69 pub title: TextStyle,
70 pub avatar_width: f32,
71 pub avatar_margin: f32,
72 pub avatar_ribbon: AvatarRibbon,
73 pub offline_icon: OfflineIcon,
74 pub avatar: ImageStyle,
75 pub sign_in_prompt: Interactive<ContainedText>,
76 pub outdated_warning: ContainedText,
77}
78
79#[derive(Clone, Deserialize, Default)]
80pub struct TabBar {
81 #[serde(flatten)]
82 pub container: ContainerStyle,
83 pub pane_button: Interactive<IconButton>,
84 pub pane_button_container: ContainerStyle,
85 pub active_pane: TabStyles,
86 pub inactive_pane: TabStyles,
87 pub dragged_tab: Tab,
88 pub height: f32,
89 pub drop_target_overlay_color: Color,
90}
91
92impl TabBar {
93 pub fn tab_style(&self, pane_active: bool, tab_active: bool) -> &Tab {
94 let tabs = if pane_active {
95 &self.active_pane
96 } else {
97 &self.inactive_pane
98 };
99
100 if tab_active {
101 &tabs.active_tab
102 } else {
103 &tabs.inactive_tab
104 }
105 }
106}
107
108#[derive(Clone, Deserialize, Default)]
109pub struct TabStyles {
110 pub active_tab: Tab,
111 pub inactive_tab: Tab,
112}
113
114#[derive(Clone, Deserialize, Default)]
115pub struct AvatarRibbon {
116 #[serde(flatten)]
117 pub container: ContainerStyle,
118 pub width: f32,
119 pub height: f32,
120}
121
122#[derive(Clone, Deserialize, Default)]
123pub struct OfflineIcon {
124 #[serde(flatten)]
125 pub container: ContainerStyle,
126 pub width: f32,
127 pub color: Color,
128}
129
130#[derive(Clone, Deserialize, Default)]
131pub struct Tab {
132 pub height: f32,
133 #[serde(flatten)]
134 pub container: ContainerStyle,
135 #[serde(flatten)]
136 pub label: LabelStyle,
137 pub description: ContainedText,
138 pub spacing: f32,
139 pub icon_width: f32,
140 pub icon_close: Color,
141 pub icon_close_active: Color,
142 pub icon_dirty: Color,
143 pub icon_conflict: Color,
144}
145
146#[derive(Clone, Deserialize, Default)]
147pub struct Toolbar {
148 #[serde(flatten)]
149 pub container: ContainerStyle,
150 pub height: f32,
151 pub item_spacing: f32,
152 pub nav_button: Interactive<IconButton>,
153}
154
155#[derive(Clone, Deserialize, Default)]
156pub struct Dock {
157 pub initial_size_right: f32,
158 pub initial_size_bottom: f32,
159 pub wash_color: Color,
160 pub panel: ContainerStyle,
161 pub maximized: ContainerStyle,
162}
163
164#[derive(Clone, Deserialize, Default)]
165pub struct Notifications {
166 #[serde(flatten)]
167 pub container: ContainerStyle,
168 pub width: f32,
169}
170
171#[derive(Clone, Deserialize, Default)]
172pub struct Search {
173 #[serde(flatten)]
174 pub container: ContainerStyle,
175 pub editor: FindEditor,
176 pub invalid_editor: ContainerStyle,
177 pub option_button_group: ContainerStyle,
178 pub option_button: Interactive<ContainedText>,
179 pub match_background: Color,
180 pub match_index: ContainedText,
181 pub results_status: TextStyle,
182 pub tab_icon_width: f32,
183 pub tab_icon_spacing: f32,
184}
185
186#[derive(Clone, Deserialize, Default)]
187pub struct FindEditor {
188 #[serde(flatten)]
189 pub input: FieldEditor,
190 pub min_width: f32,
191 pub max_width: f32,
192}
193
194#[derive(Deserialize, Default)]
195pub struct StatusBar {
196 #[serde(flatten)]
197 pub container: ContainerStyle,
198 pub height: f32,
199 pub item_spacing: f32,
200 pub cursor_position: TextStyle,
201 pub auto_update_progress_message: TextStyle,
202 pub auto_update_done_message: TextStyle,
203 pub lsp_status: Interactive<StatusBarLspStatus>,
204 pub feedback: Interactive<TextStyle>,
205 pub sidebar_buttons: StatusBarSidebarButtons,
206 pub diagnostic_summary: Interactive<StatusBarDiagnosticSummary>,
207 pub diagnostic_message: Interactive<ContainedText>,
208}
209
210#[derive(Deserialize, Default)]
211pub struct StatusBarSidebarButtons {
212 pub group_left: ContainerStyle,
213 pub group_right: ContainerStyle,
214 pub item: Interactive<SidebarItem>,
215 pub badge: ContainerStyle,
216}
217
218#[derive(Deserialize, Default)]
219pub struct StatusBarDiagnosticSummary {
220 pub container_ok: ContainerStyle,
221 pub container_warning: ContainerStyle,
222 pub container_error: ContainerStyle,
223 pub text: TextStyle,
224 pub icon_color_ok: Color,
225 pub icon_color_warning: Color,
226 pub icon_color_error: Color,
227 pub height: f32,
228 pub icon_width: f32,
229 pub icon_spacing: f32,
230 pub summary_spacing: f32,
231}
232
233#[derive(Deserialize, Default)]
234pub struct StatusBarLspStatus {
235 #[serde(flatten)]
236 pub container: ContainerStyle,
237 pub height: f32,
238 pub icon_spacing: f32,
239 pub icon_color: Color,
240 pub icon_width: f32,
241 pub message: TextStyle,
242}
243
244#[derive(Deserialize, Default)]
245pub struct Sidebar {
246 pub initial_size: f32,
247 #[serde(flatten)]
248 pub container: ContainerStyle,
249}
250
251#[derive(Clone, Copy, Deserialize, Default)]
252pub struct SidebarItem {
253 #[serde(flatten)]
254 pub container: ContainerStyle,
255 pub icon_color: Color,
256 pub icon_size: f32,
257}
258
259#[derive(Deserialize, Default)]
260pub struct ProjectPanel {
261 #[serde(flatten)]
262 pub container: ContainerStyle,
263 pub entry: Interactive<ProjectPanelEntry>,
264 pub cut_entry_fade: f32,
265 pub ignored_entry_fade: f32,
266 pub filename_editor: FieldEditor,
267 pub indent_width: f32,
268}
269
270#[derive(Clone, Debug, Deserialize, Default)]
271pub struct ProjectPanelEntry {
272 pub height: f32,
273 #[serde(flatten)]
274 pub container: ContainerStyle,
275 pub text: TextStyle,
276 pub icon_color: Color,
277 pub icon_size: f32,
278 pub icon_spacing: f32,
279}
280
281#[derive(Clone, Debug, Deserialize, Default)]
282pub struct ContextMenu {
283 #[serde(flatten)]
284 pub container: ContainerStyle,
285 pub item: Interactive<ContextMenuItem>,
286 pub keystroke_margin: f32,
287 pub separator: ContainerStyle,
288}
289
290#[derive(Clone, Debug, Deserialize, Default)]
291pub struct ContextMenuItem {
292 #[serde(flatten)]
293 pub container: ContainerStyle,
294 pub label: TextStyle,
295 pub keystroke: ContainedText,
296 pub icon_width: f32,
297 pub icon_spacing: f32,
298}
299
300#[derive(Debug, Deserialize, Default)]
301pub struct CommandPalette {
302 pub key: Interactive<ContainedLabel>,
303 pub keystroke_spacing: f32,
304}
305
306#[derive(Deserialize, Default)]
307pub struct ContactsPopover {
308 pub background: Color,
309}
310
311#[derive(Deserialize, Default)]
312pub struct ContactsPanel {
313 #[serde(flatten)]
314 pub container: ContainerStyle,
315 pub user_query_editor: FieldEditor,
316 pub user_query_editor_height: f32,
317 pub add_contact_button: IconButton,
318 pub header_row: Interactive<ContainedText>,
319 pub contact_row: Interactive<ContainerStyle>,
320 pub project_row: Interactive<ProjectRow>,
321 pub row_height: f32,
322 pub contact_avatar: ImageStyle,
323 pub contact_username: ContainedText,
324 pub contact_button: Interactive<IconButton>,
325 pub contact_button_spacing: f32,
326 pub disabled_button: IconButton,
327 pub tree_branch: Interactive<TreeBranch>,
328 pub private_button: Interactive<IconButton>,
329 pub section_icon_size: f32,
330 pub invite_row: Interactive<ContainedLabel>,
331}
332
333#[derive(Deserialize, Default)]
334pub struct InviteLink {
335 #[serde(flatten)]
336 pub container: ContainerStyle,
337 #[serde(flatten)]
338 pub label: LabelStyle,
339 pub icon: Icon,
340}
341
342#[derive(Deserialize, Default, Clone, Copy)]
343pub struct TreeBranch {
344 pub width: f32,
345 pub color: Color,
346}
347
348#[derive(Deserialize, Default)]
349pub struct ContactFinder {
350 pub row_height: f32,
351 pub contact_avatar: ImageStyle,
352 pub contact_username: ContainerStyle,
353 pub contact_button: IconButton,
354 pub disabled_contact_button: IconButton,
355}
356
357#[derive(Deserialize, Default)]
358pub struct Icon {
359 #[serde(flatten)]
360 pub container: ContainerStyle,
361 pub color: Color,
362 pub width: f32,
363 pub path: String,
364}
365
366#[derive(Deserialize, Clone, Copy, Default)]
367pub struct IconButton {
368 #[serde(flatten)]
369 pub container: ContainerStyle,
370 pub color: Color,
371 pub icon_width: f32,
372 pub button_width: f32,
373}
374
375#[derive(Deserialize, Default)]
376pub struct ProjectRow {
377 #[serde(flatten)]
378 pub container: ContainerStyle,
379 pub name: ContainedText,
380 pub guests: ContainerStyle,
381 pub guest_avatar: ImageStyle,
382 pub guest_avatar_spacing: f32,
383}
384
385#[derive(Deserialize, Default)]
386pub struct ChatMessage {
387 #[serde(flatten)]
388 pub container: ContainerStyle,
389 pub body: TextStyle,
390 pub sender: ContainedText,
391 pub timestamp: ContainedText,
392}
393
394#[derive(Deserialize, Default)]
395pub struct ChannelSelect {
396 #[serde(flatten)]
397 pub container: ContainerStyle,
398 pub header: ChannelName,
399 pub item: ChannelName,
400 pub active_item: ChannelName,
401 pub hovered_item: ChannelName,
402 pub hovered_active_item: ChannelName,
403 pub menu: ContainerStyle,
404}
405
406#[derive(Deserialize, Default)]
407pub struct ChannelName {
408 #[serde(flatten)]
409 pub container: ContainerStyle,
410 pub hash: ContainedText,
411 pub name: TextStyle,
412}
413
414#[derive(Deserialize, Default)]
415pub struct Picker {
416 #[serde(flatten)]
417 pub container: ContainerStyle,
418 pub empty: ContainedLabel,
419 pub input_editor: FieldEditor,
420 pub item: Interactive<ContainedLabel>,
421}
422
423#[derive(Clone, Debug, Deserialize, Default)]
424pub struct ContainedText {
425 #[serde(flatten)]
426 pub container: ContainerStyle,
427 #[serde(flatten)]
428 pub text: TextStyle,
429}
430
431#[derive(Clone, Debug, Deserialize, Default)]
432pub struct ContainedLabel {
433 #[serde(flatten)]
434 pub container: ContainerStyle,
435 #[serde(flatten)]
436 pub label: LabelStyle,
437}
438
439#[derive(Clone, Deserialize, Default)]
440pub struct ProjectDiagnostics {
441 #[serde(flatten)]
442 pub container: ContainerStyle,
443 pub empty_message: TextStyle,
444 pub tab_icon_width: f32,
445 pub tab_icon_spacing: f32,
446 pub tab_summary_spacing: f32,
447}
448
449#[derive(Deserialize, Default)]
450pub struct ContactNotification {
451 pub header_avatar: ImageStyle,
452 pub header_message: ContainedText,
453 pub header_height: f32,
454 pub body_message: ContainedText,
455 pub button: Interactive<ContainedText>,
456 pub dismiss_button: Interactive<IconButton>,
457}
458
459#[derive(Deserialize, Default)]
460pub struct UpdateNotification {
461 pub message: ContainedText,
462 pub action_message: Interactive<ContainedText>,
463 pub dismiss_button: Interactive<IconButton>,
464}
465
466#[derive(Clone, Deserialize, Default)]
467pub struct Editor {
468 pub text_color: Color,
469 #[serde(default)]
470 pub background: Color,
471 pub selection: SelectionStyle,
472 pub gutter_background: Color,
473 pub gutter_padding_factor: f32,
474 pub active_line_background: Color,
475 pub highlighted_line_background: Color,
476 pub rename_fade: f32,
477 pub document_highlight_read_background: Color,
478 pub document_highlight_write_background: Color,
479 pub diff_background_deleted: Color,
480 pub diff_background_inserted: Color,
481 pub line_number: Color,
482 pub line_number_active: Color,
483 pub guest_selections: Vec<SelectionStyle>,
484 pub syntax: Arc<SyntaxTheme>,
485 pub diagnostic_path_header: DiagnosticPathHeader,
486 pub diagnostic_header: DiagnosticHeader,
487 pub error_diagnostic: DiagnosticStyle,
488 pub invalid_error_diagnostic: DiagnosticStyle,
489 pub warning_diagnostic: DiagnosticStyle,
490 pub invalid_warning_diagnostic: DiagnosticStyle,
491 pub information_diagnostic: DiagnosticStyle,
492 pub invalid_information_diagnostic: DiagnosticStyle,
493 pub hint_diagnostic: DiagnosticStyle,
494 pub invalid_hint_diagnostic: DiagnosticStyle,
495 pub autocomplete: AutocompleteStyle,
496 pub code_actions: CodeActions,
497 pub unnecessary_code_fade: f32,
498 pub hover_popover: HoverPopover,
499 pub link_definition: HighlightStyle,
500 pub composition_mark: HighlightStyle,
501 pub jump_icon: Interactive<IconButton>,
502}
503
504#[derive(Clone, Deserialize, Default)]
505pub struct DiagnosticPathHeader {
506 #[serde(flatten)]
507 pub container: ContainerStyle,
508 pub filename: ContainedText,
509 pub path: ContainedText,
510 pub text_scale_factor: f32,
511}
512
513#[derive(Clone, Deserialize, Default)]
514pub struct DiagnosticHeader {
515 #[serde(flatten)]
516 pub container: ContainerStyle,
517 pub message: ContainedLabel,
518 pub code: ContainedText,
519 pub text_scale_factor: f32,
520 pub icon_width_factor: f32,
521}
522
523#[derive(Clone, Deserialize, Default)]
524pub struct DiagnosticStyle {
525 pub message: LabelStyle,
526 #[serde(default)]
527 pub header: ContainerStyle,
528 pub text_scale_factor: f32,
529}
530
531#[derive(Clone, Deserialize, Default)]
532pub struct AutocompleteStyle {
533 #[serde(flatten)]
534 pub container: ContainerStyle,
535 pub item: ContainerStyle,
536 pub selected_item: ContainerStyle,
537 pub hovered_item: ContainerStyle,
538 pub match_highlight: HighlightStyle,
539}
540
541#[derive(Clone, Copy, Default, Deserialize)]
542pub struct SelectionStyle {
543 pub cursor: Color,
544 pub selection: Color,
545}
546
547#[derive(Clone, Deserialize, Default)]
548pub struct FieldEditor {
549 #[serde(flatten)]
550 pub container: ContainerStyle,
551 pub text: TextStyle,
552 #[serde(default)]
553 pub placeholder_text: Option<TextStyle>,
554 pub selection: SelectionStyle,
555}
556
557#[derive(Clone, Deserialize, Default)]
558pub struct CodeActions {
559 #[serde(default)]
560 pub indicator: Color,
561 pub vertical_scale: f32,
562}
563
564#[derive(Debug, Default, Clone, Copy)]
565pub struct Interactive<T> {
566 pub default: T,
567 pub hover: Option<T>,
568 pub clicked: Option<T>,
569 pub active: Option<T>,
570 pub disabled: Option<T>,
571}
572
573impl<T> Interactive<T> {
574 pub fn style_for(&self, state: MouseState, active: bool) -> &T {
575 if active {
576 self.active.as_ref().unwrap_or(&self.default)
577 } else if state.clicked == Some(gpui::MouseButton::Left) && self.clicked.is_some() {
578 self.clicked.as_ref().unwrap()
579 } else if state.hovered {
580 self.hover.as_ref().unwrap_or(&self.default)
581 } else {
582 &self.default
583 }
584 }
585
586 pub fn disabled_style(&self) -> &T {
587 self.disabled.as_ref().unwrap_or(&self.default)
588 }
589}
590
591impl<'de, T: DeserializeOwned> Deserialize<'de> for Interactive<T> {
592 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
593 where
594 D: serde::Deserializer<'de>,
595 {
596 #[derive(Deserialize)]
597 struct Helper {
598 #[serde(flatten)]
599 default: Value,
600 hover: Option<Value>,
601 clicked: Option<Value>,
602 active: Option<Value>,
603 disabled: Option<Value>,
604 }
605
606 let json = Helper::deserialize(deserializer)?;
607
608 let deserialize_state = |state_json: Option<Value>| -> Result<Option<T>, D::Error> {
609 if let Some(mut state_json) = state_json {
610 if let Value::Object(state_json) = &mut state_json {
611 if let Value::Object(default) = &json.default {
612 for (key, value) in default {
613 if !state_json.contains_key(key) {
614 state_json.insert(key.clone(), value.clone());
615 }
616 }
617 }
618 }
619 Ok(Some(
620 serde_json::from_value::<T>(state_json).map_err(serde::de::Error::custom)?,
621 ))
622 } else {
623 Ok(None)
624 }
625 };
626
627 let hover = deserialize_state(json.hover)?;
628 let clicked = deserialize_state(json.clicked)?;
629 let active = deserialize_state(json.active)?;
630 let disabled = deserialize_state(json.disabled)?;
631 let default = serde_json::from_value(json.default).map_err(serde::de::Error::custom)?;
632
633 Ok(Interactive {
634 default,
635 hover,
636 clicked,
637 active,
638 disabled,
639 })
640 }
641}
642
643impl Editor {
644 pub fn replica_selection_style(&self, replica_id: u16) -> &SelectionStyle {
645 let style_ix = replica_id as usize % (self.guest_selections.len() + 1);
646 if style_ix == 0 {
647 &self.selection
648 } else {
649 &self.guest_selections[style_ix - 1]
650 }
651 }
652}
653
654#[derive(Default)]
655pub struct SyntaxTheme {
656 pub highlights: Vec<(String, HighlightStyle)>,
657}
658
659impl SyntaxTheme {
660 pub fn new(highlights: Vec<(String, HighlightStyle)>) -> Self {
661 Self { highlights }
662 }
663}
664
665impl<'de> Deserialize<'de> for SyntaxTheme {
666 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
667 where
668 D: serde::Deserializer<'de>,
669 {
670 let syntax_data: HashMap<String, HighlightStyle> = Deserialize::deserialize(deserializer)?;
671
672 let mut result = Self::new(Vec::new());
673 for (key, style) in syntax_data {
674 match result
675 .highlights
676 .binary_search_by(|(needle, _)| needle.cmp(&key))
677 {
678 Ok(i) | Err(i) => {
679 result.highlights.insert(i, (key, style));
680 }
681 }
682 }
683
684 Ok(result)
685 }
686}
687
688#[derive(Clone, Deserialize, Default)]
689pub struct HoverPopover {
690 pub container: ContainerStyle,
691 pub info_container: ContainerStyle,
692 pub warning_container: ContainerStyle,
693 pub error_container: ContainerStyle,
694 pub block_style: ContainerStyle,
695 pub prose: TextStyle,
696 pub highlight: Color,
697}
698
699#[derive(Clone, Deserialize, Default)]
700pub struct TerminalStyle {
701 pub black: Color,
702 pub red: Color,
703 pub green: Color,
704 pub yellow: Color,
705 pub blue: Color,
706 pub magenta: Color,
707 pub cyan: Color,
708 pub white: Color,
709 pub bright_black: Color,
710 pub bright_red: Color,
711 pub bright_green: Color,
712 pub bright_yellow: Color,
713 pub bright_blue: Color,
714 pub bright_magenta: Color,
715 pub bright_cyan: Color,
716 pub bright_white: Color,
717 pub foreground: Color,
718 pub background: Color,
719 pub modal_background: Color,
720 pub cursor: Color,
721 pub dim_black: Color,
722 pub dim_red: Color,
723 pub dim_green: Color,
724 pub dim_yellow: Color,
725 pub dim_blue: Color,
726 pub dim_magenta: Color,
727 pub dim_cyan: Color,
728 pub dim_white: Color,
729 pub bright_foreground: Color,
730 pub dim_foreground: Color,
731}
732
733#[derive(Clone, Deserialize, Default)]
734pub struct ColorScheme {
735 pub name: String,
736 pub is_light: bool,
737
738 pub lowest: Elevation,
739 pub middle: Elevation,
740 pub highest: Elevation,
741
742 pub players: Vec<Player>,
743}
744
745#[derive(Clone, Deserialize, Default)]
746pub struct Elevation {
747 pub ramps: RampSet,
748
749 pub bottom: Layer,
750 pub middle: Layer,
751 pub top: Layer,
752
753 pub shadow: Option<Shadow>,
754}
755
756#[derive(Clone, Deserialize, Default)]
757pub struct Player {
758 pub cursor: Color,
759 pub selection: Color,
760}
761
762#[derive(Clone, Deserialize, Default)]
763pub struct RampSet {
764 pub neutral: Vec<Color>,
765 pub red: Vec<Color>,
766 pub orange: Vec<Color>,
767 pub yellow: Vec<Color>,
768 pub green: Vec<Color>,
769 pub cyan: Vec<Color>,
770 pub blue: Vec<Color>,
771 pub violet: Vec<Color>,
772 pub magenta: Vec<Color>,
773}
774
775#[derive(Clone, Deserialize, Default)]
776pub struct Layer {
777 pub base: StyleSet,
778 pub variant: StyleSet,
779 pub on: StyleSet,
780 pub accent: StyleSet,
781 pub positive: StyleSet,
782 pub warning: StyleSet,
783 pub negative: StyleSet,
784}
785
786#[derive(Clone, Deserialize, Default)]
787pub struct StyleSet {
788 pub default: Style,
789 pub active: Style,
790 pub disabled: Style,
791 pub hovered: Style,
792 pub pressed: Style,
793 pub inverted: Style,
794}
795
796#[derive(Clone, Deserialize, Default)]
797pub struct Style {
798 pub background: Color,
799 pub border: Color,
800 pub foreground: Color,
801}