From: Michael Tremer Date: Thu, 24 Sep 2020 12:23:59 +0000 (+0000) Subject: graphs: Correctly apply area opacity X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42ea528a730c0216f8302b64d878c319ac77eb11;p=collecty.git graphs: Correctly apply area opacity Signed-off-by: Michael Tremer --- diff --git a/src/collecty/plugins/contextswitches.py b/src/collecty/plugins/contextswitches.py index ff3d744..519c3e0 100644 --- a/src/collecty/plugins/contextswitches.py +++ b/src/collecty/plugins/contextswitches.py @@ -41,7 +41,7 @@ class GraphTemplateContextSwitches(base.GraphTemplate): "COMMENT:%s\\j" % (COLUMN % _("Maximum")), "AREA:ctxt%s:%s" % ( - lighten(PRIMARY, AREA_OPACITY), + transparency(PRIMARY, AREA_OPACITY), LABEL % _("Context Switches"), ), "GPRINT:ctxt_cur:%s" % INTEGER, diff --git a/src/collecty/plugins/df.py b/src/collecty/plugins/df.py index 948aec6..3a8cc6a 100644 --- a/src/collecty/plugins/df.py +++ b/src/collecty/plugins/df.py @@ -45,14 +45,14 @@ class GraphTemplateDiskUsage(base.GraphTemplate): "VDEF:percentage_left_now=percentage_left,LAST", # Area for the used space - "AREA:used%s:%s" % (lighten(LIGHT_RED, .66), _("Used")), + "AREA:used%s:%s" % (transparency(LIGHT_RED, AREA_OPACITY), _("Used")), "GPRINT:percentage_used_now: (%6.2lf%%)", "GPRINT:used_cur:%12s\:" % _("Current") + " %9.2lf%s", "GPRINT:used_min:%12s\:" % _("Minimum") + " %9.2lf%s", "GPRINT:used_max:%12s\:" % _("Maximum") + " %9.2lf%s", # Stacked area of unused space - "AREA:free%s:%s:STACK" % (lighten(LIGHT_GREEN, .66), _("Free")), + "AREA:free%s:%s:STACK" % (transparency(LIGHT_GREEN, AREA_OPACITY), _("Free")), "GPRINT:percentage_left_now: (%6.2lf%%)", "GPRINT:free_cur:%12s\:" % _("Current") + " %9.2lf%s", "GPRINT:free_min:%12s\:" % _("Minimum") + " %9.2lf%s",