[gnome-games/wip/exalm/libhandy2: 16/21] preferences-page-controllers: Wrap into a HdyColumn
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/libhandy2: 16/21] preferences-page-controllers: Wrap into a HdyColumn
- Date: Mon, 17 Sep 2018 12:06:19 +0000 (UTC)
commit d82b161a2596c59a505e431785745037bf9999cd
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Mon Sep 17 16:48:41 2018 +0500
preferences-page-controllers: Wrap into a HdyColumn
Add nice whitespace on the left and right when the window is wide enough.
data/ui/preferences-page-controllers.ui | 84 ++++++++++++++++++---------------
src/main.vala | 1 +
2 files changed, 47 insertions(+), 38 deletions(-)
---
diff --git a/data/ui/preferences-page-controllers.ui b/data/ui/preferences-page-controllers.ui
index c5d18374..a0d8c3ec 100644
--- a/data/ui/preferences-page-controllers.ui
+++ b/data/ui/preferences-page-controllers.ui
@@ -10,53 +10,61 @@
<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/src/main.vala b/src/main.vala
index ea5640da..7aa30afe 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -7,6 +7,7 @@ int main (string[] args) {
Grl.init (ref args);
+ typeof (Hdy.Column).ensure ();
typeof (Hdy.TitleBar).ensure ();
var app = new Games.Application ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]