[gnome-builder] debugger: place controls above the editor
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] debugger: place controls above the editor
- Date: Sat, 2 Sep 2017 23:16:18 +0000 (UTC)
commit f50670b726df0b17ef23a4601016c73ee5676961
Author: Christian Hergert <chergert redhat com>
Date: Sat Sep 2 16:08:39 2017 -0700
debugger: place controls above the editor
This moves the controls to sit above the editor, where they cannot be
obscurred by switching panels and such. I think this is more contextual
too, since we are stepping through code (so it should be near the code).
libide/debugger/ide-debugger-editor-addin.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/libide/debugger/ide-debugger-editor-addin.c b/libide/debugger/ide-debugger-editor-addin.c
index 66f918d..5af8cb6 100644
--- a/libide/debugger/ide-debugger-editor-addin.c
+++ b/libide/debugger/ide-debugger-editor-addin.c
@@ -264,12 +264,12 @@ on_frame_activated (IdeDebuggerEditorAddin *self,
static void
ide_debugger_editor_addin_add_ui (IdeDebuggerEditorAddin *self)
{
- IdeWorkbenchHeaderBar *headerbar;
IdeWorkbench *workbench;
GtkWidget *scroller;
GtkWidget *box;
GtkWidget *hpaned;
GtkWidget *utilities;
+ GtkWidget *overlay;
g_assert (IDE_IS_DEBUGGER_EDITOR_ADDIN (self));
g_assert (IDE_IS_EDITOR_PERSPECTIVE (self->editor));
@@ -278,19 +278,18 @@ ide_debugger_editor_addin_add_ui (IdeDebuggerEditorAddin *self)
g_signal_connect ((ptr), "destroy", G_CALLBACK (gtk_widget_destroyed), &(ptr))
workbench = ide_widget_get_workbench (GTK_WIDGET (self->editor));
- headerbar = ide_workbench_get_headerbar (workbench);
+ overlay = ide_editor_perspective_get_overlay (self->editor);
self->controls = g_object_new (IDE_TYPE_DEBUGGER_CONTROLS,
"transition-duration", 500,
- "transition-type", GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT,
+ "transition-type", GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP,
"reveal-child", FALSE,
- "visible", FALSE,
+ "visible", TRUE,
+ "halign", GTK_ALIGN_CENTER,
+ "valign", GTK_ALIGN_END,
NULL);
OBSERVE_DESTROY (self->controls);
- ide_workbench_header_bar_insert_left (headerbar,
- GTK_WIDGET (self->controls),
- GTK_PACK_START,
- 100);
+ gtk_overlay_add_overlay (GTK_OVERLAY (overlay), GTK_WIDGET (self->controls));
self->panel = g_object_new (DZL_TYPE_DOCK_WIDGET,
"title", _("Debugger"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]