[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using images in tabs
From: |
Lars Ingebrigtsen |
Subject: |
Re: Using images in tabs |
Date: |
Wed, 18 Sep 2019 15:43:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Juri Linkov <address@hidden> writes:
> Maybe xg_get_scale should be exposed to Lisp, then find-image
> could use it to choose a suitable image specification among e.g.
>
> etc/images/icons/hicolor/16x16/
> etc/images/icons/hicolor/24x24/
> etc/images/icons/hicolor/32x32/
> etc/images/icons/hicolor/48x48/
> etc/images/icons/hicolor/128x128/
> etc/images/icons/hicolor/scalable/
>
> Similar subdirs could be added to other images as well
> because this problem exists for other features, e.g. for
> subtree arrows in customization buffers, tool-bar icons, etc.
Yup. Emacs currently auto-scales images using this very er ad-hoc method:
(defun image-compute-scaling-factor (scaling)
[...]
((eq scaling 'auto)
(let ((width (/ (float (window-width nil t)) (window-width))))
;; If we assume that a typical character is 10 pixels in width,
;; then we should scale all images according to how wide they
;; are. But don't scale images down.
(if (< width 10)
1
(/ (float width) 10))))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Using images in tabs (was: bug#37385: 27.0.50; Crash on multibyte assertion violation), Juri Linkov, 2019/09/12
- Re: Using images in tabs (was: bug#37385: 27.0.50; Crash on multibyte assertion violation), Eli Zaretskii, 2019/09/13
- Re: Using images in tabs, Juri Linkov, 2019/09/15
- Re: Using images in tabs, Yuri Khan, 2019/09/16
- Re: Using images in tabs, Eli Zaretskii, 2019/09/16
- Re: Using images in tabs, Juri Linkov, 2019/09/16
- Re: Using images in tabs, Lars Ingebrigtsen, 2019/09/16
- Re: Using images in tabs, Juri Linkov, 2019/09/17
- Re: Using images in tabs, Robert Pluim, 2019/09/18
- Re: Using images in tabs,
Lars Ingebrigtsen <=
- Re: Using images in tabs, Juri Linkov, 2019/09/18
- Re: Using images in tabs, Lars Ingebrigtsen, 2019/09/19
- Re: Using images in tabs, Alan Third, 2019/09/20
- Re: Using images in tabs, Clément Pit-Claudel, 2019/09/16
- Re: Using images in tabs, Eli Zaretskii, 2019/09/17
- Re: Using images in tabs, Juri Linkov, 2019/09/17