bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41852: 27.0.50; text-scale commands don't scale header of tabulated-


From: Stefan Kangas
Subject: bug#41852: 27.0.50; text-scale commands don't scale header of tabulated-list-mode
Date: Fri, 30 Oct 2020 16:04:58 +0000

martin rudalics <rudalics@gmx.at> writes:

>  > +default) will also change the text height of the 'header-line' face.
>
> I'd prefer "font size" instead of "text height" here.

Fixed.

> Also, I'd like to see some clarification
>
> (1) that only the size of the header line face for a buffer where
> 'text-scale-mode-header-line' has been set is affected (the line above
> is IMHO too general to state this restriction),

Could you be more specific?  It already says it's buffer local, but it
seems like you think it should say something more?

Do you mean to be very explicit about it, like this?

  When the new buffer local variable 'text-scale-remap-header-line-face'
  is non-nil, 'text-scale-adjust' will also change the font size of the
  'header-line' face in the current buffer.  This will also affect any
  face that inherits from it.

> (2) that text in the header line or elsewhere in such a buffer not
> inheriting from (the remapped) header line face is unaffected, and

I'm not sure I understand what you mean.  If text-scale-mode is enabled,
typically through running e.g. `text-scale-increase', the `default' face
is scaled.  The result, AFAICT, is that all faces in the buffer change
size (well, not the mode line).  And that makes sense since all other
implicitly inherits from it, right?

This works even for anonymous faces, e.g.:

   (progn
    (fundamental-mode)
    (insert (propertize "foo" 'face '(:height 1.5)))
    (text-scale-increase))

What am I missing?

> (3) whether and how existing customizations of the header line face are
> taken into account.
>
> Wrt (3) I assume that 'tabulated-list-mode' can already get derailed
> when a user customizes header line face to use some large or small font
> size (a scenario where face remapping is not involved at all).

I tried customizing the `Height' for the `header-line' face, and it
seems to work as expected:

With no text-scale-mode it is as big as it is customized to be.  When I
run `text-scale-increase', it scales up accordingly (relative to its
customized size).  So I don't know what, if anything, should be added
here.  Since it works as expected, perhaps there is nothing to add?

> Note that maybe 'text-scale-mode-header-line' should be also watched by
> 'set-buffer-redisplay'.

I tried adding `text-scale-remap-header-line-face' to the list of
variables that are fed to `add-variable-watcher' at the end of frame.el.
That doesn't work, unfortunately.

I believe that since the remapping is done on a Lisp level,
`text-scale-mode' isn't called even with a variable watcher.  Is there a
way to work around that?  Or am I doing it wrong?

Thanks for taking the time to review this.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]