[gtk+] Make it possible to hide custom titlebars



commit c02a12a7460fb270c22db6958bf9024ecde8104a
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Sep 30 19:26:07 2013 -0400

    Make it possible to hide custom titlebars
    
    Previously, we were showing and hiding the custom titlebar
    widget in response to state changes such as maximization.
    Instead, use gtk_widget_set_child_visible() and leave
    show/hide to applications. This makes it possible to set
    a custom titlebar and hide it, for a titlebar-less appearance.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707132

 gtk/gtkwindow.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index e10500d..ba685c0 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5141,12 +5141,12 @@ update_window_buttons (GtkWindow *window)
   if (priv->fullscreen ||
       (maximized && priv->hide_titlebar_when_maximized))
     {
-      gtk_widget_hide (priv->title_box);
+      gtk_widget_set_child_visible (priv->title_box, FALSE);
       return;
     }
   else
     {
-      gtk_widget_show (priv->title_box);
+      gtk_widget_set_child_visible (priv->title_box, TRUE);
     }
 
   if (priv->titlebar == NULL)


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