Skip to main content

egui_charts/ui/dialogs/drawing_properties/
config.rs

1//! Configuration for the drawing properties dialog.
2
3use crate::tokens::DESIGN_TOKENS;
4
5/// Default content height; longer coordinate and level lists scroll above the footer.
6const HEIGHT: f32 = 346.0;
7
8/// Configuration for the drawing properties dialog
9#[derive(Clone, Debug)]
10pub struct DrawingPropertiesConfig {
11    /// Dialog width
12    pub width: f32,
13    /// Dialog height
14    pub height: f32,
15    /// Tab height
16    pub tab_height: f32,
17    /// Content padding
18    pub content_padding: f32,
19    /// Row spacing
20    pub row_spacing: f32,
21    /// Label width
22    pub label_width: f32,
23    /// Control width
24    pub control_width: f32,
25}
26
27impl Default for DrawingPropertiesConfig {
28    fn default() -> Self {
29        Self {
30            width: 520.0,
31            height: HEIGHT,
32            tab_height: DESIGN_TOKENS.sizing.settings_dialog.tab_height,
33            content_padding: crate::theme::Theme::default().spacing.lg,
34            row_spacing: crate::theme::Theme::default().spacing.md,
35            label_width: DESIGN_TOKENS.sizing.dialog.label_width,
36            control_width: DESIGN_TOKENS.sizing.settings_dialog.dropdown_width,
37        }
38    }
39}