[gtk: 17/60] broadway: Correct handling of opaque colors
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 17/60] broadway: Correct handling of opaque colors
- Date: Sat, 5 Sep 2020 13:54:21 +0000 (UTC)
commit a97ea17c926c80b16e18485e4fee034fda9e7544
Author: Alexander Larsson <alexl redhat com>
Date: Wed Aug 26 12:18:28 2020 +0200
broadway: Correct handling of opaque colors
If alpha is 255, we use rgb() instead of rgba(), not if alpha is 0.
This makes the title bar gradient go from fully transparent to blue
rather than black to blue..
gdk/broadway/broadway.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js
index 21554546c2..dcbe42f8d1 100644
--- a/gdk/broadway/broadway.js
+++ b/gdk/broadway/broadway.js
@@ -396,7 +396,7 @@ TransformNodes.prototype.decode_color = function() {
var g = (rgba >> 8) & 0xff;
var b = (rgba >> 0) & 0xff;
var c;
- if (a == 0)
+ if (a == 255)
c = "rgb(" + r + "," + g + "," + b + ")";
else
c = "rgba(" + r + "," + g + "," + b + "," + (a / 255.0) + ")";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]