[gnome-control-center/wip/gbsneto/new-goa-panel: 75/76] online-accounts: align the panel widgets in the middle
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/gbsneto/new-goa-panel: 75/76] online-accounts: align the panel widgets in the middle
- Date: Wed, 25 Jan 2017 22:54:07 +0000 (UTC)
commit b1782b2c4fc09fcb619cb930a917f00b89059b2a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Nov 10 19:16:27 2016 -0200
online-accounts: align the panel widgets in the middle
The current implementation of the Online Accounts panel allows
2 states: either the widgets of the panel fill the whole horizontal
space, or they shrink and fill only the absolutely minimum. The
ideal solution, however, is to make them grow with the panel.
Fix that by turn the main box into a GtkGrid, and adding stub widgets
that expand horizontally and pull the main widgets to the middle,
allowing them to cover at most 1/3 of the screen.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
panels/online-accounts/online-accounts.ui | 58 +++++++++++++++++++++++++++--
1 files changed, 54 insertions(+), 4 deletions(-)
---
diff --git a/panels/online-accounts/online-accounts.ui b/panels/online-accounts/online-accounts.ui
index fd675f5..3285f8c 100644
--- a/panels/online-accounts/online-accounts.ui
+++ b/panels/online-accounts/online-accounts.ui
@@ -73,15 +73,45 @@
<property name="hscrollbar_policy">never</property>
<property name="min_content_height">350</property>
<child>
- <object class="GtkBox">
+ <object class="GtkGrid">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="orientation">vertical</property>
- <property name="spacing">18</property>
- <property name="margin">18</property>
+ <property name="row-spacing">18</property>
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
- <property name="hexpand">True</property>
<property name="width-request">300</property>
+
+ <!--
+ Stub boxes to pull the widgets to the middle, and yet allow them to
+ grow and cover a third of the available space
+ -->
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="top-attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="height">5</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="top-attach">0</property>
+ <property name="left-attach">2</property>
+ <property name="height">5</property>
+ </packing>
+ </child>
+
<child>
<object class="GtkLabel">
<property name="visible">True</property>
@@ -91,6 +121,10 @@
<attribute name="scale" value="1.66" />
</attributes>
</object>
+ <packing>
+ <property name="top-attach">0</property>
+ <property name="left-attach">1</property>
+ </packing>
</child>
<child>
<object class="GtkLabel" id="offline_label">
@@ -99,6 +133,10 @@
<property name="wrap">True</property>
<property name="label" translatable="yes">No internet connection - connect to setup new
online accounts</property>
</object>
+ <packing>
+ <property name="top-attach">1</property>
+ <property name="left-attach">1</property>
+ </packing>
</child>
<child>
<object class="GtkFrame" id="accounts_frame">
@@ -113,6 +151,10 @@
</object>
</child>
</object>
+ <packing>
+ <property name="top-attach">2</property>
+ <property name="left-attach">1</property>
+ </packing>
</child>
<child>
<object class="GtkLabel">
@@ -125,6 +167,10 @@
<attribute name="weight" value="bold" />
</attributes>
</object>
+ <packing>
+ <property name="top-attach">2</property>
+ <property name="left-attach">1</property>
+ </packing>
</child>
<child>
<object class="GtkFrame">
@@ -154,6 +200,10 @@
</object>
</child>
</object>
+ <packing>
+ <property name="top-attach">4</property>
+ <property name="left-attach">1</property>
+ </packing>
</child>
</object>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]