Skip to content

Commit

Permalink
pub
Browse files Browse the repository at this point in the history
Co-authored-by: Emil Ernerfeldt <[email protected]>
  • Loading branch information
bash and emilk committed Aug 5, 2024
1 parent 97fca20 commit e986ae4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/egui/src/memory/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ pub enum Theme {
}

impl Theme {
pub(crate) fn default_visuals(self) -> crate::Visuals {
/// Default visuals for this theme.
pub fn default_visuals(self) -> crate::Visuals {
match self {
Self::Dark => crate::Visuals::dark(),
Self::Light => crate::Visuals::light(),
}
}

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

0 comments on commit e986ae4

Please sign in to comment.