Custom Toolbar Icons

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
avivariba
Posts: 87
Joined: 05 Mar 2023 07:38
Location: Win11@125% (second monitor@100%)

Custom Toolbar Icons

Post by avivariba »

Whenever I would like an existing toolbar button to have a custom icon, I manually recreate and script that button on a User Button. This is quite tedious, especially if a button has a lot of functions and features (and it also is not future-proof would something change or be added to the original button in an update).

I would love for there to be a way to change the icon of a toolbar button to any custom or other internal icon, much like as is the case for User Buttons.

Or a way to easily trigger (or copy over/duplicate) an existing button's functionality into a User Button script.

Or, alternatively, having access to the original icons (or icon sprite), so that those could be edited manually.
Last edited by avivariba on 24 Jun 2023 20:05, edited 1 time in total.

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Custom Toolbar Icons

Post by jupe »

This is all already possible, lookup patchimage in the scripting help.

avivariba
Posts: 87
Joined: 05 Mar 2023 07:38
Location: Win11@125% (second monitor@100%)

Re: Custom Toolbar Icons

Post by avivariba »

jupe wrote: 24 Jun 2023 20:04 This is all already possible, lookup patchimage in the scripting help.
And here am I thinking I went through the entire Help and didn't find any such thing. :?

Thanks!! :D Seems that it won't work with other internal icons, but that isn't as much of an issue with this being a possibility.

Just in case, does there happen to be any way to extract/save internal icons (so that those could be used either for this or elsewhere)?

Feel free to change this topic to 'Tips & Tricks, Questions & Answers'. Seems that I can't do that myself.

eil
Posts: 1875
Joined: 13 Jan 2011 19:44

Re: Custom Toolbar Icons

Post by eil »

avivariba wrote: 24 Jun 2023 20:07 Just in case, does there happen to be any way to extract/save internal icons (so that those could be used either for this or elsewhere)
Why extract when you can assign internal icons to any custom created button. Add any user button(say empty one), right click on it and select Customize Toolbar, you'll see names in [brackets] = that's the name of icon of that button. Now state one that you want in icon field of your custom created button, adding : sign at start, like= :go or :ghost.
Win 7 SP1 x64 100% 1366x768|1900x1080

avivariba
Posts: 87
Joined: 05 Mar 2023 07:38
Location: Win11@125% (second monitor@100%)

Re: Custom Toolbar Icons

Post by avivariba »

eil wrote: 24 Jun 2023 20:53 Why extract when you can assign internal icons to any custom created button.
That doesn't work with PatchImagesPath/patchimage.

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Custom Toolbar Icons

Post by jupe »

For internal icons you can manually extract them from the exe, and make them individual external images, here is an old image map already on the forum if it helps, you'd need to cut it up. Not sure if Don would want you using them "elsewhere" though.

Image

avivariba
Posts: 87
Joined: 05 Mar 2023 07:38
Location: Win11@125% (second monitor@100%)

Re: Custom Toolbar Icons

Post by avivariba »

jupe wrote: 24 Jun 2023 21:00 For internal icons you can manually extract them from the exe, and make them individual external images, here is an old image map already on the forum if it helps, you'd need to cut it up. Not sure if Don would want you using them "elsewhere" though.
Fair!

One big problem I'm running into now is that PatchImagesPath/patchimage doesn't seem to work with different states, for example for the Folder View Settings (fvs). It shows only when active but not enabled.

How does one include different states (inactve, enabled)? I see it are 3 different icons in the image map, but I can't find the icon codes for those versions.

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Custom Toolbar Icons

Post by jupe »

Yeah the different states can be tricky to find, you need to forum research, anyway for your example the 3 states of fvs are fvs, fvsd, fvsp.

                  >>>>>> Moved topic to T&T, Q&A

avivariba
Posts: 87
Joined: 05 Mar 2023 07:38
Location: Win11@125% (second monitor@100%)

Re: Custom Toolbar Icons

Post by avivariba »

jupe wrote: 24 Jun 2023 21:12 Yeah the different states can be tricky to find, you need to forum research, anyway for your example the 3 states of fvs are fvs, fvsd, fvsp.
Perfect! Couldn't find it from the forum search but found it via Google (just for if someone else needs it too): XYplorer Icon Resources

Post Reply