[gnome-contacts/wip/cdavis/hdy-style-updates] setup-window: Adjust styling
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/cdavis/hdy-style-updates] setup-window: Adjust styling
- Date: Tue, 9 Feb 2021 02:48:15 +0000 (UTC)
commit 879a530b74562f544c81024921f4b36be42194a6
Author: Christopher Davis <brainblasted disroot org>
Date: Mon Feb 8 18:47:05 2021 -0800
setup-window: Adjust styling
Use HdyActionWindow, HdyHeaderBar, and the .large-title
style class to adjust the setup window.
data/ui/contacts-setup-window.ui | 164 ++++++++++++++++++++-------------------
src/contacts-setup-window.vala | 2 +-
2 files changed, 86 insertions(+), 80 deletions(-)
---
diff --git a/data/ui/contacts-setup-window.ui b/data/ui/contacts-setup-window.ui
index 4194476f..eadcb7ae 100644
--- a/data/ui/contacts-setup-window.ui
+++ b/data/ui/contacts-setup-window.ui
@@ -1,103 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.22 -->
- <template class="ContactsSetupWindow" parent="GtkApplicationWindow">
+ <template class="ContactsSetupWindow" parent="HdyApplicationWindow">
<property name="default_width">800</property>
<property name="default_height">600</property>
- <child type="titlebar">
- <object class="GtkHeaderBar">
+ <child>
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="title" translatable="yes">Contacts Setup</property>
- <property name="show_close_button">False</property>
- <style>
- <class name="titlebar"/>
- </style>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkButton" id="setup_quit_button">
+ <object class="HdyHeaderBar">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Quit</property>
- <property name="use-underline">True</property>
- <property name="action_name">app.quit</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="setup_quit_button_atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">Cancel setup and
quit</property>
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Contacts Setup</property>
+ <property name="show_close_button">False</property>
+ <style>
+ <class name="titlebar"/>
+ </style>
+ <child>
+ <object class="GtkButton" id="setup_quit_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Quit</property>
+ <property name="use-underline">True</property>
+ <property name="action_name">app.quit</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="setup_quit_button_atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">Cancel setup and
quit</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="pack_type">start</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="pack_type">start</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="setup_done_button">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="focus_on_click">False</property>
- <property name="label" translatable="yes">_Done</property>
- <property name="use-underline">True</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="setup_done_button_atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">Setup complete</property>
+ <child>
+ <object class="GtkButton" id="setup_done_button">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="focus_on_click">False</property>
+ <property name="label" translatable="yes">_Done</property>
+ <property name="use-underline">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="setup_done_button_atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">Setup complete</property>
+ </object>
+ </child>
+ <style>
+ <class name="text-button"/>
+ <class name="suggested-action"/>
+ </style>
</object>
+ <packing>
+ <property name="pack_type">end</property>
+ </packing>
</child>
- <style>
- <class name="text-button"/>
- <class name="suggested-action"/>
- </style>
</object>
- <packing>
- <property name="pack_type">end</property>
- </packing>
</child>
- </object>
- </child>
- <child>
- <object class="GtkScrolledWindow">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="propagate_natural_height">True</property>
<child>
- <object class="HdyClamp">
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="margin_top">32</property>
- <property name="margin_bottom">32</property>
- <property name="margin_start">12</property>
- <property name="margin_end">12</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="propagate_natural_height">True</property>
<child>
- <object class="GtkGrid">
+ <object class="HdyClamp">
<property name="visible">True</property>
- <property name="valign">center</property>
- <property name="halign">center</property>
- <property name="border_width">12</property>
- <property name="row_spacing">24</property>
- <property name="orientation">vertical</property>
+ <property name="margin_top">32</property>
+ <property name="margin_bottom">32</property>
+ <property name="margin_start">12</property>
+ <property name="margin_end">12</property>
<child>
- <object class="GtkLabel">
+ <object class="GtkGrid">
<property name="visible">True</property>
+ <property name="valign">center</property>
<property name="halign">center</property>
- <property name="ellipsize">end</property>
- <property name="label" translatable="yes">Welcome</property>
- <attributes>
- <attribute name="scale" value="3.5"/>
- </attributes>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="halign">start</property>
- <property name="wrap">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Please select your main address book: this is
where new contacts will be added. If you keep your contacts in an online account, you can add them using the
online accounts settings.</property>
- </object>
- </child>
- <child>
- <object class="HdyClamp" id="content">
- <property name="visible">True</property>
- <property name="maximum_size">400</property>
+ <property name="border_width">12</property>
+ <property name="row_spacing">24</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="halign">center</property>
+ <property name="ellipsize">end</property>
+ <property name="label" translatable="yes">Welcome</property>
+ <style>
+ <class name="large-title"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="wrap">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Please select your main address book: this
is where new contacts will be added. If you keep your contacts in an online account, you can add them using
the online accounts settings.</property>
+ </object>
+ </child>
+ <child>
+ <object class="HdyClamp" id="content">
+ <property name="visible">True</property>
+ <property name="maximum_size">400</property>
+ </object>
+ </child>
</object>
</child>
</object>
diff --git a/src/contacts-setup-window.vala b/src/contacts-setup-window.vala
index 2fd25c6c..19a3db01 100644
--- a/src/contacts-setup-window.vala
+++ b/src/contacts-setup-window.vala
@@ -18,7 +18,7 @@
using Folks;
[GtkTemplate (ui = "/org/gnome/Contacts/ui/contacts-setup-window.ui")]
-public class Contacts.SetupWindow : Gtk.ApplicationWindow {
+public class Contacts.SetupWindow : Hdy.ApplicationWindow {
[GtkChild]
private Hdy.Clamp content;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]