[sysprof] libsysprof-ui: mark negative durations as red



commit 28bcb5daee6705636d8feadbd75c450b52d33357
Author: Christian Hergert <chergert redhat com>
Date:   Thu May 16 12:52:36 2019 -0700

    libsysprof-ui: mark negative durations as red

 src/libsysprof-ui/sysprof-cell-renderer-duration.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/libsysprof-ui/sysprof-cell-renderer-duration.c 
b/src/libsysprof-ui/sysprof-cell-renderer-duration.c
index c7050c4..cc960d0 100644
--- a/src/libsysprof-ui/sysprof-cell-renderer-duration.c
+++ b/src/libsysprof-ui/sysprof-cell-renderer-duration.c
@@ -156,7 +156,11 @@ sysprof_cell_renderer_duration_render (GtkCellRenderer      *renderer,
           pango_attr_list_unref (list);
         }
 
-      rgba.alpha = 0.4;
+      if (priv->end_time < priv->begin_time)
+        gdk_rgba_parse (&rgba, "#f00");
+      else
+        rgba.alpha = 0.4;
+
       gdk_cairo_set_source_rgba (cr, &rgba);
       pango_cairo_show_layout (cr, layout);
 


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