gtk+ r20973 - in trunk: . gtk



Author: carlosg
Date: Mon Aug  4 14:46:22 2008
New Revision: 20973
URL: http://svn.gnome.org/viewvc/gtk+?rev=20973&view=rev

Log:
2008-08-04  Carlos Garnacho  <carlos imendio com>

        * gtk/gtknotebook.c (gtk_notebook_expose): Set drag window background
        to be the GtkNotebook background color. This is a workaround to
        prevent black pixels in rounded tabs when reordering. Improves
        #368234.


Modified:
   trunk/ChangeLog
   trunk/gtk/gtknotebook.c

Modified: trunk/gtk/gtknotebook.c
==============================================================================
--- trunk/gtk/gtknotebook.c	(original)
+++ trunk/gtk/gtknotebook.c	Mon Aug  4 14:46:22 2008
@@ -2147,6 +2147,19 @@
   if (event->window == priv->drag_window)
     {
       GdkRectangle area = { 0, };
+      cairo_t *cr;
+
+      /* FIXME: This is a workaround to make tabs reordering work better
+       * with engines with rounded tabs. If the drag window background
+       * isn't set, the rounded corners would be black.
+       *
+       * Ideally, these corners should be made transparent, Either by using
+       * ARGB visuals or shape windows.
+       */
+      cr = gdk_cairo_create (priv->drag_window);
+      gdk_cairo_set_source_color (cr, &widget->style->bg [GTK_STATE_NORMAL]);
+      cairo_paint (cr);
+      cairo_destroy (cr);
 
       gdk_drawable_get_size (priv->drag_window,
 			     &area.width, &area.height);



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