feat(tray): handle scroll events

This commit is contained in:
Aleksei Bavshin
2021-06-26 16:33:25 -07:00
parent 1418f96e46
commit 245f7f4b11
3 changed files with 63 additions and 1 deletions

View File

@ -70,6 +70,12 @@ class Item : public sigc::trackable {
static void onMenuDestroyed(Item* self, GObject* old_menu_pointer);
void makeMenu();
bool handleClick(GdkEventButton* const& /*ev*/);
bool handleScroll(GdkEventScroll* const&);
// smooth scrolling threshold
gdouble scroll_threshold_ = 0;
gdouble distance_scrolled_x_ = 0;
gdouble distance_scrolled_y_ = 0;
Glib::RefPtr<Gio::DBus::Proxy> proxy_;
Glib::RefPtr<Gio::Cancellable> cancellable_;