diff --git a/data/io.github.nokse22.Exhibit.gschema.xml b/data/io.github.nokse22.Exhibit.gschema.xml
index 697624f..335126f 100644
--- a/data/io.github.nokse22.Exhibit.gschema.xml
+++ b/data/io.github.nokse22.Exhibit.gschema.xml
@@ -8,19 +8,19 @@
true
- false
+ true
- false
+ true
- false
+ true
- false
+ true
- false
+ true
1.0
diff --git a/data/window.ui b/data/window.ui
index 3779493..0bbc2e6 100644
--- a/data/window.ui
+++ b/data/window.ui
@@ -120,6 +120,7 @@ This application is experimental, crashes are expected.
diff --git a/src/window.py b/src/window.py
index 701911f..f1d2f55 100644
--- a/src/window.py
+++ b/src/window.py
@@ -178,12 +178,18 @@ def on_scroll(self, gesture, dx, dy):
@Gtk.Template.Callback("on_drag_update")
def on_drag_update(self, gesture, x_offset, y_offset):
- self.camera.elevation(-(self.drag_prev_offset[1] - y_offset))
- self.camera.azimuth(self.drag_prev_offset[0] - x_offset)
+ if gesture.get_current_button() == 1:
+ self.camera.elevation(-(self.drag_prev_offset[1] - y_offset))
+ self.camera.azimuth(self.drag_prev_offset[0] - x_offset)
+ elif gesture.get_current_button() == 2:
+ self.camera.pitch(-(self.drag_prev_offset[1] - y_offset)*0.05)
+ self.camera.yaw(-(self.drag_prev_offset[0] - x_offset)*0.05)
if self.window_settings.get_setting("point-up"):
self.camera.setViewUp((0.0, 1.0, 0.0))
+ print(gesture.get_current_button())
+
self.gl_area.queue_render()
self.drag_prev_offset = (x_offset, y_offset)