Getting a theme icon for UI

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2193
Joined: 2018-05-05, 13:29

Getting a theme icon for UI

Unread post by vannilla » 2018-07-12, 19:08

I'm trying to create a simple extension which adds two buttons to the navigation bar, that in a way are similar to the back/forward buttons.
As such, I wanted to use the same icons (maybe with some CSS to change color, if possible), but I don't know how to get them from the current theme.
Can someone give me some pointers? Can it be done at all?
I'd like to make the extension restartless, but if there's no other way I don't mind moving to a classic overlay.

User avatar
Lootyhoof
Themeist
Themeist
Posts: 1569
Joined: 2012-02-09, 23:35
Location: United Kingdom

Re: Getting a theme icon for UI

Unread post by Lootyhoof » 2018-07-12, 19:30

I wouldn't advise trying to get them from the theme personally, it may be that the specific icon you're looking for either isn't there (see: Linux default theme, which uses stock GTK icons) or is mapped differently to the default theme.

Extensions should generally provide their own icons to avoid any issues.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2193
Joined: 2018-05-05, 13:29

Re: Getting a theme icon for UI

Unread post by vannilla » 2018-07-12, 19:37

I see.
I thought I could pick the icon from some properties of the XUL element or something like that.
I'll make my own icons then.
Thank you.

Locked