From 5848972cda68e7ab444db03364ca9d401da21528 Mon Sep 17 00:00:00 2001 From: Nico Alt <nicoalt@posteo.org> Date: Thu, 21 Feb 2019 20:33:30 +0100 Subject: [PATCH] Style first screen "choose nickname" --- src/window.py | 2 -- src/window.ui | 49 ++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/window.py b/src/window.py index 84b6943..0df4300 100644 --- a/src/window.py +++ b/src/window.py @@ -23,8 +23,6 @@ from .gi_composites import GtkTemplate class BriarGtkWindow(Gtk.ApplicationWindow): __gtype_name__ = 'BriarGtkWindow' - label = GtkTemplate.Child() - def __init__(self, **kwargs): super().__init__(**kwargs) self.init_template() diff --git a/src/window.ui b/src/window.ui index 713cc8c..61d21f4 100644 --- a/src/window.ui +++ b/src/window.ui @@ -12,16 +12,51 @@ </object> </child> <child> - <object class="GtkLabel" id="label"> - <property name="label">Secure messaging, anywhere.</property> + <object class="GtkGrid"> <property name="visible">True</property> - <attributes> - <attribute name="weight" value="bold"/> - <attribute name="scale" value="2"/> - </attributes> + <property name="can_focus">False</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="margin_left">18</property> + <property name="margin_right">18</property> + <property name="margin_top">18</property> + <property name="margin_bottom">18</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="username-label"> + <property name="visible">True</property> + <property name="halign">center</property> + <property name="label" translatable="yes">Nickname</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="username"> + <property name="visible">True</property> + <property name="placeholder_text" translatable="yes">Choose your nickname</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="username-next"> + <property name="visible">True</property> + <property name="halign">center</property> + <property name="label" translatable="yes">Next</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> + </child> </object> </child> </template> </interface> - -- GitLab