egui_macview/theme/
pro_accessors.rs1use super::MacTheme;
4use crate::tokens::{
5 MacTagLabelColors, OriginMatrixMetrics, TableActionBarMetrics, TagColorPickerMetrics,
6};
7use egui::Color32;
8
9impl MacTheme {
10 pub fn origin_matrix(&self) -> &OriginMatrixMetrics {
12 self.tokens.origin_matrix_metrics()
13 }
14
15 pub fn tag_color_picker(&self) -> &TagColorPickerMetrics {
17 self.tokens.tag_color_picker_metrics()
18 }
19
20 pub fn table_action_bar(&self) -> &TableActionBarMetrics {
22 self.tokens.table_action_bar_metrics()
23 }
24
25 pub fn tag_labels(&self) -> &MacTagLabelColors {
27 &self.tokens.colors().tag_labels
28 }
29
30 pub fn tag_label_palette(&self) -> [Color32; 11] {
32 self.tag_labels().palette_11()
33 }
34
35 pub fn tag_swatch_border(&self) -> Color32 {
37 self.tag_labels().swatch_border.to_color32()
38 }
39
40 pub fn slider_track_bg(&self) -> Color32 {
42 self.colors().slider_track_bg.to_color32()
43 }
44
45 pub fn slider_track_border(&self) -> Color32 {
47 self.colors().slider_track_border.to_color32()
48 }
49
50 pub fn slider_tick_mark_color(&self) -> Color32 {
52 self.colors().slider_tick_mark.to_color32()
53 }
54
55 pub fn slider_thumb_bg(&self) -> Color32 {
57 self.colors().slider_thumb_bg.to_color32()
58 }
59
60 pub fn slider_thumb_border_color(&self) -> Color32 {
62 self.colors().slider_thumb_border.to_color32()
63 }
64
65 pub fn table_action_bar_border(&self) -> Color32 {
67 self.colors().box_border.to_color32()
68 }
69
70 pub fn segmented_small_square_active_bg(&self) -> Color32 {
72 self.colors().segmented_small_square_active_bg.to_color32()
73 }
74
75 pub fn segmented_small_square_inactive_bg(&self) -> Color32 {
77 self.colors().segmented_small_square_inactive_bg.to_color32()
78 }
79
80 pub fn popover_background(&self) -> Color32 {
82 self.colors().popover_background.to_color32()
83 }
84
85 pub fn popover_border(&self) -> Color32 {
87 self.colors().popover_border.to_color32()
88 }
89}