[gnome-shell] Handle "color: inherit" directly in get_color_from_term(), not in libcroco
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Handle "color: inherit" directly in get_color_from_term(), not in libcroco
- Date: Fri, 29 Nov 2019 17:58:51 +0000 (UTC)
commit 236bdaa53cb157d7029b01d5ba56320617f5d2c8
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Nov 21 18:30:03 2019 -0600
Handle "color: inherit" directly in get_color_from_term(), not in libcroco
The idea is to move handling of "inherit" as early in the parsing as possible.
Part of https://gitlab.gnome.org/GNOME/gnome-shell/issues/1934
src/st/st-theme-node.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c
index bd2f21f83b..bb630d9d3c 100644
--- a/src/st/st-theme-node.c
+++ b/src/st/st-theme-node.c
@@ -581,10 +581,14 @@ get_color_from_term (StThemeNode *node,
CRRgb rgb;
enum CRStatus status;
+ if (term_is_inherit (term))
+ {
+ return VALUE_INHERIT;
+ }
/* Since libcroco doesn't know about rgba colors, it can't handle
* the transparent keyword
*/
- if (term_is_transparent (term))
+ else if (term_is_transparent (term))
{
*color = TRANSPARENT_COLOR;
return VALUE_FOUND;
@@ -606,9 +610,6 @@ get_color_from_term (StThemeNode *node,
if (status != CR_OK)
return VALUE_NOT_FOUND;
- if (rgb.inherit)
- return VALUE_INHERIT;
-
if (rgb.is_percentage)
cr_rgb_compute_from_percentage (&rgb);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]