diff --git a/Flos_Gtk4/src/core/MyDock.cpp b/Flos_Gtk4/src/core/MyDock.cpp index 1bc50ee..8898106 100644 --- a/Flos_Gtk4/src/core/MyDock.cpp +++ b/Flos_Gtk4/src/core/MyDock.cpp @@ -2,7 +2,11 @@ #include "Start.h" void add_dock(GtkWidget * overlay, GtkStyleProvider * provider){ - GtkWidget * dock_box; + GtkWidget * dock_box, * main_box; + + //Create a box for layout + main_box = gtk_box_new(GTK_ORIENTATION_VERTICAL,5); + //Get Widget GtkBuilder * builder = gtk_builder_new_from_resource("/org/gtk/daleclack/dock.ui"); dock_box = (GtkWidget*)gtk_builder_get_object(builder,"main_dock"); @@ -11,9 +15,14 @@ void add_dock(GtkWidget * overlay, GtkStyleProvider * provider){ add_start(GTK_BOX(dock_box)); //Put the dock on the overlay - gtk_widget_set_halign(dock_box,GTK_ALIGN_CENTER); - gtk_widget_set_valign(dock_box,GTK_ALIGN_END); - gtk_overlay_add_overlay(GTK_OVERLAY(overlay),dock_box); + gtk_box_append(GTK_BOX(main_box),dock_box); + gtk_widget_set_halign(main_box,GTK_ALIGN_CENTER); + gtk_widget_set_valign(main_box,GTK_ALIGN_END); + gtk_overlay_add_overlay(GTK_OVERLAY(overlay),main_box); + + //Add a separator + GtkWidget * space = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); + gtk_box_append(GTK_BOX(main_box),space); //Set Style gtk_style_context_add_provider(gtk_widget_get_style_context(dock_box), provider, G_MAXINT);