update libcosmic: adds tooltip support
This commit is contained in:
parent
38982176f0
commit
0de336d0d7
16 changed files with 352 additions and 70 deletions
|
|
@ -9,6 +9,7 @@ use cosmic::{
|
|||
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
|
||||
window, Limits, Subscription,
|
||||
},
|
||||
surface_message::{MessageWrapper, SurfaceMessage},
|
||||
widget::mouse_area,
|
||||
Element, Task,
|
||||
};
|
||||
|
|
@ -24,6 +25,22 @@ pub enum Msg {
|
|||
StatusNotifier(status_notifier_watcher::Event),
|
||||
TogglePopup(usize),
|
||||
Hovered(usize),
|
||||
Surface(SurfaceMessage),
|
||||
}
|
||||
|
||||
impl From<Msg> for MessageWrapper<Msg> {
|
||||
fn from(value: Msg) -> Self {
|
||||
match value {
|
||||
Msg::Surface(s) => MessageWrapper::Surface(s),
|
||||
m => MessageWrapper::Message(m),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<SurfaceMessage> for Msg {
|
||||
fn from(value: SurfaceMessage) -> Self {
|
||||
Msg::Surface(value)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
@ -226,6 +243,7 @@ impl cosmic::Application for App {
|
|||
cmds.push(get_popup(popup_settings));
|
||||
app::Task::batch(cmds)
|
||||
}
|
||||
Msg::Surface(surface_message) => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue