[gtk+/wip/baedert/drawing: 4/18] notebook: Allocate unmapped tabs



commit 81fed62347571b9b8a85223713cf07bf8ec7cbfd
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]