Skip to content

Commit bab7c38

Browse files
committed
Remove obsolete function
1 parent d1112ec commit bab7c38

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

crates/egui/src/style.rs

-24
Original file line numberDiff line numberDiff line change
@@ -1906,30 +1906,6 @@ impl WidgetVisuals {
19061906
}
19071907

19081908
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-
if ui
1923-
.add(Button::new("🌙").frame(false))
1924-
.on_hover_text("Switch to dark mode")
1925-
.clicked()
1926-
{
1927-
return Some(Self::dark());
1928-
}
1929-
}
1930-
None
1931-
}
1932-
19331909
pub fn ui(&mut self, ui: &mut crate::Ui) {
19341910
let Self {
19351911
dark_mode: _,

0 commit comments

Comments
 (0)