From e986ae4ee014512922486a9d118b0db46fa77b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Wed, 31 Jul 2024 12:44:59 +0200 Subject: [PATCH] pub Co-authored-by: Emil Ernerfeldt --- crates/egui/src/memory/theme.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/egui/src/memory/theme.rs b/crates/egui/src/memory/theme.rs index 9b842c2dca7..71f86b1b614 100644 --- a/crates/egui/src/memory/theme.rs +++ b/crates/egui/src/memory/theme.rs @@ -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 {