From c55505367adde68967977721cf1d463b1efb2e0a Mon Sep 17 00:00:00 2001 From: Leonhard Kargl Date: Tue, 24 Sep 2024 19:46:15 +0200 Subject: [PATCH] Implement color info for SolidColor backgrounds --- background/Background.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/background/Background.vala b/background/Background.vala index 3be32946c..45cc20dff 100644 --- a/background/Background.vala +++ b/background/Background.vala @@ -45,7 +45,11 @@ public interface Gala.Background.Background : Object, Gdk.Paintable { } public ColorInformation? get_color_information (int height) { - return null; + var r = color.red * 255; + var g = color.green * 255; + var b = color.blue * 255; + + return {r, g, b, (0.3 * r + 0.59 * g + 0.11 * b), 0, 0}; } public void snapshot (Gdk.Snapshot gdk_snapshot, double width, double height) {