[gimp] tools: in performance-log-viewer.py, fix percentage cell renderer



commit 27dc9b815da79203a9f7edf2dfcb2526a490360a
Author: Ell <ell_se yahoo com>
Date:   Sat Oct 20 10:56:09 2018 -0400

    tools: in performance-log-viewer.py, fix percentage cell renderer

 tools/performance-log-viewer.py | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/tools/performance-log-viewer.py b/tools/performance-log-viewer.py
index 66164b7cf9..20add41898 100755
--- a/tools/performance-log-viewer.py
+++ b/tools/performance-log-viewer.py
@@ -2245,17 +2245,17 @@ class CellRendererPercentage (Gtk.CellRendererText):
         Gtk.CellRendererText.do_render (self,
                                         cr, widget,
                                         background_area, cell_area,
-                                        Gtk.CellRendererState (
-                                            flags |
-                                            Gtk.CellRendererState.SELECTED
-                                        ))
+                                        flags)
 
         value  = min (max (self.value, 0), 1)
         width  = round (full_width * value)
         height = full_height
 
         if width > 0 and height > 0:
-            state = Gtk.StateFlags (state | Gtk.StateFlags.SELECTED)
+            state = Gtk.StateFlags        (state |
+                                           Gtk.StateFlags.SELECTED)
+            flags = Gtk.CellRendererState (flags |
+                                           Gtk.CellRendererState.SELECTED)
 
             style.save ()
             style.set_state (state)
@@ -2278,10 +2278,7 @@ class CellRendererPercentage (Gtk.CellRendererText):
             Gtk.CellRendererText.do_render (self,
                                             cr, widget,
                                             background_area, cell_area,
-                                            Gtk.CellRendererState (
-                                                flags |
-                                                Gtk.CellRendererState.SELECTED
-                                            ))
+                                            flags)
 
             style.restore ()
 


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