SOURCES: gtk+2-notebook-tab-draw-correctness.patch (NEW) - upstream fix for...

hawk hawk at pld-linux.org
Tue Oct 7 11:09:32 CEST 2008


Author: hawk                         Date: Tue Oct  7 09:09:32 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- upstream fix for 2.14.3, patch taken from gentoo

---- Files affected:
SOURCES:
   gtk+2-notebook-tab-draw-correctness.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/gtk+2-notebook-tab-draw-correctness.patch
diff -u /dev/null SOURCES/gtk+2-notebook-tab-draw-correctness.patch:1.1
--- /dev/null	Tue Oct  7 11:09:33 2008
+++ SOURCES/gtk+2-notebook-tab-draw-correctness.patch	Tue Oct  7 11:09:27 2008
@@ -0,0 +1,56 @@
+From gtk-2-14 branch:
+
+2008-09-26  Matthias Clasen
+
+	Bug 553578 - tabs are not drawn correctly
+
+	* gtk/gtknotebook.c: Track the visibility state of notebook tabs
+	between allocations so that we know to redraw the tab labels if
+	tabs are hidden and shown without changing position.
+	Reported by Marek Kašík, patch by Owen Taylor.
+
+--- branches/gtk-2-14/gtk/gtknotebook.c	2008/09/26 23:58:12	21525
++++ branches/gtk-2-14/gtk/gtknotebook.c	2008/09/27 00:00:32	21526
+@@ -153,6 +153,11 @@
+   guint reorderable  : 1;
+   guint detachable   : 1;
+ 
++  /* if true, the tab label was visible on last allocation; we track this so
++   * that we know to redraw the tab area if a tab label was hidden then shown
++   * without changing position */
++  guint tab_allocated_visible : 1;
++
+   GtkRequisition requisition;
+   GtkAllocation allocation;
+ 
+@@ -5556,9 +5561,15 @@
+   gint tab_curvature;
+   gint tab_pos = get_effective_tab_pos (notebook);
+   gboolean tab_allocation_changed;
++  gboolean was_visible = page->tab_allocated_visible;
+ 
+-  if (!page->tab_label)
+-    return FALSE;
++  if (!page->tab_label ||
++      !GTK_WIDGET_VISIBLE (page->tab_label) ||
++      !gtk_widget_get_child_visible (page->tab_label))
++    {
++      page->tab_allocated_visible = FALSE;
++      return was_visible;
++    }
+ 
+   xthickness = widget->style->xthickness;
+   ythickness = widget->style->ythickness;
+@@ -5630,6 +5641,12 @@
+ 
+   gtk_widget_size_allocate (page->tab_label, &child_allocation);
+ 
++  if (!was_visible)
++    {
++      page->tab_allocated_visible = TRUE;
++      tab_allocation_changed = TRUE;
++    }
++
+   return tab_allocation_changed;
+ }
+ 
================================================================


More information about the pld-cvs-commit mailing list