[gnome-software: 4/18] app-context-bar: Make it specialize GtkBox




commit a540028d253bcd3962e42e44dd89c3aad5ef677c
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Aug 10 12:02:07 2021 +0200

    app-context-bar: Make it specialize GtkBox
    
    We don't need it to be a grid, and it will help us for the following
    commits.

 src/gs-app-context-bar.c  |  4 ++--
 src/gs-app-context-bar.h  |  2 +-
 src/gs-app-context-bar.ui | 24 +++---------------------
 3 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/src/gs-app-context-bar.c b/src/gs-app-context-bar.c
index a1850194e..79eae84a1 100644
--- a/src/gs-app-context-bar.c
+++ b/src/gs-app-context-bar.c
@@ -60,7 +60,7 @@ typedef enum
 
 struct _GsAppContextBar
 {
-       GtkGrid                  parent_instance;
+       GtkBox                   parent_instance;
 
        GsApp                   *app;  /* (nullable) (owned) */
        gulong                   app_notify_handler;
@@ -68,7 +68,7 @@ struct _GsAppContextBar
        GsAppContextTile        tiles[N_TILE_TYPES];
 };
 
-G_DEFINE_TYPE (GsAppContextBar, gs_app_context_bar, GTK_TYPE_GRID)
+G_DEFINE_TYPE (GsAppContextBar, gs_app_context_bar, GTK_TYPE_BOX)
 
 typedef enum {
        PROP_APP = 1,
diff --git a/src/gs-app-context-bar.h b/src/gs-app-context-bar.h
index 75daf9dfc..e0167475b 100644
--- a/src/gs-app-context-bar.h
+++ b/src/gs-app-context-bar.h
@@ -20,7 +20,7 @@ G_BEGIN_DECLS
 
 #define GS_TYPE_APP_CONTEXT_BAR (gs_app_context_bar_get_type ())
 
-G_DECLARE_FINAL_TYPE (GsAppContextBar, gs_app_context_bar, GS, APP_CONTEXT_BAR, GtkGrid)
+G_DECLARE_FINAL_TYPE (GsAppContextBar, gs_app_context_bar, GS, APP_CONTEXT_BAR, GtkBox)
 
 GtkWidget      *gs_app_context_bar_new         (GsApp                  *app);
 
diff --git a/src/gs-app-context-bar.ui b/src/gs-app-context-bar.ui
index 5f65cfb1a..7abc67455 100644
--- a/src/gs-app-context-bar.ui
+++ b/src/gs-app-context-bar.ui
@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="3.10"/>
-  <template class="GsAppContextBar" parent="GtkGrid">
-    <property name="column-homogeneous">True</property>
-    <property name="column-spacing">0</property>
-    <property name="row-homogeneous">True</property>
-    <property name="row-spacing">0</property>
+  <template class="GsAppContextBar" parent="GtkBox">
+    <property name="homogeneous">True</property>
+    <property name="spacing">0</property>
     <property name="visible">True</property>
     <property name="can-focus">True</property>
     <style>
@@ -87,10 +85,6 @@
           </object>
         </child>
       </object>
-      <packing>
-        <property name="left-attach">0</property>
-        <property name="top-attach">0</property>
-      </packing>
     </child>
 
     <child>
@@ -167,10 +161,6 @@
           </object>
         </child>
       </object>
-      <packing>
-        <property name="left-attach">1</property>
-        <property name="top-attach">0</property>
-      </packing>
     </child>
 
     <child>
@@ -249,10 +239,6 @@
           </object>
         </child>
       </object>
-      <packing>
-        <property name="left-attach">2</property>
-        <property name="top-attach">0</property>
-      </packing>
     </child>
 
     <child>
@@ -330,10 +316,6 @@
           </object>
         </child>
       </object>
-      <packing>
-        <property name="left-attach">3</property>
-        <property name="top-attach">0</property>
-      </packing>
     </child>
   </template>
 


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