[gnome-games/wip/exalm/libhandy2: 3/9] ui: Use HdyColumn for preferences pages
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/libhandy2: 3/9] ui: Use HdyColumn for preferences pages
- Date: Wed, 12 Sep 2018 12:46:34 +0000 (UTC)
commit 1d7b40e5342d9b50cfd48d39d127633d850f4933
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Wed Sep 12 13:51:17 2018 +0500
ui: Use HdyColumn for preferences pages
data/ui/preferences-page-controllers.ui | 85 ++++++++++++++++++---------------
data/ui/preferences-page-plugins.ui | 27 +++++++----
data/ui/preferences-page-video.ui | 47 ++++++++++--------
src/main.vala | 2 +
4 files changed, 95 insertions(+), 66 deletions(-)
---
diff --git a/data/ui/preferences-page-controllers.ui b/data/ui/preferences-page-controllers.ui
index f0fe2fd8..a0d8c3ec 100644
--- a/data/ui/preferences-page-controllers.ui
+++ b/data/ui/preferences-page-controllers.ui
@@ -5,57 +5,66 @@
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
+ <property name="hscrollbar-policy">never</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<child>
- <object class="GtkBox">
+ <object class="HdyColumn">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="margin">12</property>
- <property name="spacing">12</property>
+ <property name="expand">True</property>
+ <property name="maximum_width">600</property>
+ <property name="linear-growth-width">300</property>
<child>
- <object class="GtkLabel" id="gamepads_label">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Gamepads</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- <child>
- <object class="GtkFrame" id="gamepads_frame">
- <property name="visible">True</property>
- <property name="shadow_type">in</property>
+ <property name="orientation">vertical</property>
+ <property name="margin">12</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkListBox" id="gamepads_list_box">
+ <object class="GtkLabel" id="gamepads_label">
<property name="visible">True</property>
- <property name="selection_mode">none</property>
- <signal name="row-activated" handler="gamepads_list_box_row_activated"/>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Gamepads</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFrame" id="gamepads_frame">
+ <property name="visible">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkListBox" id="gamepads_list_box">
+ <property name="visible">True</property>
+ <property name="selection_mode">none</property>
+ <signal name="row-activated" handler="gamepads_list_box_row_activated"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Keyboard</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Keyboard</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- <child>
- <object class="GtkFrame">
- <property name="visible">True</property>
- <property name="shadow_type">in</property>
<child>
- <object class="GtkListBox" id="keyboard_list_box">
+ <object class="GtkFrame">
<property name="visible">True</property>
- <property name="selection_mode">none</property>
- <signal name="row-activated" handler="keyboard_list_box_row_activated"/>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkListBox" id="keyboard_list_box">
+ <property name="visible">True</property>
+ <property name="selection_mode">none</property>
+ <signal name="row-activated" handler="keyboard_list_box_row_activated"/>
+ </object>
+ </child>
</object>
</child>
</object>
diff --git a/data/ui/preferences-page-plugins.ui b/data/ui/preferences-page-plugins.ui
index 90c0eb61..f3c1ea5e 100644
--- a/data/ui/preferences-page-plugins.ui
+++ b/data/ui/preferences-page-plugins.ui
@@ -6,23 +6,32 @@
<child>
<object class="GtkScrolledWindow" id="plugins">
<property name="visible">true</property>
+ <property name="hscrollbar-policy">never</property>
<child>
<object class="GtkViewport">
<property name="visible">true</property>
<child>
- <object class="GtkBox">
+ <object class="HdyColumn">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="margin">12</property>
- <property name="spacing">12</property>
+ <property name="expand">True</property>
+ <property name="maximum_width">600</property>
+ <property name="linear-growth-width">300</property>
<child>
- <object class="GtkFrame">
- <property name="visible">true</property>
- <property name="shadow-type">in</property>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="margin">12</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkListBox" id="list_box">
- <property name="selection-mode">none</property>
+ <object class="GtkFrame">
<property name="visible">true</property>
+ <property name="shadow-type">in</property>
+ <child>
+ <object class="GtkListBox" id="list_box">
+ <property name="selection-mode">none</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
</object>
</child>
</object>
diff --git a/data/ui/preferences-page-video.ui b/data/ui/preferences-page-video.ui
index e3c1dde5..be65929d 100644
--- a/data/ui/preferences-page-video.ui
+++ b/data/ui/preferences-page-video.ui
@@ -5,34 +5,43 @@
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
+ <property name="hscrollbar-policy">never</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<child>
- <object class="GtkBox">
+ <object class="HdyColumn">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="margin">12</property>
- <property name="spacing">12</property>
+ <property name="expand">True</property>
+ <property name="maximum_width">600</property>
+ <property name="linear-growth-width">300</property>
<child>
- <object class="GtkLabel">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Filter</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- <child>
- <object class="GtkFrame">
- <property name="visible">True</property>
- <property name="shadow_type">in</property>
+ <property name="orientation">vertical</property>
+ <property name="margin">12</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Filter</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
<child>
- <object class="GtkListBox" id="filter_list_box">
+ <object class="GtkFrame">
<property name="visible">True</property>
- <property name="selection_mode">none</property>
- <signal name="row-activated" handler="filter_list_box_row_activated"/>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkListBox" id="filter_list_box">
+ <property name="visible">True</property>
+ <property name="selection_mode">none</property>
+ <signal name="row-activated" handler="filter_list_box_row_activated"/>
+ </object>
+ </child>
</object>
</child>
</object>
diff --git a/src/main.vala b/src/main.vala
index accb61fa..50cea9d0 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -7,6 +7,8 @@ int main (string[] args) {
Grl.init (ref args);
+ typeof (Hdy.Column).ensure ();
+
var app = new Games.Application ();
var result = app.run (args);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]