week-view: Allow zooming with Ctrl+Scroll

So it's possible to zoom even if the device doesn't support pinching to
do so.
This commit is contained in:
Adrien Plazas
2022-06-23 19:29:17 +02:00
parent 7b19a0fca7
commit 6b39f7552b
2 changed files with 96 additions and 0 deletions
+20
View File
@@ -23,6 +23,26 @@
</object>
</child>
<!-- Scroll Event Controller -->
<child>
<object class="GtkEventControllerScroll">
<property name="propagation-phase">capture</property>
<property name="flags">vertical|kinetic</property>
<signal name="scroll" handler="on_scroll_controller_scroll_begin_cb" object="GcalWeekView" swapped="yes" />
<signal name="scroll" handler="on_scroll_controller_scroll_cb" object="GcalWeekView" swapped="yes" />
</object>
</child>
<!-- Motion Event Controller -->
<child>
<object class="GtkEventControllerMotion">
<property name="propagation-phase">capture</property>
<signal name="enter" handler="on_motion_controller_enter_cb" object="GcalWeekView" swapped="yes" />
<signal name="motion" handler="on_motion_controller_motion_cb" object="GcalWeekView" swapped="yes" />
<signal name="leave" handler="on_motion_controller_leave_cb" object="GcalWeekView" swapped="yes" />
</object>
</child>
<child>
<object class="GtkViewport">
<child>