83
90
void draw_progress_bar (Cairo.Context cr, int x, float y, int width, int progress)
85
93
var fraction = (int) Math.floor (progress.clamp (0, 100) / 100.0 * width);
87
96
Granite.Drawing.Utilities.cairo_rounded_rectangle (cr, x, y, width,
89
98
cr.set_source_rgb (0.8, 0.8, 0.8);
93
102
Granite.Drawing.Utilities.cairo_rounded_rectangle (cr, x, y, fraction,
95
104
cr.set_source_rgb (0.3, 0.3, 0.3);