~indicator-multiload/indicator-multiload/trunk

« back to all changes in this revision

Viewing changes to src/graphmodel.vala

  • Committer: Michael Hofmann
  • Date: 2013-02-16 18:16:27 UTC
  • Revision ID: mh21@piware.de-20130216181627-3uoxoeuqj7g3zo8r
Beginning support for color schemes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    public ExpressionCache minimum { get; construct; }
26
26
    public ExpressionCache maximum { get; construct; }
27
27
    public string smooth { get; set; }
28
 
    public Gdk.Color background_color { get; set; }
29
 
    public uint alpha { get; set; }
30
28
    public bool enabled { get; set; }
31
29
    public string[] traces { get; set; }
32
30
    public double scale { get; private set; default = 1; }
100
98
        this.scalerhistory[this.scalerhistory.length - 1] = currentpeak;
101
99
        this.scale = Utils.mean(this.scalerhistory);
102
100
    }
103
 
 
104
 
    public void set_source_color(Cairo.Context ctx)
105
 
    {
106
 
        ctx.set_source_rgba(this.background_color.red / 65535.0,
107
 
                this.background_color.green / 65565.0,
108
 
                this.background_color.blue / 65565.0,
109
 
                this.alpha / 65565.0);
110
 
    }
111
101
}