How to change font face of the key's label? #283
-
I'm currently looping over all I managed to get this far with a brute force change (screenshot from Magit's ? transient): (let ((transient-faces '(transient-active-infix transient-argument transient-delimiter transient-disabled-suffix transient-enabled-suffix transient-heading transient-higher-level transient-inactive-argument transient-inactive-value transient-inapt-suffix transient-key transient-key-exit transient-key-noop transient-key-return transient-key-stay transient-mismatched-key transient-nonstandard-key transient-unreachable transient-unreachable-key transient-value)))
(dolist (face transient-faces)
(set-face-attribute face nil :height 0.8))) But as you can see the title/heading and keys shrink, the "Apply" etc. labels don't. I couldn't figure out whether these are just unpropertized (aka use the default font) or not. Usually I go to the text I want to change and C-u C-x = and inspect the text properties that are in effect. Can't do that with a transient :) I also don't understand the source code tbh (Elisp novice) Hints would be much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is no dedicated face for this text. Note that a lot of text in the transient buffer may be created using functions that are under the control of package authors. So this has to be done my remapping the Instead of adding yet another special case, I've added a new hook, (require 'face-remap)
(defun transient-i-shrunk-the-glyphs ()
(face-remap-reset-base 'default) ;probably unnecessary
(face-remap-add-relative 'default '((:height 100))))
(add-hook 'transient-setup-buffer-hook #'transient-i-shrunk-the-glyphs) |
Beta Was this translation helpful? Give feedback.
There is no dedicated face for this text.
default
is used.Note that a lot of text in the transient buffer may be created using functions that are under the control of package authors.
transient
has no (okay limited) control over the faces used for such text. So even if we were to propertize all text, which is inserted using only basictransient
features, there still would be other text that implicitly usesdefault
or explicitly uses arbitary other faces.So this has to be done my remapping the
default
face. There's already explicit support for doing that to control the pitch of text in this buffer.Instead of adding yet another special case, I've added a new hook,
transient-setup-buffer-…