diff options
Diffstat (limited to 'SidebarManager.cpp')
-rw-r--r-- | SidebarManager.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/SidebarManager.cpp b/SidebarManager.cpp index 86e70d0..a0bfb81 100644 --- a/SidebarManager.cpp +++ b/SidebarManager.cpp @@ -2,19 +2,27 @@ SidebarManager::SidebarManager(EditManager *editor) - : sidebarView(editor), sidebarAdd(editor) + : sidebarView(editor), sidebarAdd(editor), tool(editor) { this->editor = editor; activeSidebar = NULL; - sidebar = gtk_scrolled_window_new(NULL, NULL); - g_object_ref_sink(G_OBJECT(sidebar)); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sidebar), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + sidebar = gtk_vbox_new(FALSE, 0); + g_object_ref_sink(G_OBJECT(sidebar)); + + gtk_box_pack_start_defaults(GTK_BOX(sidebar), sidebarToolbox.getWidget()); + + scrolledWindow = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_box_pack_end_defaults(GTK_BOX(sidebar), scrolledWindow); + gtk_widget_show(scrolledWindow); viewport = gtk_viewport_new(NULL, NULL); - gtk_container_add(GTK_CONTAINER(sidebar), viewport); + gtk_container_add(GTK_CONTAINER(scrolledWindow), viewport); gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE); + sidebarToolbox.addTool(&tool); + gtk_widget_show(sidebar); } @@ -42,5 +50,6 @@ void SidebarManager::update() { activeSidebar = newSidebar; } + sidebarToolbox.update(); activeSidebar->update(); } |