[epiphany/wip/exalm/gtk4-cleanups-3: 9/18] encoding-row: Port to GtkBox




commit ce53335cc664dea2b6881e2f371c7dc125ca36ee
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Dec 2 01:24:44 2021 +0500

    encoding-row: Port to GtkBox

 src/ephy-encoding-row.c           |  4 ++--
 src/ephy-encoding-row.h           |  2 +-
 src/resources/gtk/encoding-row.ui | 23 ++++++++---------------
 3 files changed, 11 insertions(+), 18 deletions(-)
---
diff --git a/src/ephy-encoding-row.c b/src/ephy-encoding-row.c
index 3fabc1e1c..f97955ac7 100644
--- a/src/ephy-encoding-row.c
+++ b/src/ephy-encoding-row.c
@@ -27,7 +27,7 @@
 #include <gtk/gtk.h>
 
 struct _EphyEncodingRow {
-  GtkGrid parent_instance;
+  GtkBox parent_instance;
 
   EphyEncoding *encoding;
 
@@ -44,7 +44,7 @@ enum {
 
 static GParamSpec *obj_properties[LAST_PROP];
 
-G_DEFINE_TYPE (EphyEncodingRow, ephy_encoding_row, GTK_TYPE_GRID)
+G_DEFINE_TYPE (EphyEncodingRow, ephy_encoding_row, GTK_TYPE_BOX)
 
 void
 ephy_encoding_row_set_selected (EphyEncodingRow *row,
diff --git a/src/ephy-encoding-row.h b/src/ephy-encoding-row.h
index d6007d8f3..0bd628dac 100644
--- a/src/ephy-encoding-row.h
+++ b/src/ephy-encoding-row.h
@@ -26,7 +26,7 @@
 G_BEGIN_DECLS
 
 #define EPHY_TYPE_ENCODING_ROW (ephy_encoding_row_get_type ())
-G_DECLARE_FINAL_TYPE (EphyEncodingRow, ephy_encoding_row, EPHY, ENCODING_ROW, GtkGrid);
+G_DECLARE_FINAL_TYPE (EphyEncodingRow, ephy_encoding_row, EPHY, ENCODING_ROW, GtkBox);
 
 EphyEncodingRow *ephy_encoding_row_new          (EphyEncoding    *encoding);
 
diff --git a/src/resources/gtk/encoding-row.ui b/src/resources/gtk/encoding-row.ui
index bb639b721..966a1017f 100644
--- a/src/resources/gtk/encoding-row.ui
+++ b/src/resources/gtk/encoding-row.ui
@@ -1,26 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <template class="EphyEncodingRow" parent="GtkGrid">
+  <template class="EphyEncodingRow" parent="GtkBox">
     <property name="visible">True</property> <!-- TODO remove when never called manually -->
     <property name="halign">center</property>
     <property name="height-request">30</property>
+    <property name="spacing">8</property>
     <child>
-      <object class="GtkGrid">
+      <object class="GtkLabel" id="encoding_label">
         <property name="visible">True</property>
-        <property name="vexpand">True</property>
-        <property name="column-spacing">8</property>
-        <child>
-          <object class="GtkLabel" id="encoding_label">
-            <property name="visible">True</property>
-            <property name="vexpand">True</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkImage" id="selected_image">
-            <property name="icon-name">object-select-symbolic</property>
-          </object>
-        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkImage" id="selected_image">
+        <property name="icon-name">object-select-symbolic</property>
       </object>
     </child>
   </template>


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