[gnome-builder] greeter: make title expand



commit 653bd172b64cd7f6e110cc1ef6ead5aff179b698
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jan 18 17:26:20 2019 -0800

    greeter: make title expand

 src/libide/greeter/ide-greeter-workspace.c  | 4 +++-
 src/libide/greeter/ide-greeter-workspace.ui | 9 +++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/greeter/ide-greeter-workspace.c b/src/libide/greeter/ide-greeter-workspace.c
index aced3ebc0..8b8406ec2 100644
--- a/src/libide/greeter/ide-greeter-workspace.c
+++ b/src/libide/greeter/ide-greeter-workspace.c
@@ -65,6 +65,7 @@ struct _IdeGreeterWorkspace
   GtkButton                *back_button;
   GtkButton                *select_button;
   GtkActionBar             *action_bar;
+  GtkLabel                 *title;
   IdeGreeterButtonsSection *buttons_section;
 
   guint                     selection_mode : 1;
@@ -183,7 +184,7 @@ stack_notify_visible_child_cb (IdeGreeterWorkspace *self,
   if (DZL_IS_DOCK_ITEM (visible_child))
     title = dzl_dock_item_get_title (DZL_DOCK_ITEM (visible_child));
 
-  gtk_header_bar_set_title (GTK_HEADER_BAR (self->header_bar), title);
+  gtk_label_set_label (self->title, title);
 
   sections = ide_str_equal0 ("sections", gtk_stack_get_visible_child_name (stack));
 
@@ -594,6 +595,7 @@ ide_greeter_workspace_class_init (IdeGreeterWorkspaceClass *klass)
   gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, select_button);
   gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, surfaces);
   gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, sections);
+  gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, title);
   gtk_widget_class_bind_template_callback (widget_class, stack_notify_visible_child_cb);
 
   g_type_ensure (IDE_TYPE_CLONE_SURFACE);
diff --git a/src/libide/greeter/ide-greeter-workspace.ui b/src/libide/greeter/ide-greeter-workspace.ui
index 05338f2f2..a531aef21 100644
--- a/src/libide/greeter/ide-greeter-workspace.ui
+++ b/src/libide/greeter/ide-greeter-workspace.ui
@@ -8,6 +8,15 @@
         <property name="show-fullscreen-button">false</property>
         <property name="show-close-button">true</property>
         <property name="visible">true</property>
+        <child type="title">
+          <object class="GtkLabel" id="title">
+            <property name="visible">true</property>
+            <property name="hexpand">true</property>
+            <style>
+              <class name="title"/>
+            </style>
+          </object>
+        </child>
         <child type="left">
           <object class="GtkButton" id="back_button">
             <property name="action-name">win.surface</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]