[gnome-maps/wip/mlundblad/toggle-scale-button: 3/3] layersPopover: Add checkbox for toggling the scale




commit ca3f1e831cd9cf34987f2fbfe124903d8fd33a0a
Author: Marcus Lundblad <ml dfupdate se>
Date:   Thu Apr 28 21:57:25 2022 +0200

    layersPopover: Add checkbox for toggling the scale
    
    As currently the only way to toggle showing the
    scale is using the keyboard shortcut, add a
    checkbox in the layers popover to enable
    hiding the scale on e.g. touch-screen-only
    devices.

 data/ui/layers-popover.ui | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/layers-popover.ui b/data/ui/layers-popover.ui
index 423c4a86..f51f0d75 100644
--- a/data/ui/layers-popover.ui
+++ b/data/ui/layers-popover.ui
@@ -9,6 +9,7 @@
         <property name="halign">center</property>
         <property name="valign">center</property>
         <property name="row_spacing">5</property>
+        <property name="margin">5</property>
         <child>
           <object class="GtkRadioButton" id="streetLayerButton">
             <property name="visible">True</property>
@@ -80,6 +81,33 @@
             <property name="top-attach">2</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkBox">
+            <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="halign">GTK_ALIGN_START</property>
+                <property name="label" translatable="yes">Show Scale</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkCheckButton">
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="action-name">win.show-scale</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">3</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkListBox" id="layersListBox">
             <property name="name">layers-list-box</property>
@@ -92,7 +120,7 @@
           </object>
           <packing>
             <property name="left-attach">0</property>
-            <property name="top-attach">3</property>
+            <property name="top-attach">4</property>
           </packing>
         </child>
         <child>
@@ -104,7 +132,7 @@
           </object>
           <packing>
             <property name="left-attach">0</property>
-            <property name="top-attach">4</property>
+            <property name="top-attach">5</property>
           </packing>
         </child>
       </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]