[gtk+/wip/baedert/drawing: 343/348] notebook: Allocate unmapped tabs



commit fdc3a8f7816a2ba56c7809404e3c757becd82025
Author: Timm Bäder <mail baedert org>
Date:   Wed Jul 5 16:04:59 2017 +0200

    notebook: Allocate unmapped tabs

 gtk/gtknotebook.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index aad62a7..64576a5 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2210,8 +2210,10 @@ static gboolean
 gtk_notebook_page_tab_label_is_visible (GtkNotebookPage *page)
 {
   return page->tab_label &&
-         gtk_widget_is_drawable (page->tab_widget) &&
-         gtk_widget_is_drawable (page->tab_label);
+         gtk_widget_get_visible (page->tab_widget) &&
+         gtk_widget_get_child_visible (page->tab_widget) &&
+         gtk_widget_get_visible (page->tab_label) &&
+         gtk_widget_get_child_visible (page->tab_label);
 }
 
 static GList*
@@ -5107,8 +5109,7 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook          *notebook,
           gtk_widget_size_allocate (page->tab_widget, &fixed_allocation);
           gtk_widget_get_clip (page->tab_widget, &page_clip);
         }
-      else if (gtk_widget_is_drawable (page->tab_widget) &&
-               gtk_widget_is_drawable (page->tab_label))
+      else if (gtk_notebook_page_tab_label_is_visible (page))
         {
           gtk_widget_size_allocate (page->tab_widget, &child_allocation);
           gtk_widget_get_clip (page->tab_widget, &page_clip);


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