[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master cd32693151: Fix :color specification in flat-button boxes
From: |
Lars Ingebrigtsen |
Subject: |
master cd32693151: Fix :color specification in flat-button boxes |
Date: |
Mon, 28 Feb 2022 05:42:08 -0500 (EST) |
branch: master
commit cd32693151dbce3e70288a8c7ecc84e0c00f20aa
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix :color specification in flat-button boxes
* src/xfaces.c (realize_gui_face): Allow reliably specifying
:color in flat-button boxes (bug#54196).
---
src/xfaces.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/xfaces.c b/src/xfaces.c
index 55a9bed8f2..8100bdb157 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -5978,6 +5978,8 @@ realize_gui_face (struct face_cache *cache, Lisp_Object
attrs[LFACE_VECTOR_SIZE]
}
else if (CONSP (box))
{
+ bool set_color = false;
+
/* `(:width WIDTH :color COLOR :shadow SHADOW)'. SHADOW
being one of `raised' or `sunken'. */
face->box = FACE_SIMPLE_BOX;
@@ -6015,6 +6017,7 @@ realize_gui_face (struct face_cache *cache, Lisp_Object
attrs[LFACE_VECTOR_SIZE]
face->box_color = load_color (f, face, value,
LFACE_BOX_INDEX);
face->use_box_color_for_shadows_p = true;
+ set_color = true;
}
}
else if (EQ (keyword, QCstyle))
@@ -6026,7 +6029,9 @@ realize_gui_face (struct face_cache *cache, Lisp_Object
attrs[LFACE_VECTOR_SIZE]
else if (EQ (value, Qflat_button))
{
face->box = FACE_SIMPLE_BOX;
- face->box_color = face->background;
+ /* Don't override colors set in this box. */
+ if (!set_color)
+ face->box_color = face->background;
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master cd32693151: Fix :color specification in flat-button boxes,
Lars Ingebrigtsen <=