[gnome-builder] editor: the new button belongs in the primary box
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: the new button belongs in the primary box
- Date: Wed, 19 Jul 2017 11:15:26 +0000 (UTC)
commit 00ffca83c36d05ee8a4b1374c906581e13a8554e
Author: Christian Hergert <chergert redhat com>
Date: Mon Jul 10 01:51:04 2017 -0700
editor: the new button belongs in the primary box
According to the mockups, this button belongs near the
perspective selector with alternate spacing from the normal
groupings.
libide/editor/ide-editor-workbench-addin.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libide/editor/ide-editor-workbench-addin.c b/libide/editor/ide-editor-workbench-addin.c
index 44225f7..154ee43 100644
--- a/libide/editor/ide-editor-workbench-addin.c
+++ b/libide/editor/ide-editor-workbench-addin.c
@@ -174,6 +174,7 @@ ide_editor_workbench_addin_add_buttons (IdeEditorWorkbenchAddin *self,
self->new_button = g_object_new (DZL_TYPE_MENU_BUTTON,
"icon-name", "document-new-symbolic",
+ "focus-on-click", FALSE,
"show-arrow", TRUE,
"show-icons", FALSE,
"show-accels", FALSE,
@@ -184,7 +185,7 @@ ide_editor_workbench_addin_add_buttons (IdeEditorWorkbenchAddin *self,
"destroy",
G_CALLBACK (gtk_widget_destroyed),
&self->new_button);
- ide_workbench_header_bar_insert_left (header, GTK_WIDGET (self->new_button), GTK_PACK_START, 5);
+ ide_workbench_header_bar_add_primary (header, GTK_WIDGET (self->new_button));
}
static void
@@ -429,6 +430,8 @@ ide_editor_workbench_addin_perspective_set (IdeWorkbenchAddin *addin,
gtk_widget_set_visible (GTK_WIDGET (self->panels_box),
IDE_IS_EDITOR_PERSPECTIVE (perspective));
+ gtk_widget_set_visible (GTK_WIDGET (self->new_button),
+ IDE_IS_EDITOR_PERSPECTIVE (perspective));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]