summaryrefslogtreecommitdiff
path: root/lwlib
diff options
context:
space:
mode:
authorGregory Heytings <gregory@heytings.org>2021-11-20 10:37:20 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-11-20 10:37:20 +0100
commit2ba7d1e84e76fa4d08fd8ed5a915793d4bf881cd (patch)
treeed6ee06ece3a62a483176c1d885be638157d2a15 /lwlib
parentbc99604c7ac2c6673615d0ecac4d233bf6a4ff16 (diff)
downloademacs-2ba7d1e84e76fa4d08fd8ed5a915793d4bf881cd.tar.gz
Implement the buttonForeground resource
* lwlib/xlwmenu.c (draw_shadow_rectangle, draw_shadow_rhombus): Use the buttonForeground resource color (bug#51988).
Diffstat (limited to 'lwlib')
-rw-r--r--lwlib/xlwmenu.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 702fad49ba6..5f8832bb362 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -641,6 +641,21 @@ draw_shadow_rectangle (XlwMenuWidget mw,
int thickness = !x && !y ? mw->menu.border_thickness : mw->menu.shadow_thickness;
XPoint points [4];
+ if (!erase_p && width == height && width == toggle_button_width (mw))
+ {
+ points [0].x = x;
+ points [0].y = y;
+ points [1].x = x + width;
+ points [1].y = y;
+ points [2].x = x + width;
+ points [2].y = y + height;
+ points [3].x = x;
+ points [3].y = y + height;
+ XFillPolygon (dpy, window,
+ down_p ? mw->menu.button_gc : mw->menu.inactive_button_gc,
+ points, 4, Convex, CoordModeOrigin);
+ }
+
if (!erase_p && down_p)
{
GC temp;
@@ -704,6 +719,21 @@ draw_shadow_rhombus (XlwMenuWidget mw,
int thickness = mw->menu.shadow_thickness;
XPoint points [4];
+ if (!erase_p && width == height && width == radio_button_width (mw))
+ {
+ points [0].x = x;
+ points [0].y = y + width / 2;
+ points [1].x = x + height / 2;
+ points [1].y = y + width;
+ points [2].x = x + height;
+ points [2].y = y + width / 2;
+ points [3].x = x + height / 2;
+ points [3].y = y;
+ XFillPolygon (dpy, window,
+ down_p ? mw->menu.button_gc : mw->menu.inactive_button_gc,
+ points, 4, Convex, CoordModeOrigin);
+ }
+
if (!erase_p && down_p)
{
GC temp;