From aae3e80515ef3a86f55dc1c25d06e635a9cbf07d Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 16 May 2024 11:48:24 -0400 Subject: [PATCH] cargo fmt --- cosmic-settings/src/pages/display/mod.rs | 75 ++++++++++++------------ 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/cosmic-settings/src/pages/display/mod.rs b/cosmic-settings/src/pages/display/mod.rs index ec8c6cd..f8a42ac 100644 --- a/cosmic-settings/src/pages/display/mod.rs +++ b/cosmic-settings/src/pages/display/mod.rs @@ -41,13 +41,13 @@ pub enum Mirroring { /// Night light preferences // #[derive(Clone, Copy, Debug)] // pub enum NightLight { - /// Toggles night light's automatic scheduling. +/// Toggles night light's automatic scheduling. // AutoSchedule(bool), - /// Sets the night light schedule. +/// Sets the night light schedule. // ManualSchedule, - /// Changes the preferred night light temperature. +/// Changes the preferred night light temperature. // Temperature(f32), - /// Toggles night light mode +/// Toggles night light mode // Toggle(bool), // } @@ -66,9 +66,9 @@ pub enum Message { /// Configures mirroring status of a display. Mirroring(Mirroring), /// Handle night light preferences. -// NightLight(NightLight), + // NightLight(NightLight), /// Show the night light mode context drawer. -// NightLightContext, + // NightLightContext, /// Set the orientation of a display. Orientation(Transform), /// Status of an applied display change. @@ -113,7 +113,7 @@ pub struct Page { background_service: Option>, config: Config, cache: ViewCache, -// context: Option, + // context: Option, display_arrangement_scrollable: cosmic::widget::Id, } @@ -126,7 +126,7 @@ impl Default for Page { background_service: None, config: Config::default(), cache: ViewCache::default(), -// context: None, + // context: None, display_arrangement_scrollable: cosmic::widget::Id::unique(), } } @@ -135,7 +135,7 @@ impl Default for Page { #[derive(Default)] struct Config { /// Whether night light is enabled. -// night_light_enabled: bool, + // night_light_enabled: bool, refresh_rate: Option, resolution: Option<(u32, u32)>, scale: u32, @@ -163,15 +163,15 @@ impl page::Page for Page { ) -> Option { Some(vec![ // Night light -// sections.insert( -// Section::default() -// .descriptions(vec![ -// text::NIGHT_LIGHT.as_str().into(), -// text::NIGHT_LIGHT_AUTO.as_str().into(), -// text::NIGHT_LIGHT_DESCRIPTION.as_str().into(), -// ]) -// .view::(|_binder, page, _section| page.night_light_view()), -// ), + // sections.insert( + // Section::default() + // .descriptions(vec![ + // text::NIGHT_LIGHT.as_str().into(), + // text::NIGHT_LIGHT_AUTO.as_str().into(), + // text::NIGHT_LIGHT_DESCRIPTION.as_str().into(), + // ]) + // .view::(|_binder, page, _section| page.night_light_view()), + // ), // Display arrangement sections.insert( Section::default() @@ -297,15 +297,15 @@ impl page::Page for Page { }) }) } - -// fn context_drawer(&self) -> Option> { -// Some(match self.context { -// Some(ContextDrawer::NightLight) => self.night_light_context_view(), + // fn context_drawer(&self) -> Option> { + // Some(match self.context { -// None => return None, -// }) -// } + // Some(ContextDrawer::NightLight) => self.night_light_context_view(), + + // None => return None, + // }) + // } } impl Page { @@ -331,16 +331,15 @@ impl Page { Mirroring::Project(target_display) => (), Mirroring::ProjectToAll => (), }, - -// Message::NightLight(night_light) => {} -// -// Message::NightLightContext => { -// self.context = Some(ContextDrawer::NightLight); -// return cosmic::command::message(app::Message::OpenContextDrawer( -// text::NIGHT_LIGHT.clone().into(), -// )); -// } + // Message::NightLight(night_light) => {} + // + // Message::NightLightContext => { + // self.context = Some(ContextDrawer::NightLight); + // return cosmic::command::message(app::Message::OpenContextDrawer( + // text::NIGHT_LIGHT.clone().into(), + // )); + // } Message::Orientation(orientation) => return self.set_orientation(orientation), Message::Position(display, x, y) => return self.set_position(display, x, y), @@ -484,11 +483,11 @@ impl Page { .apply(Element::from) .map(pages::Message::Displays) } - + /// Displays the night light context drawer. -// pub fn night_light_context_view(&self) -> Element { -// column().into() -// } + // pub fn night_light_context_view(&self) -> Element { + // column().into() + // } /// Reloads the display list, and all information relevant to the active display. pub fn update_displays(&mut self, list: List) {