We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1112ec commit bab7c38Copy full SHA for bab7c38
crates/egui/src/style.rs
@@ -1906,30 +1906,6 @@ impl WidgetVisuals {
1906
}
1907
1908
impl Visuals {
1909
- /// Show small toggle-button for light and dark mode.
1910
- #[must_use]
1911
- pub fn light_dark_small_toggle_button(&self, ui: &mut crate::Ui) -> Option<Self> {
1912
- #![allow(clippy::collapsible_else_if)]
1913
- if self.dark_mode {
1914
- if ui
1915
- .add(Button::new("☀").frame(false))
1916
- .on_hover_text("Switch to light mode")
1917
- .clicked()
1918
- {
1919
- return Some(Self::light());
1920
- }
1921
- } else {
1922
1923
- .add(Button::new("🌙").frame(false))
1924
- .on_hover_text("Switch to dark mode")
1925
1926
1927
- return Some(Self::dark());
1928
1929
1930
- None
1931
1932
-
1933
pub fn ui(&mut self, ui: &mut crate::Ui) {
1934
let Self {
1935
dark_mode: _,
0 commit comments