[gtk+/gtk-2-24] status icon: Prevent size dithering



commit 2289695b69ee125e5b7f54538a12d3cf741028b7
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 5 12:08:16 2016 -0500

    status icon: Prevent size dithering
    
    We're seeing loops where the size of some status icons constantly
    dithers between 24 and 25. Since I couldn't track down exactly
    where the one extra pixel comes from, just stop reacting
    to single-pixel size changes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758893

 gtk/gtkstatusicon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c
index ec89752..54cccba 100644
--- a/gtk/gtkstatusicon.c
+++ b/gtk/gtkstatusicon.c
@@ -1690,7 +1690,7 @@ gtk_status_icon_size_allocate (GtkStatusIcon *status_icon,
   priv->image_width = allocation->width - GTK_MISC (priv->image)->xpad * 2;
   priv->image_height = allocation->height - GTK_MISC (priv->image)->ypad * 2;
 
-  if (priv->size != size)
+  if (priv->size - 1 > size || priv->size + 1 < size)
     {
       priv->size = size;
 


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