[gtk+] notebook: Set tabs child visible before allocating a size
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] notebook: Set tabs child visible before allocating a size
- Date: Sat, 22 Jul 2017 17:33:19 +0000 (UTC)
commit 343f2d8c087d6e5bb5343d0686f3653c6af0101a
Author: Timm Bäder <mail baedert org>
Date: Sat Jul 22 14:13:03 2017 +0200
notebook: Set tabs child visible before allocating a size
Otherwise we might skip them here, then set child-visible to TRUE and
then later snapshot them even though they have no valid size.
gtk/gtknotebook.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index bef55bd..ce55bc5 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -5094,6 +5094,10 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
break;
}
+ /* set child visible */
+ if (page->tab_label)
+ gtk_widget_set_child_visible (page->tab_widget, TRUE);
+
if (page == priv->cur_page && priv->operation == DRAG_OPERATION_REORDER)
{
GtkAllocation fixed_allocation = { priv->drag_window_x, priv->drag_window_y,
@@ -5160,10 +5164,6 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
break;
}
-
- /* set child visible */
- if (page->tab_label)
- gtk_widget_set_child_visible (page->tab_widget, TRUE);
}
/* Don't move the current tab past the last position during tabs reordering */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]