emacs-devel
[Top][All Lists]
Advanced

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

Re: Adding icon sets to Emacs -- and next steps for icons.el


From: Lars Ingebrigtsen
Subject: Re: Adding icon sets to Emacs -- and next steps for icons.el
Date: Wed, 24 Aug 2022 13:25:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Kangas <stefankangas@gmail.com> writes:

> My idea is to keep Lars' idea of individual customizable icons, but
> leave the choice of which image file to the code I've written.
> I imagine that the `warnings-suppress' icon definition in warnings.el
> should look something like:
>
>     (define-icon warnings-suppress button
>       '((image "warning")                 ;;; <<< NEW LINE >>>
>         (emoji "⛔")
>         (symbol " ■ ")
>         (text " stop "))
>       "Suppress warnings."
>       :version "29.1"
>       :help-echo "Click to suppress this warning type")
>
> From here, "warning" will be fed to my `icons-get', which will be
> responsible for producing, e.g., the ".../material/alert/warning.svg"
> file from the "materials" icon set, based on whatever knobs we decide to
> have.

I don't think it's necessary to have another layer on top of the icons
layer for this, because we already have theming support for icons.  That
is, if we want a Material theme, we'd just do:

(custom-theme-set-icons
  'material
  '(warning-suppress ((image "material/alert/warning.svg" 
"material/alert/warning.xpm"))
  '(outline-open ((image "material/action/open.svg" 
"material/action/open.xpm")))))

And then users can just choose that theme.

People that create other themes would distribute the .svg/.xpm files
with the theme definition -- so the degrading from "if Material icons
aren't present, then use these other icons instead" won't happen.




reply via email to

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