[glade/margins-deprecation: 7/7] widget-editor: Replace margin right/left for end/start



commit 44577c829ad111254169daf289994db02a67f18e
Author: Carlos Soriano <csoriano redhat com>
Date:   Fri Jul 27 10:02:19 2018 +0200

    widget-editor: Replace margin right/left for end/start
    
    They have been deprecated for some time now and break RTL languages.
    
    This works implements margin-end and margin-start and deprecates
    margin-left and margin-start.
    
    All four properties are shown to be able to upgrade from previous gtk3
    versions, ideally this will be gone when Glade moves to gtk4.
    
    Closes https://gitlab.gnome.org/GNOME/glade/issues/319

 plugins/gtk+/glade-widget-editor.ui | 92 +++++++++++++++++++++++++++++++++----
 plugins/gtk+/gtk+.xml.in            |  6 ++-
 2 files changed, 86 insertions(+), 12 deletions(-)
---
diff --git a/plugins/gtk+/glade-widget-editor.ui b/plugins/gtk+/glade-widget-editor.ui
index e6397248..fead5506 100644
--- a/plugins/gtk+/glade-widget-editor.ui
+++ b/plugins/gtk+/glade-widget-editor.ui
@@ -561,7 +561,7 @@ Author: Tristan Van Berkom <tvb gnome org>
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">22</property>
+            <property name="top_attach">24</property>
             <property name="width">2</property>
             <property name="height">1</property>
           </packing>
@@ -578,7 +578,7 @@ Author: Tristan Van Berkom <tvb gnome org>
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">23</property>
+            <property name="top_attach">25</property>
             <property name="width">2</property>
             <property name="height">1</property>
           </packing>
@@ -595,7 +595,7 @@ Author: Tristan Van Berkom <tvb gnome org>
           </object>
           <packing>
             <property name="left_attach">2</property>
-            <property name="top_attach">22</property>
+            <property name="top_attach">24</property>
             <property name="width">4</property>
             <property name="height">1</property>
           </packing>
@@ -611,7 +611,7 @@ Author: Tristan Van Berkom <tvb gnome org>
           </object>
           <packing>
             <property name="left_attach">2</property>
-            <property name="top_attach">23</property>
+            <property name="top_attach">25</property>
             <property name="width">4</property>
             <property name="height">1</property>
           </packing>
@@ -685,7 +685,7 @@ instead of setting a literal tooltip</property>
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">24</property>
+            <property name="top_attach">26</property>
             <property name="width">2</property>
             <property name="height">1</property>
           </packing>
@@ -701,7 +701,7 @@ instead of setting a literal tooltip</property>
           </object>
           <packing>
             <property name="left_attach">2</property>
-            <property name="top_attach">24</property>
+            <property name="top_attach">26</property>
             <property name="width">4</property>
             <property name="height">1</property>
           </packing>
@@ -1007,6 +1007,24 @@ instead of setting a literal tooltip</property>
             <property name="height">1</property>
           </packing>
         </child>
+        <child>
+          <object class="GladePropertyLabel" id="margin_start_label">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="halign">end</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">margin-start</property>
+            <property name="custom_text" translatable="yes">Start:</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">20</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
         <child>
           <object class="GladePropertyLabel" id="margin_left_label">
             <property name="visible">True</property>
@@ -1018,9 +1036,27 @@ instead of setting a literal tooltip</property>
             <property name="property_name">margin-left</property>
             <property name="custom_text" translatable="yes">Left:</property>
           </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">22</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyLabel" id="margin_end_label">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="halign">end</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">margin-end</property>
+            <property name="custom_text" translatable="yes">End:</property>
+          </object>
           <packing>
             <property name="left_attach">2</property>
-            <property name="top_attach">20</property>
+            <property name="top_attach">21</property>
             <property name="width">1</property>
             <property name="height">1</property>
           </packing>
@@ -1038,11 +1074,27 @@ instead of setting a literal tooltip</property>
           </object>
           <packing>
             <property name="left_attach">2</property>
-            <property name="top_attach">21</property>
+            <property name="top_attach">22</property>
             <property name="width">1</property>
             <property name="height">1</property>
           </packing>
         </child>
+        <child>
+          <object class="GladePropertyShell" id="margin_start_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">margin-start</property>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="top_attach">20</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
         <child>
           <object class="GladePropertyShell" id="margin_left_editor">
             <property name="visible">True</property>
@@ -1052,9 +1104,25 @@ instead of setting a literal tooltip</property>
             <property name="hexpand">False</property>
             <property name="property_name">margin-left</property>
           </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">22</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="margin_end_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">margin-end</property>
+          </object>
           <packing>
             <property name="left_attach">3</property>
-            <property name="top_attach">20</property>
+            <property name="top_attach">21</property>
             <property name="width">2</property>
             <property name="height">1</property>
           </packing>
@@ -1070,7 +1138,7 @@ instead of setting a literal tooltip</property>
           </object>
           <packing>
             <property name="left_attach">3</property>
-            <property name="top_attach">21</property>
+            <property name="top_attach">22</property>
             <property name="width">2</property>
             <property name="height">1</property>
           </packing>
@@ -1176,9 +1244,13 @@ instead of setting a literal tooltip</property>
       <editor id="margin_bottom_label"/>
       <editor id="margin_top_editor"/>
       <editor id="margin_bottom_editor"/>
+      <editor id="margin_start_label"/>
       <editor id="margin_left_label"/>
+      <editor id="margin_end_label"/>
       <editor id="margin_right_label"/>
+      <editor id="margin_start_editor"/>
       <editor id="margin_left_editor"/>
+      <editor id="margin_end_editor"/>
       <editor id="margin_right_editor"/>
     </child-editors>
   </template>
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index 422b50e2..fea366f1 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -80,8 +80,10 @@
           <property id="hexpand-set" disabled="True" since="3.0"/>
           <property id="vexpand-set" disabled="True" since="3.0"/>
           <property id="margin" disabled="True" since="3.0"/>
-          <property id="margin-left" custom-layout="True" since="3.0"/>
-          <property id="margin-right" custom-layout="True" since="3.0"/>
+          <property id="margin-start" custom-layout="True" since="3.12"/>
+          <property id="margin-left" custom-layout="True" since="3.0" deprecated="True"/>
+          <property id="margin-end" custom-layout="True" since="3.12"/>
+          <property id="margin-right" custom-layout="True" since="3.0" deprecated="True"/>
           <property id="margin-top" custom-layout="True" since="3.0"/>
           <property id="margin-bottom" custom-layout="True" since="3.0"/>
           


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