Daniel Brötzmann pushed to branch master at gajim / gajim
Commits: fd0fdb9b by wurstsalat at 2024-09-03T20:12:55+02:00 fix: MessageRowActions: Enable scrolling while cursor rests on action Fixes #11968 - - - - - 1 changed file: - gajim/gtk/conversation/rows/widgets.py Changes: ===================================== gajim/gtk/conversation/rows/widgets.py ===================================== @@ -101,6 +101,9 @@ def __init__(self) -> None: self.connect('enter-notify-event', self._on_hover) self.connect('leave-notify-event', self._on_hover) + self.add_events(Gdk.EventMask.SCROLL_MASK) + self.connect('scroll-event', self._on_scroll) + def hide_actions(self) -> None: # Set a 10ms timeout, which gives us enough time to inhibit hiding # if the cursor enters (cursor changes from row to MessageRowActions) @@ -235,6 +238,16 @@ def _on_hover(self, _eventbox: MessageRowActions, event: Gdk.EventCrossing) -> b return True + def _on_scroll(self, _widget: MessageRowActions, event: Gdk.EventScroll) -> bool: + # Emulate scroll behavior if cursor rests on MessageRowActions while scrolling + if event.direction == Gdk.ScrollDirection.UP: + app.window.activate_action('scroll-view-up') + + if event.direction == Gdk.ScrollDirection.DOWN: + app.window.activate_action('scroll-view-down') + + return Gdk.EVENT_PROPAGATE + def _on_reply_clicked(self, _button: Gtk.Button) -> None: if self._message_row is None: return View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/fd0fdb9bb1fe6015d8cab6957d13eae37792f868 -- View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/fd0fdb9bb1fe6015d8cab6957d13eae37792f868 You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list -- commits@gajim.org To unsubscribe send an email to commits-le...@gajim.org