[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13476: 24.3.50; Reverting scroll-bar face customization has no effec
From: |
Mauro Aranda |
Subject: |
bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect |
Date: |
Mon, 28 Feb 2022 09:59:15 -0300 |
Po Lu <luangruo@yahoo.com> writes:
> Mauro Aranda <maurooaranda@gmail.com> writes:
>
>> It would have been nice to see the patch posted here.
>
> branch: master
> commit 66899628f8a8c79ca8dfe32094f11a8320630fae
> Author: Po Lu <luangruo@yahoo.com>
> Commit: Po Lu <luangruo@yahoo.com>
>
> Better fix for bug#13476
>
> * lisp/faces.el (face-spec-recalc): Apply scroll bar foreground
> and background to the frame if changing the scroll-bar face.
> (scroll-bar): Restore previous declaration. That way, the
> default colors are used for toolkit scroll bars, instead of
> black and white.
> ---
> lisp/faces.el | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/lisp/faces.el b/lisp/faces.el
> index 76da210280..4b582ac439 100644
> --- a/lisp/faces.el
> +++ b/lisp/faces.el
> @@ -1743,7 +1743,14 @@ The following sources are applied in this order:
> (and tail (face-spec-set-2 face frame
> (list :extend (cadr tail))))))
> (setq face-attrs (face-spec-choose (get face 'face-override-spec) frame))
> - (face-spec-set-2 face frame face-attrs)))
> + (face-spec-set-2 face frame face-attrs)
> + (when (and (fboundp 'set-frame-parameter) ; This isn't available
> + ; during loadup.
> + (eq face 'scroll-bar))
> + ;; Set the `scroll-bar-foreground' and `scroll-bar-background'
> + ;; frame parameters. (bug#13476)
> + (set-frame-parameter frame 'scroll-bar-foreground (face-foreground
> face))
> + (set-frame-parameter frame 'scroll-bar-background (face-background
> face)))))
>
> (defun face-spec-set-2 (face frame face-attrs)
> "Set the face attributes of FACE on FRAME according to FACE-ATTRS.
> @@ -2826,11 +2833,9 @@ used to display the prompt text."
> :group 'frames
> :group 'basic-faces)
>
> -(defface scroll-bar
> - '((((background light)) :foreground "black")
> - (((background dark)) :foreground "white"))
> +(defface scroll-bar '((t nil))
> "Basic face for the scroll bar colors under X."
> - :version "28.1"
> + :version "21.1"
> :group 'frames
> :group 'basic-faces)
Thank you.
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect, Mauro Aranda, 2022/02/28
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect, Po Lu, 2022/02/28
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect, Mauro Aranda, 2022/02/28
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect, Po Lu, 2022/02/28
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect,
Mauro Aranda <=
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect, Eli Zaretskii, 2022/02/28
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect, Mauro Aranda, 2022/02/28
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect, Eli Zaretskii, 2022/02/28
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect, Mauro Aranda, 2022/02/28
- bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect, Po Lu, 2022/02/28