Skip to content

Commit c555053

Browse files
committed
Implement color info for SolidColor backgrounds
1 parent 947cd78 commit c555053

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

background/Background.vala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ public interface Gala.Background.Background : Object, Gdk.Paintable {
4545
}
4646

4747
public ColorInformation? get_color_information (int height) {
48-
return null;
48+
var r = color.red * 255;
49+
var g = color.green * 255;
50+
var b = color.blue * 255;
51+
52+
return {r, g, b, (0.3 * r + 0.59 * g + 0.11 * b), 0, 0};
4953
}
5054

5155
public void snapshot (Gdk.Snapshot gdk_snapshot, double width, double height) {

0 commit comments

Comments
 (0)