summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPedro Andres Aranda Gutierrez <paaguti@gmail.com>2021-01-10 14:10:18 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-01-10 14:10:18 +0100
commit13bd909591e9c1cf0228750b2d4a9e4364f61cc9 (patch)
treec333a24fd8ae39db7599a8750b1d06cd26bd8ef0 /src
parente62f71988f8e75de676ea5e0775c97eab1d8793a (diff)
downloademacs-13bd909591e9c1cf0228750b2d4a9e4364f61cc9.tar.gz
Add support for flat buttons
* src/xfaces.c (Finternal_set_lisp_face_attribute): (realize_gui_face): Add support for `flat-button' (bug#45735). Copyright-paperwork-exempt: yes
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index b3b19a9cb2e..258b365eda3 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3293,7 +3293,8 @@ FRAME 0 means change the face on all frames, and change the default
}
else if (EQ (k, QCstyle))
{
- if (!EQ (v, Qpressed_button) && !EQ (v, Qreleased_button))
+ if (!EQ (v, Qpressed_button) && !EQ (v, Qreleased_button)
+ && !EQ(v, Qflat_button))
break;
}
else
@@ -6031,6 +6032,10 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]
face->box = FACE_RAISED_BOX;
else if (EQ (value, Qpressed_button))
face->box = FACE_SUNKEN_BOX;
+ else if (EQ (value, Qflat_button)) {
+ face->box = FACE_SIMPLE_BOX;
+ face->box_color = face->background;
+ }
}
}
}
@@ -6919,6 +6924,7 @@ syms_of_xfaces (void)
DEFSYM (Qwave, "wave");
DEFSYM (Qreleased_button, "released-button");
DEFSYM (Qpressed_button, "pressed-button");
+ DEFSYM (Qflat_button, "flat-button");
DEFSYM (Qnormal, "normal");
DEFSYM (Qextra_light, "extra-light");
DEFSYM (Qlight, "light");