File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -1906,30 +1906,6 @@ impl WidgetVisuals {
1906
1906
}
1907
1907
1908
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
- 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
-
1933
1909
pub fn ui ( & mut self , ui : & mut crate :: Ui ) {
1934
1910
let Self {
1935
1911
dark_mode : _,
You can’t perform that action at this time.
0 commit comments