[gtk/wip/otte/nodeeditor: 11/12] paned: hide the handle widget when <2 children are visible



commit c72226509d72e1a82d6fa5051a78a1abb638409c
Author: Benjamin Otte <otte redhat com>
Date:   Tue Mar 12 02:14:48 2019 +0100

    paned: hide the handle widget when <2 children are visible

 gtk/gtkpaned.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 604b9790d3..b7ec74340f 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -1300,6 +1300,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
             child2_allocation.height = child2_height;
         }
 
+      gtk_widget_set_child_visible (priv->handle_widget, TRUE);
+
       gtk_widget_size_allocate (priv->handle_widget, &handle_allocation, -1);
       gtk_widget_size_allocate (priv->child1, &child1_allocation, -1);
       gtk_widget_size_allocate (priv->child2, &child2_allocation, -1);
@@ -1321,6 +1323,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
                                     &(GtkAllocation) {0, 0, width, height}, -1);
 
         }
+
+      gtk_widget_set_child_visible (priv->handle_widget, FALSE);
     }
 }
 


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