From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: 13476@debbugs.gnu.org, eliz@gnu.org, stephen.berman@gmx.net
Subject: bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect
Date: Mon, 28 Feb 2022 20:51:05 +0800 [thread overview]
Message-ID: <87mtib40jq.fsf@yahoo.com> (raw)
In-Reply-To: <621cc0bb.1c69fb81.a4520.4461@mx.google.com> (Mauro Aranda's message of "Mon, 28 Feb 2022 09:31:52 -0300")
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)
next prev parent reply other threads:[~2022-02-28 12:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 11:12 bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect Stephen Berman
2020-10-30 13:20 ` Mauro Aranda
2020-10-30 13:30 ` Eli Zaretskii
2020-10-30 14:18 ` Mauro Aranda
2020-10-30 21:46 ` Stephen Berman
2020-10-31 9:08 ` Eli Zaretskii
2020-10-31 20:14 ` Mauro Aranda
2020-11-01 14:19 ` Stefan Monnier
[not found] ` <87bkyr68bf.fsf@yahoo.com>
2022-02-28 11:43 ` Mauro Aranda
2022-02-28 11:59 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-28 12:31 ` Mauro Aranda
2022-02-28 12:51 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-02-28 12:59 ` Mauro Aranda
2022-02-28 13:52 ` Eli Zaretskii
2022-02-28 14:04 ` Mauro Aranda
2022-02-28 14:49 ` Eli Zaretskii
2022-02-28 15:25 ` Mauro Aranda
2022-03-01 0:30 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-01 12:44 ` Eli Zaretskii
2022-03-01 12:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mtib40jq.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=13476@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=luangruo@yahoo.com \
--cc=maurooaranda@gmail.com \
--cc=stephen.berman@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).