Skip to main content

egui_charts/ui/dialogs/series_settings/
config.rs

1//! Configuration for the series settings dialog.
2
3use crate::tokens::DESIGN_TOKENS;
4
5/// Configuration for the series settings dialog
6#[derive(Clone, Debug)]
7pub struct SeriesSettingsConfig {
8    /// Dialog width
9    pub width: f32,
10    /// Dialog height
11    pub height: f32,
12    /// Tab height
13    pub tab_height: f32,
14    /// Content padding
15    pub content_padding: f32,
16    /// Row spacing
17    pub row_spacing: f32,
18    /// Label width
19    pub label_width: f32,
20    /// Control width
21    pub control_width: f32,
22}
23
24impl Default for SeriesSettingsConfig {
25    fn default() -> Self {
26        Self {
27            width: 520.0,
28            height: 480.0,
29            tab_height: DESIGN_TOKENS.sizing.settings_dialog.tab_height,
30            content_padding: crate::theme::Theme::default().spacing.lg,
31            row_spacing: crate::theme::Theme::default().spacing.md,
32            label_width: 110.0,
33            control_width: DESIGN_TOKENS.sizing.settings_dialog.dropdown_width,
34        }
35    }
36}