Open dgutov opened 5 months ago
Any ideas on this one @rougier? Some systems get icons that are roughly twice as large as expected, but I haven't figured out a pattern.
Sorry for the long delay. Do you know if your desktop has any kind of software scaling factor ?
@jilen is that true in your case? I have HDPI on Mac but have never encountered this. From my recollection, it seems to be with some Linux HDPI systems.
Do you know if your desktop has any kind of software scaling factor ?
200%, yes (that's the scaling I'm referring to in the title).
Very, very late sorry for that. Since your desktop has a 200% factor, I need to have access to this information to compute the right size but I'm not sure how to do that with GTK3. Do you know if it is accessible from within Emacs?
Hi!
Since your desktop has a 200% factor, I need to have access to this information to compute the right size but I'm not sure how to do that with GTK3.
There might be a better answer, but the approach I went with in https://github.com/company-mode/company-mode/blob/master/company.el#L2013 is just specifying :width
and :height
in pixels without accounting for any scaling factors there. Seems to work fine in the cases I've tested (both GNU/Linux and macOS).
Emacs seems to return accurate line/window heights in pixels when you call default-font-height
, frame-pixel-height
or display-pixel-height
, without adjustment for scaling. They return 34, 1990 and 2160 respectively in my current configuration.
Like discussed in https://github.com/jdtsmith/kind-icon/issues/22#issuecomment-2189593792,
this recipe:
leads to the icon being twice as big as it should.