Skip to content

Commit

Permalink
Implement color info for SolidColor backgrounds
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Sep 24, 2024
1 parent 947cd78 commit c555053
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion background/Background.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c555053

Please sign in to comment.