Use libcosmic-applet in time applet

Need to get button height right.
This commit is contained in:
Ian Douglas Scott 2022-07-05 16:52:04 -07:00
parent 765e3af815
commit ee142903bb
10 changed files with 24 additions and 75 deletions

View file

@ -131,4 +131,13 @@ impl AppletButton {
pub fn popup(&self) {
self.inner().popover.popup();
}
// XXX better API? Actual signal
pub fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> glib::SignalHandlerId {
self.inner()
.menu_button
.connect_activate(glib::clone!(@weak self as _self => move |_| {
f(&_self)
}))
}
}