Commit 13590aa1 authored by Christian Hergert's avatar Christian Hergert
Browse files

greeter: move button bar to action bar

parent 6dafce81
......@@ -43,41 +43,18 @@ ide_greeter_buttons_section_class_init (IdeGreeterButtonsSectionClass *klass)
static void
ide_greeter_buttons_section_init (IdeGreeterButtonsSection *self)
{
PangoAttrList *attrs;
GtkBox *vbox;
GtkLabel *label;
g_object_set (self,
"width-request", 600,
"halign", GTK_ALIGN_CENTER,
NULL);
attrs = pango_attr_list_new ();
pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
vbox = g_object_new (GTK_TYPE_BOX,
"orientation", GTK_ORIENTATION_VERTICAL,
"spacing", 6,
"visible", TRUE,
NULL);
gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (vbox));
label = g_object_new (GTK_TYPE_LABEL,
"attributes", attrs,
"xalign", 0.0f,
"label", _("Add a Project"),
"visible", TRUE,
NULL);
dzl_gtk_widget_add_style_class (GTK_WIDGET (label), "dim-label");
gtk_container_add (GTK_CONTAINER (vbox), GTK_WIDGET (label));
self->box = g_object_new (DZL_TYPE_PRIORITY_BOX,
"margin-bottom", 6,
"margin-top", 6,
"orientation", GTK_ORIENTATION_HORIZONTAL,
"homogeneous", TRUE,
"halign", GTK_ALIGN_CENTER,
"hexpand", TRUE,
"spacing", 12,
"width-request", 600,
"visible", TRUE,
NULL);
gtk_container_add (GTK_CONTAINER (vbox), GTK_WIDGET (self->box));
gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->box));
ide_greeter_buttons_section_add_button (self,
0,
......@@ -94,8 +71,6 @@ ide_greeter_buttons_section_init (IdeGreeterButtonsSection *self)
"action-name", "win.surface",
"action-target", g_variant_new_string ("clone"),
NULL));
g_clear_pointer (&attrs, pango_attr_list_unref);
}
void
......
......@@ -27,6 +27,7 @@
<property name="visible">true</property>
<child>
<object class="GtkLabel" id="title">
<property name="ellipsize">end</property>
<property name="visible">true</property>
<property name="xalign">0.0</property>
<attributes>
......@@ -36,6 +37,7 @@
</child>
<child>
<object class="GtkLabel" id="subtitle">
<property name="ellipsize">end</property>
<property name="visible">true</property>
<property name="xalign">0.0</property>
<style>
......
......@@ -587,8 +587,8 @@ ide_greeter_workspace_class_init (IdeGreeterWorkspaceClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-greeter-workspace.ui");
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, action_bar);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, back_button);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, buttons_section);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, back_button);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, clone_surface);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, header_bar);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, left_box);
......
......@@ -109,11 +109,6 @@
<property name="orientation">vertical</property>
<property name="spacing">32</property>
<property name="visible">true</property>
<child>
<object class="IdeGreeterButtonsSection" id="buttons_section">
<property name="visible">true</property>
</object>
</child>
</object>
</child>
</object>
......@@ -122,6 +117,17 @@
</child>
</object>
</child>
<child>
<object class="GtkActionBar" id="project_action_bar">
<property name="visible">true</property>
<child>
<object class="IdeGreeterButtonsSection" id="buttons_section">
<property name="halign">center</property>
<property name="visible">true</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkActionBar" id="action_bar">
<child>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment