diff options
author | Marcus Lundblad <ml@dfupdate.se> | 2023-05-03 23:48:16 +0200 |
---|---|---|
committer | Marcus Lundblad <ml@dfupdate.se> | 2023-05-08 23:25:29 +0200 |
commit | 0424d13dd993885586eecf7fb8a4f03c3d214216 (patch) | |
tree | ce2b28fc34e47ab2d6978662aa2468b8bb84b5e2 /data/ui | |
parent | 26e4437d3dbd74cafe215278365a852d3543b1c9 (diff) | |
download | gnome-maps-0424d13dd993885586eecf7fb8a4f03c3d214216.tar.gz |
Add zoom and rotation buttons class
Container with zoom controls and a rotation
button revealing when the map view is rotated
relative to "north is up". Clicking the rotation
button resets rotation to "north is up".
Diffstat (limited to 'data/ui')
-rw-r--r-- | data/ui/zoom-and-rotate-controls.ui | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/data/ui/zoom-and-rotate-controls.ui b/data/ui/zoom-and-rotate-controls.ui new file mode 100644 index 00000000..c6652209 --- /dev/null +++ b/data/ui/zoom-and-rotate-controls.ui @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <requires lib="gtk" version="4.0"/> + <template class="Gjs_ZoomAndRotateControls" parent="GtkBox"> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox"> + <property name="orientation">vertical</property> + <child> + <object class="GtkButton"> + <property name="focusable">1</property> + <property name="valign">center</property> + <property name="action-name">win.zoom-in</property> + <property name="tooltip-text" translatable="1" comments="Translators: This is a tooltip">Zoom In</property> + <property name="icon-name">value-increase-symbolic</property> + <style> + <class name="osd"/> + <class name="circular"/> + </style> + </object> + </child> + <child> + <object class="GtkButton"> + <property name="focusable">1</property> + <property name="valign">center</property> + <property name="action-name">win.zoom-out</property> + <property name="tooltip-text" translatable="1" comments="Translators: This is a tooltip">Zoom Out</property> + <property name="icon-name">value-decrease-symbolic</property> + <style> + <class name="osd"/> + <class name="circular"/> + </style> + </object> + </child> + <style> + <class name="linked"/> + </style> + </object> + </child> + <child> + <object class="GtkRevealer" id="revealer"> + <property name="transition-type">crossfade</property> + <child> + <object class="Gjs_RotationButton" id="rotationButton"> + <property name="focusable">1</property> + <property name="valign">center</property> + <property name="action-name">win.reset-rotation</property> + <property name="tooltip-text" translatable="1" comments="Translators: This is a tooltip">Reset Rotation</property> + <property name="icon-name">navigate-north-symbolic</property> + <style> + <class name="osd"/> + <class name="circular"/> + </style> + </object> + </child> + </object> + </child> + </template> +</interface> |