[gnome-games] ui: Stop using 'expand' and 'fill' child properties
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] ui: Stop using 'expand' and 'fill' child properties
- Date: Fri, 3 Aug 2018 21:40:03 +0000 (UTC)
commit 47bdb1fe83a5df4871fc07c63e3411477f1b95f4
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Thu Jul 26 22:27:49 2018 +0500
ui: Stop using 'expand' and 'fill' child properties
In most cases they can be removed, and in others the same effect can be
achieved by using correct 'halign', 'valign', 'hexpand' and 'vexpand'
values.
data/ui/collection-box.ui | 21 +--------------------
data/ui/dummy-display.ui | 9 ++-------
data/ui/empty-collection.ui | 20 --------------------
data/ui/error-display.ui | 16 ----------------
data/ui/game-icon-view.ui | 12 ------------
data/ui/gamepad-configurer.ui | 1 +
data/ui/keyboard-configurer.ui | 1 +
data/ui/preferences-page-controllers.ui | 1 +
data/ui/preferences-page-plugins.ui | 2 +-
data/ui/preferences-page-video.ui | 1 +
data/ui/preferences-window.ui | 3 ---
data/ui/remote-display.ui | 9 ++-------
12 files changed, 10 insertions(+), 86 deletions(-)
---
diff --git a/data/ui/collection-box.ui b/data/ui/collection-box.ui
index 6c5c8383..2e80ec69 100644
--- a/data/ui/collection-box.ui
+++ b/data/ui/collection-box.ui
@@ -15,15 +15,12 @@
<property name="visible">True</property>
<signal name="notify::text" handler="on_search_text_notify"/>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
</child>
<child>
<object class="GtkOverlay">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="vexpand">True</property>
<child>
<object class="GtkStack" id="viewstack">
<property name="visible">True</property>
@@ -80,10 +77,6 @@
<property name="can_focus">False</property>
<property name="active">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
</child>
<child>
<object class="GtkLabel">
@@ -91,10 +84,6 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes">Loading</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
</child>
<child>
<object class="GtkButton">
@@ -108,10 +97,6 @@
<class name="flat"/>
</style>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
</child>
<style>
<class name="app-notification"/>
@@ -121,10 +106,6 @@
</object>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</template>
<object class="GtkImage" id="close_icon">
diff --git a/data/ui/dummy-display.ui b/data/ui/dummy-display.ui
index fa411887..32d367b0 100644
--- a/data/ui/dummy-display.ui
+++ b/data/ui/dummy-display.ui
@@ -5,8 +5,8 @@
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="halign">fill</property>
- <property name="valign">fill</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
<child>
<object class="GtkGrid" id="grid">
@@ -68,11 +68,6 @@
</object>
</child>
</object>
-
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</template>
</interface>
diff --git a/data/ui/empty-collection.ui b/data/ui/empty-collection.ui
index b9461c91..eba0012d 100644
--- a/data/ui/empty-collection.ui
+++ b/data/ui/empty-collection.ui
@@ -19,11 +19,6 @@
<class name="dim-label"/>
</style>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
<object class="GtkBox" id="box">
@@ -43,11 +38,6 @@
<attribute name="scale" value="2"/>
</attributes>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
<object class="GtkLabel" id="empty-state-label">
@@ -59,18 +49,8 @@
<property name="use_markup">true</property>
<property name="wrap">true</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</template>
</interface>
diff --git a/data/ui/error-display.ui b/data/ui/error-display.ui
index e581378f..3c0ffe08 100644
--- a/data/ui/error-display.ui
+++ b/data/ui/error-display.ui
@@ -20,10 +20,6 @@
<class name="dim-label"/>
</style>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
</child>
<child>
<object class="GtkBox" id="box">
@@ -39,10 +35,6 @@
<property name="valign">center</property>
<property name="use-markup">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
</child>
<child>
<object class="GtkLabel" id="secondary_label">
@@ -53,16 +45,8 @@
<property name="use-markup">True</property>
<property name="wrap">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
</child>
</template>
</interface>
diff --git a/data/ui/game-icon-view.ui b/data/ui/game-icon-view.ui
index 75e02cf8..f919ffbf 100644
--- a/data/ui/game-icon-view.ui
+++ b/data/ui/game-icon-view.ui
@@ -10,10 +10,6 @@
<object class="GamesGameThumbnail" id="thumbnail">
<property name="visible">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
</child>
<child>
<object class="GtkLabel" id="title">
@@ -25,10 +21,6 @@
<property name="wrap">True</property>
<property name="wrap-mode">word-char</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
</child>
<child>
<object class="GtkLabel" id="subtitle">
@@ -43,10 +35,6 @@
<class name="dim-label"/>
</style>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
</child>
</template>
</interface>
diff --git a/data/ui/gamepad-configurer.ui b/data/ui/gamepad-configurer.ui
index 5fe2e27c..0ce5cd00 100644
--- a/data/ui/gamepad-configurer.ui
+++ b/data/ui/gamepad-configurer.ui
@@ -65,6 +65,7 @@
</template>
<object class="GtkHeaderBar" id="header_bar">
<property name="visible">True</property>
+ <property name="expand">True</property>
<child>
<object class="GtkButton" id="back_button">
<property name="visible">True</property>
diff --git a/data/ui/keyboard-configurer.ui b/data/ui/keyboard-configurer.ui
index 88fcecd4..734dc18a 100644
--- a/data/ui/keyboard-configurer.ui
+++ b/data/ui/keyboard-configurer.ui
@@ -65,6 +65,7 @@
</template>
<object class="GtkHeaderBar" id="header_bar">
<property name="visible">True</property>
+ <property name="expand">True</property>
<child>
<object class="GtkButton" id="back_button">
<property name="visible">True</property>
diff --git a/data/ui/preferences-page-controllers.ui b/data/ui/preferences-page-controllers.ui
index 01295b57..832e384e 100644
--- a/data/ui/preferences-page-controllers.ui
+++ b/data/ui/preferences-page-controllers.ui
@@ -99,6 +99,7 @@
</template>
<object class="GtkHeaderBar" id="default_header_bar">
<property name="visible">True</property>
+ <property name="expand">True</property>
<property name="title" translatable="yes">Controllers</property>
</object>
</interface>
diff --git a/data/ui/preferences-page-plugins.ui b/data/ui/preferences-page-plugins.ui
index 4b473704..d9c4fd89 100644
--- a/data/ui/preferences-page-plugins.ui
+++ b/data/ui/preferences-page-plugins.ui
@@ -6,7 +6,6 @@
<child>
<object class="GtkStack" id="stack">
<property name="visible">true</property>
- <property name="expand">True</property>
<property name="visible-child">plugins</property>
<property name="transition-type">GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT</property>
<child>
@@ -47,6 +46,7 @@
</template>
<object class="GtkHeaderBar" id="header_bar">
<property name="visible">True</property>
+ <property name="expand">True</property>
<property name="title" translatable="yes">Extensions</property>
</object>
</interface>
diff --git a/data/ui/preferences-page-video.ui b/data/ui/preferences-page-video.ui
index 8bfafa63..52935a69 100644
--- a/data/ui/preferences-page-video.ui
+++ b/data/ui/preferences-page-video.ui
@@ -47,6 +47,7 @@
</template>
<object class="GtkHeaderBar" id="header_bar">
<property name="visible">True</property>
+ <property name="expand">True</property>
<property name="title" translatable="yes">Video</property>
</object>
</interface>
diff --git a/data/ui/preferences-window.ui b/data/ui/preferences-window.ui
index 5cdaecb4..382ec24d 100644
--- a/data/ui/preferences-window.ui
+++ b/data/ui/preferences-window.ui
@@ -11,7 +11,6 @@
<child type="titlebar">
<object class="GtkBox" id="titlebar_box">
<property name="visible">True</property>
- <property name="expand">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkHeaderBar" id="left_header_bar">
@@ -32,7 +31,6 @@
</child>
<child>
<object class="GtkBox" id="hbox1">
- <property name="expand">True</property>
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
@@ -58,7 +56,6 @@
<object class="GtkSeparator" id="separator">
<property name="orientation">vertical</property>
<property name="visible">True</property>
- <property name="expand">False</property>
</object>
</child>
<child>
diff --git a/data/ui/remote-display.ui b/data/ui/remote-display.ui
index 7eb0de58..edd6a18e 100644
--- a/data/ui/remote-display.ui
+++ b/data/ui/remote-display.ui
@@ -5,8 +5,8 @@
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="halign">fill</property>
- <property name="valign">fill</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
<child>
<object class="GtkGrid" id="grid">
@@ -68,11 +68,6 @@
</object>
</child>
</object>
-
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</template>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]