diff options
| author | Eli Zaretskii | 2021-09-07 13:24:01 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2021-09-07 13:24:01 +0300 |
| commit | db74a93659d8a94b6f3db88ba1402ccf5edb32d3 (patch) | |
| tree | 030d38b4b72c716f22d2c5c95e994a51bf728cfe /src | |
| parent | 55540a3d89862689340aa75d1370c3e8151ee934 (diff) | |
| download | emacs-db74a93659d8a94b6f3db88ba1402ccf5edb32d3.tar.gz emacs-db74a93659d8a94b6f3db88ba1402ccf5edb32d3.zip | |
Fix display of tab-bar buttons
* src/xterm.c (x_draw_image_relief):
* src/w32term.c (w32_draw_image_relief): Fix calculation of relief
thickness for tab-bar buttons.
* lisp/tab-bar.el (tab-bar--load-buttons)
(tab-bar-history-mode): Fix the :margin specification for tab-bar
buttons. (Bug#50424)
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 13 | ||||
| -rw-r--r-- | src/xterm.c | 13 |
2 files changed, 16 insertions, 10 deletions
diff --git a/src/w32term.c b/src/w32term.c index ad4d1a32829..ebd672361bf 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2031,11 +2031,14 @@ w32_draw_image_relief (struct glyph_string *s) | |||
| 2031 | if (s->hl == DRAW_IMAGE_SUNKEN | 2031 | if (s->hl == DRAW_IMAGE_SUNKEN |
| 2032 | || s->hl == DRAW_IMAGE_RAISED) | 2032 | || s->hl == DRAW_IMAGE_RAISED) |
| 2033 | { | 2033 | { |
| 2034 | thick = (tab_bar_button_relief < 0 | 2034 | if (s->face->id == TAB_BAR_FACE_ID) |
| 2035 | ? DEFAULT_TAB_BAR_BUTTON_RELIEF | 2035 | thick = (tab_bar_button_relief < 0 |
| 2036 | : (tool_bar_button_relief < 0 | 2036 | ? DEFAULT_TAB_BAR_BUTTON_RELIEF |
| 2037 | ? DEFAULT_TOOL_BAR_BUTTON_RELIEF | 2037 | : min (tab_bar_button_relief, 1000000)); |
| 2038 | : min (tool_bar_button_relief, 1000000))); | 2038 | else |
| 2039 | thick = (tool_bar_button_relief < 0 | ||
| 2040 | ? DEFAULT_TOOL_BAR_BUTTON_RELIEF | ||
| 2041 | : min (tool_bar_button_relief, 1000000)); | ||
| 2039 | raised_p = s->hl == DRAW_IMAGE_RAISED; | 2042 | raised_p = s->hl == DRAW_IMAGE_RAISED; |
| 2040 | } | 2043 | } |
| 2041 | else | 2044 | else |
diff --git a/src/xterm.c b/src/xterm.c index 1887c3255d4..b478eff2906 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3209,11 +3209,14 @@ x_draw_image_relief (struct glyph_string *s) | |||
| 3209 | if (s->hl == DRAW_IMAGE_SUNKEN | 3209 | if (s->hl == DRAW_IMAGE_SUNKEN |
| 3210 | || s->hl == DRAW_IMAGE_RAISED) | 3210 | || s->hl == DRAW_IMAGE_RAISED) |
| 3211 | { | 3211 | { |
| 3212 | thick = (tab_bar_button_relief < 0 | 3212 | if (s->face->id == TAB_BAR_FACE_ID) |
| 3213 | ? DEFAULT_TAB_BAR_BUTTON_RELIEF | 3213 | thick = (tab_bar_button_relief < 0 |
| 3214 | : (tool_bar_button_relief < 0 | 3214 | ? DEFAULT_TAB_BAR_BUTTON_RELIEF |
| 3215 | ? DEFAULT_TOOL_BAR_BUTTON_RELIEF | 3215 | : min (tab_bar_button_relief, 1000000)); |
| 3216 | : min (tool_bar_button_relief, 1000000))); | 3216 | else |
| 3217 | thick = (tool_bar_button_relief < 0 | ||
| 3218 | ? DEFAULT_TOOL_BAR_BUTTON_RELIEF | ||
| 3219 | : min (tool_bar_button_relief, 1000000)); | ||
| 3217 | raised_p = s->hl == DRAW_IMAGE_RAISED; | 3220 | raised_p = s->hl == DRAW_IMAGE_RAISED; |
| 3218 | } | 3221 | } |
| 3219 | else | 3222 | else |