Skip to content

Commit

Permalink
use the set_show_context function, and mention it in the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Nov 11, 2024
1 parent 98aed56 commit 1198be3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions examples/about/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ impl cosmic::Application for App {
fn update(&mut self, message: Self::Message) -> Task<Self::Message> {
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) {
Expand Down
1 change: 1 addition & 0 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ where
fn init(core: Core, flags: Self::Flags) -> (Self, Task<Self::Message>);

/// 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<ContextDrawer<Self::Message>> {
None
}
Expand Down

0 comments on commit 1198be3

Please sign in to comment.