[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using images in tabs
From: |
Juri Linkov |
Subject: |
Re: Using images in tabs |
Date: |
Wed, 18 Sep 2019 23:50:29 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> 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)
> [...]
Meanwhile I tried to scale svg, and the result is not great.
Scaling up makes the image blurred, and scaling down makes the
image smeared.
This is unexpected since svg is supposed to be scalable.
Another problem is that svg background is not transparent -
it takes the background color from the default face.
Like on the screenshot above, the unscaled image
in the buffer has the default brown background, and transparent
svg button on the grey tab-bar takes the same background.
PS: Tried out with this code:
(defvar tab-bar-button-close
(let ((svg (svg-create 33 33 :stroke-width 3 :stroke-color "black"
:fill-color "none")))
(svg-circle svg 16 16 12)
(svg-line svg 10 10 22 22)
(svg-line svg 10 22 22 10)
(propertize "x"
'display (svg-image svg
:max-width 9 :max-height 9
:margin '(2 . 0)
:ascent 'center)))
"Button for closing the tab.")
- 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, 2019/09/18
- Re: Using images in tabs,
Juri Linkov <=
- 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