[gnome-builder] pill-box: avoid deprecated xpad and ypad properties



commit e9996577675e31afbfcd6fbddbcf6b91d8f438a5
Author: Christian Hergert <christian hergert me>
Date:   Mon May 11 14:02:33 2015 -0700

    pill-box: avoid deprecated xpad and ypad properties
    
    Sadly, we need to shove this in yet another box to avoid using the
    deprecated properties. A bit overkill, but such is life.

 data/ui/gb-greeter-pill-box.ui |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/data/ui/gb-greeter-pill-box.ui b/data/ui/gb-greeter-pill-box.ui
index b6e1824..069e75f 100644
--- a/data/ui/gb-greeter-pill-box.ui
+++ b/data/ui/gb-greeter-pill-box.ui
@@ -6,15 +6,27 @@
       <class name="pill-box"/>
     </style>
     <child>
-      <object class="GtkLabel" id="label">
-        <property name="xpad">6</property>
-        <property name="ypad">3</property>
-        <property name="hexpand">false</property>
-        <property name="valign">baseline</property>
+      <!--
+        To avoid using depcreated xpad/ypad in GtkLabel, we add the styling here.
+        It can't go in the parent or the CSS styling would be applied inside the
+        margin area.
+      -->
+      <object class="GtkBox">
         <property name="visible">true</property>
-        <attributes>
-          <attribute name="scale" value="0.833333"/>
-        </attributes>
+        <property name="margin-top">3</property>
+        <property name="margin-bottom">3</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <child>
+          <object class="GtkLabel" id="label">
+            <property name="hexpand">false</property>
+            <property name="valign">baseline</property>
+            <property name="visible">true</property>
+            <attributes>
+              <attribute name="scale" value="0.833333"/>
+            </attributes>
+          </object>
+        </child>
       </object>
     </child>
   </template>


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