emacs-devel
[Top][All Lists]
Advanced

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

Re: Using images in tabs (was: bug#37385: 27.0.50; Crash on multibyte as


From: Eli Zaretskii
Subject: Re: Using images in tabs (was: bug#37385: 27.0.50; Crash on multibyte assertion violation)
Date: Fri, 13 Sep 2019 09:22:57 +0300

> From: Juri Linkov <address@hidden>
> Cc: address@hidden
> Date: Fri, 13 Sep 2019 00:18:37 +0300
> 
> The biggest advantage of using “Unicode art” is its scalability for free,
> i.e. scalable fonts keep the size of the character used in the close button
> proportional to the font size of text in tabs.

I agree that using characters is easier in several senses, but I think
the results will be much better if we don't.  E.g., what do you do if
the font doesn't support that character, and how do you determine that
in the first place?

> I tried a small image with small font size and the result is not bad:
> 
> But a small image with big font size looks too clumsy:

Since Emacs 27 now supports native image scaling, you could use that
to scale the image to the appropriate size.  Alternatively, you could
let users customize its size if needed: after all, changing the size
of tab headers is something that should be relatively rare.

> I don't know if the patch to vertically center line content
> recently sent here by Jesse, could improve the look to align
> the button image to the center of the text line in tabs.

The image used should be centered to begin with.  You could also try
playing with :ascent property of images.

> Another advantage of “Unicode art” is that on moving the mouse over the
> close button the foreground color of its Unicode text changes to red
> simply by using mouse-face.  I don't know how to do the same with images:

The same way we do it with tool-bar buttons, I'd say.  The code for
that is already in the display engine, you just need to reuse it.  Or
am I missing something?



reply via email to

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