Skip to content

Commit

Permalink
Get default style from Theme
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Sep 3, 2024
1 parent b1d1307 commit b82e51e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/egui/src/memory/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ impl Theme {
}
}

/// Default style for this theme.
pub fn default_style(self) -> crate::Style {
crate::Style {
visuals: self.default_visuals(),
..Default::default()
}
}

/// Chooses between [`Self::Dark`] or [`Self::Light`] based on a boolean value.
pub fn from_dark_mode(dark_mode: bool) -> Self {
if dark_mode {
Expand Down

0 comments on commit b82e51e

Please sign in to comment.