[gnome-builder] editor: hide scrollbar when minimap is visible
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: hide scrollbar when minimap is visible
- Date: Tue, 28 Jun 2016 00:09:04 +0000 (UTC)
commit 09ea424de14b9d2e7db6938a261a140ffc9a5804
Author: Christian Hergert <chergert redhat com>
Date: Sun Jun 26 00:49:20 2016 -0700
editor: hide scrollbar when minimap is visible
We can simply hide the scrollbar using GTK_POLICY_EXTERNAL when the
overview map is visible.
libide/editor/ide-editor-frame.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libide/editor/ide-editor-frame.c b/libide/editor/ide-editor-frame.c
index 51bf307..59cbb09 100644
--- a/libide/editor/ide-editor-frame.c
+++ b/libide/editor/ide-editor-frame.c
@@ -610,7 +610,7 @@ ide_editor_frame_get_show_map (IdeEditorFrame *self)
static void
ide_editor_frame_set_show_map (IdeEditorFrame *self,
- gboolean show_map)
+ gboolean show_map)
{
g_assert (IDE_IS_EDITOR_FRAME (self));
@@ -643,6 +643,11 @@ ide_editor_frame_set_show_map (IdeEditorFrame *self,
g_signal_emit_by_name (self->source_map, "show-map");
}
+ /* Hide scrollbars when map is enabled. */
+ g_object_set (self->scrolled_window,
+ "vscrollbar-policy", show_map ? GTK_POLICY_EXTERNAL : GTK_POLICY_AUTOMATIC,
+ NULL);
+
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_SHOW_MAP]);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]