Code review comment for lp:~3v1n0/unity-greeter/shutdown-average-color-bg

Revision history for this message
Robert Ancell (robert-ancell) wrote :

This should be in BackgroundLoader.load:
8 + if (current_background[0] == '#' && current_background.length <= 7)
9 + {
10 + Gdk.Color c;
11 + Gdk.Color.parse (current_background, out c);
12 + current.average_color = {c.red/65535.0f, c.green/65535.0f, c.blue/65535.0f, 1.0f};
13 + }

You should probably use a property instead of a method for get_average_color (), i.e.

public Gdk.RGBA average_color
{
    get { return current.average_color; }
}

review: Needs Fixing

« Back to merge proposal