From 00ff728f5a855878677b956deaed555af4854578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Wed, 14 Aug 2024 14:41:18 +0200 Subject: [PATCH] Remove obsolete function --- crates/egui/src/style.rs | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index 80880ab518a..90d5781ff33 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -1491,7 +1491,7 @@ impl Default for Widgets { // ---------------------------------------------------------------------------- use crate::{ - widgets::{reset_button, Button, DragValue, Slider, Widget}, + widgets::{reset_button, DragValue, Slider, Widget}, Ui, }; @@ -1928,30 +1928,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 { - #![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: _,