diff --git a/examples/about/src/main.rs b/examples/about/src/main.rs index 4fb8c6c9..fb1a692c 100644 --- a/examples/about/src/main.rs +++ b/examples/about/src/main.rs @@ -110,8 +110,7 @@ impl cosmic::Application for App { fn update(&mut self, message: Self::Message) -> Task { match message { Message::ToggleAbout => { - self.core.window.show_context = !self.core.window.show_context; - self.core.set_show_context(self.core.window.show_context); + self.set_show_context(!self.core.window.show_context); self.show_about = !self.show_about; } Message::Open(url) => match open::that_detached(url) { diff --git a/src/app/mod.rs b/src/app/mod.rs index 17497c20..9d175a63 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -454,6 +454,7 @@ where fn init(core: Core, flags: Self::Flags) -> (Self, Task); /// Displays a context drawer on the side of the application window when `Some`. + /// Use the [`ApplicationExt::set_show_context`] function for this to take effect. fn context_drawer(&self) -> Option> { None }