GNU bug report logs - #13476
24.3.50; Reverting scroll-bar face customization has no effect

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Thu, 17 Jan 2013 12:47:01 UTC

Severity: minor

Tags: fixed

Found in version 24.3.50

Fixed in version 28.1

Done: Mauro Aranda <maurooaranda <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 13476 <at> debbugs.gnu.org, eliz <at> gnu.org, stephen.berman <at> gmx.net
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 <at> yahoo.com> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> It would have been nice to see the patch posted here.
>
> branch: master
> commit 66899628f8a8c79ca8dfe32094f11a8320630fae
> Author: Po Lu <luangruo <at> yahoo.com>
> Commit: Po Lu <luangruo <at> 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.




This bug report was last modified 3 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.