[gnome-builder/wip/gtk4-port: 178/343] libide/gui: setup orientation for new frames




commit 0632c55d08a5b1c82746538b8cd384742990c9c3
Author: Christian Hergert <chergert redhat com>
Date:   Wed Mar 30 02:15:55 2022 -0700

    libide/gui: setup orientation for new frames

 src/libide/gui/ide-primary-workspace.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/gui/ide-primary-workspace.c b/src/libide/gui/ide-primary-workspace.c
index 3d2a1dac2..3d35222ea 100644
--- a/src/libide/gui/ide-primary-workspace.c
+++ b/src/libide/gui/ide-primary-workspace.c
@@ -127,7 +127,17 @@ ide_primary_workspace_add_pane (IdeWorkspace     *workspace,
     }
 
   while (!(parent = panel_paned_get_nth_child (paned, nth)))
-    panel_paned_append (paned, panel_frame_new ());
+    {
+      parent = panel_frame_new ();
+
+      if (edge == PANEL_DOCK_POSITION_START ||
+          edge == PANEL_DOCK_POSITION_END)
+        gtk_orientable_set_orientation (GTK_ORIENTABLE (parent), GTK_ORIENTATION_VERTICAL);
+      else
+        gtk_orientable_set_orientation (GTK_ORIENTABLE (parent), GTK_ORIENTATION_HORIZONTAL);
+
+      panel_paned_append (paned, parent);
+    }
 
   if (ide_panel_position_get_depth (position, &depth))
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]