Commit 09ea424d authored by Christian Hergert's avatar Christian Hergert
Browse files

editor: hide scrollbar when minimap is visible

We can simply hide the scrollbar using GTK_POLICY_EXTERNAL when the
overview map is visible.
parent ffdacb81
......@@ -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]);
}
}
......
Markdown is supported
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