feat(app): add context view method for creating About views
This commit is contained in:
parent
a4c1909fc2
commit
8d4afb90da
6 changed files with 413 additions and 0 deletions
|
|
@ -78,6 +78,9 @@ pub enum Message {
|
|||
/// Tracks updates to window suggested size.
|
||||
#[cfg(feature = "applet")]
|
||||
SuggestedBounds(Option<iced::Size>),
|
||||
#[cfg(feature = "desktop")]
|
||||
/// Opens the provided URL.
|
||||
OpenUrl(String),
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
@ -661,6 +664,11 @@ impl<T: Application> Cosmic<T> {
|
|||
let core = self.app.core_mut();
|
||||
core.applet.suggested_bounds = b;
|
||||
}
|
||||
#[cfg(feature = "desktop")]
|
||||
Message::OpenUrl(url) => match open::that_detached(url) {
|
||||
Ok(_) => (),
|
||||
Err(err) => tracing::error!("{err}"),
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue