Commit 34f0cc36 authored by Ell's avatar Ell

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

(cherry picked from commit 27dc9b815da79203a9f7edf2dfcb2526a490360a)
parent 728534d4
...@@ -2245,17 +2245,17 @@ class CellRendererPercentage (Gtk.CellRendererText): ...@@ -2245,17 +2245,17 @@ class CellRendererPercentage (Gtk.CellRendererText):
Gtk.CellRendererText.do_render (self, Gtk.CellRendererText.do_render (self,
cr, widget, cr, widget,
background_area, cell_area, background_area, cell_area,
Gtk.CellRendererState ( flags)
flags |
Gtk.CellRendererState.SELECTED
))
value = min (max (self.value, 0), 1) value = min (max (self.value, 0), 1)
width = round (full_width * value) width = round (full_width * value)
height = full_height height = full_height
if width > 0 and height > 0: 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.save ()
style.set_state (state) style.set_state (state)
...@@ -2278,10 +2278,7 @@ class CellRendererPercentage (Gtk.CellRendererText): ...@@ -2278,10 +2278,7 @@ class CellRendererPercentage (Gtk.CellRendererText):
Gtk.CellRendererText.do_render (self, Gtk.CellRendererText.do_render (self,
cr, widget, cr, widget,
background_area, cell_area, background_area, cell_area,
Gtk.CellRendererState ( flags)
flags |
Gtk.CellRendererState.SELECTED
))
style.restore () style.restore ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment