[gnome-maps] LayersPopover: set frame using css not GtkFrame



commit acdff80be817e00a9873b4ea4c7a46c921a8fe77
Author: Hashem Nasarat <hashem riseup net>
Date:   Wed Jan 20 00:43:53 2016 -0500

    LayersPopover: set frame using css not GtkFrame
    
    GtkFrame in 3.19 has bug 760482 where it cuts off the bottom 2 pixels of
    its child. Setting the frame using the same styling as GtkFrame gets us
    the desired look with all our pixels intact.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760875

 data/ui/layers-popover.ui |   17 +++++++----------
 src/layersPopover.js      |    5 ++---
 2 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/data/ui/layers-popover.ui b/data/ui/layers-popover.ui
index 78a5a61..3ab634c 100644
--- a/data/ui/layers-popover.ui
+++ b/data/ui/layers-popover.ui
@@ -52,17 +52,14 @@
       </packing>
     </child>
     <child>
-      <object class="GtkFrame" id="layers-list-box-frame">
+      <object class="GtkListBox" id="layers-list-box">
+        <property name="name">layers-list-box</property>
         <property name="visible">false</property>
-        <property name="shadow-type">in</property>
-        <child>
-          <object class="GtkListBox" id="layers-list-box">
-            <property name="name">layers-list-box</property>
-            <property name="visible">true</property>
-            <property name="can_focus">False</property>
-            <property name="selection-mode">none</property>
-          </object>
-        </child>
+        <property name="can_focus">False</property>
+        <property name="selection-mode">none</property>
+        <style>
+          <class name="frame"/>
+        </style>
       </object>
       <packing>
         <property name="left-attach">0</property>
diff --git a/src/layersPopover.js b/src/layersPopover.js
index f07aa37..8543cf0 100644
--- a/src/layersPopover.js
+++ b/src/layersPopover.js
@@ -70,7 +70,6 @@ const LayersPopover = new Lang.Class({
                                       'street-layer-button',
                                       'aerial-layer-button',
                                       'layers-list-box',
-                                      'layers-list-box-frame',
                                       'load-layer-button' ]);
 
         this.parent({ width_request: 200,
@@ -101,7 +100,7 @@ const LayersPopover = new Lang.Class({
     _onRemoveClicked: function(row, button) {
         this._mapView.removeShapeLayer(row.shapeLayer);
         if (this.ui.layersListBox.get_children().length <= 0)
-            this.ui.layersListBoxFrame.hide();
+            this.ui.layersListBox.hide();
     },
 
     _onLoadLayerClicked: function(button) {
@@ -120,7 +119,7 @@ const LayersPopover = new Lang.Class({
         let row = new ShapeLayerRow({ shapeLayer: shapeLayer });
         row.closeButton.connect('clicked',
                                 this._onRemoveClicked.bind(this, row));
-        this.ui.layersListBoxFrame.show();
+        this.ui.layersListBox.show();
         return row;
     }
 });


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