Skip to content

Commit

Permalink
Remove obsolete function
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Aug 14, 2024
1 parent d1112ec commit bab7c38
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions crates/egui/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1906,30 +1906,6 @@ impl WidgetVisuals {
}

impl Visuals {
/// Show small toggle-button for light and dark mode.
#[must_use]
pub fn light_dark_small_toggle_button(&self, ui: &mut crate::Ui) -> Option<Self> {
#![allow(clippy::collapsible_else_if)]
if self.dark_mode {
if ui
.add(Button::new("☀").frame(false))
.on_hover_text("Switch to light mode")
.clicked()
{
return Some(Self::light());
}
} else {
if ui
.add(Button::new("🌙").frame(false))
.on_hover_text("Switch to dark mode")
.clicked()
{
return Some(Self::dark());
}
}
None
}

pub fn ui(&mut self, ui: &mut crate::Ui) {
let Self {
dark_mode: _,
Expand Down

0 comments on commit bab7c38

Please sign in to comment.