emacs-devel
[Top][All Lists]
Advanced

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

Re: High-res Customize icons


From: Yuan Fu
Subject: Re: High-res Customize icons
Date: Tue, 27 Oct 2020 19:09:02 -0400


> On Oct 27, 2020, at 6:26 PM, Alan Third <alan@idiocy.org> wrote:
> 
> On Tue, Oct 27, 2020 at 03:17:37PM -0400, Yuan Fu wrote:
>> 
>> Cocoa provides an API for querying the scaling factor, if it is 2,
>> we should load the @2x image and add :scale 0.5.
>> 
>> It’s kind of a mess. What do you think?
>> 
>> How about exposing that Cocoa API to lisp and handle accordingly in
>> find-image? Some thing like:
> 
> This sounds good to me. It should be easy to expose the scale factor
> to lisp. The only potential problem is that it can change as the frame
> is dragged from one screen to the other, or similar. Is there any way
> to force reloading the images?

At least it doesn’t introduce regression. And we probably don’t want Emacs on 
Cocoa to perform better than that on Linux anyway. (Does anyone know what 
happens if you move Emacs from high-res screen to a low-res one on Linux?)

How should the variable be named? There is already a variable named 
image-scale-factor. I suggest something like ns-pixel-scale-factor.

> 
> Anyway, even if not it will always display something, just not
> necessarily the optimal image.
> 
> Do you want me to write the C code to expose the scale factor?

That’s marvelous!

Yuan


reply via email to

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