Add an icon to a CMD_ (toolbar)

*** Please report new bugs here! ***

Moderator: Dreamer

Post Reply
mrwul
Posts: 214
Joined: Tue May 25, 2010 7:01 pm

Add an icon to a CMD_ (toolbar)

Post by mrwul » Sun Jun 19, 2016 8:45 am

I tried to figure this out myself first.

Add an icon to the toolbar.

Went thru 'toolbar skins' on:
http://newsgroup.xnview.com/viewtopic.php?f=61&t=13652
seems I had to go to http://mezich.livejournal.com/?skip=20 ?
where to download what and are their any 'sticky' instructions.

read some other posts, but after half an hour or so, I gave up.

I just want to add an icon to the cmd_ftAll toolbar (instead of the text 'Fit image to Window'.

Is there an easy way to add an icon - if not, well, I leave it this way then.

Thanks
=

User avatar
XnTriq
Moderator & Librarian
Posts: 5320
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq » Mon Jun 20, 2016 12:30 am

mrwul wrote:Went thru 'toolbar skins' on:
http://newsgroup.xnview.com/viewtopic.php?f=61&t=13652
These are only compatible with XnView Classic. I've now changed the title of the thread accordingly.
mrwul wrote:I just want to add an icon to the cmd_ftAll toolbar (instead of the text 'Fit image to Window'.

Is there an easy way to add an icon - if not, well, I leave it this way then.
All icons of Yuri “mezich” Mezentsev's theme are available for download as separated PNG files from his site, …
… but we have to wait for v0.80 before we can make use of them.

Related topics:

mrwul
Posts: 214
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul » Mon Jun 20, 2016 2:51 pm

Thanks a lot!
Will wait until v0.80 will be released then.
=

User avatar
XnTriq
Moderator & Librarian
Posts: 5320
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq » Thu Jun 23, 2016 6:45 pm

I've put cmd_fitAll.png and cmd_fitAll.ico into the UI\ and UI\icons-48\ sub-directories of MP v0.80, but the icon won't show up on the toolbar button for Fit image to window | cmd_FitAll.
Set Icon... is grayed out.

User avatar
xnview
Author of XnView
Posts: 30266
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Add an icon to a CMD_ (toolbar)

Post by xnview » Fri Jun 24, 2016 8:31 am

you would like to set an icon a current command? Currently 'set icon' works with '--COMMAND--'
Pierre.

User avatar
XnTriq
Moderator & Librarian
Posts: 5320
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq » Fri Jun 24, 2016 3:00 pm

Yes, I'd like to be able to add extra icons for MP's internal commands (for example, if there's no corresponding icon included in the current skin).
Are you planning to implement a Classic-style skinning engine?

PS: I seem to remember that one of the early betas would use cmd_*.png and/or cmd_*.ico if it found them in the UI folder.

mrwul
Posts: 214
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul » Tue Dec 26, 2017 7:27 am

Yes...
I know this is an old thread... :-)

I have waited for a few updates.
Regretfully though I still don't know how to solve this - IF...IF at all it can be solved:

- adding an icon to 'Fit image to Window'.

thanks!

=
SnagIt-26122017 082223.png
SnagIt-26122017 082223.png (35.91 KiB) Viewed 735 times
=

mrwul
Posts: 214
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul » Thu Jan 18, 2018 9:26 am

XnTriq wrote:I've put cmd_fitAll.png and cmd_fitAll.ico into the UI\ and UI\icons-48\ sub-directories of MP v0.80, but the icon won't show up on the toolbar button for Fit image to window | cmd_FitAll.
Set Icon... is grayed out.
Where can I find them?
Should they be downloaded ? Can't find them on my system.

Using XnViewMP x64 v0.89

Thanks!

User avatar
XnTriq
Moderator & Librarian
Posts: 5320
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq » Thu Jan 18, 2018 8:45 pm

mrwul wrote:Where can I find them?
Should they be downloaded ? Can't find them on my system.
There should be a set of 101 icons (48×48 PNG) in the \UI\icons-48\ subfolder of your XnViewMP installation. 24×24 versions of these icons are available for download from Yuri Mezentsev's site:
For my tests, I had to use random 24×24 PNG/ICO images because there's no “official” cmd_ftAll icon.
miki ([url=http://newsgroup.xnview.com/viewtopic.php?p=146541#p146541]Toolbars: icons and customization[/url]) wrote:
xnview wrote:
miki wrote:OK, I finally found how to load my own icons! You need to go to Settings-Interface-Toolbar and check there Large icons. If unchecked, the program doesn't load custom icons from the folder UI/icons-48, but uses some default icons, which are probably hard-coded.
which one?
I meant, the trick to load my icons from the UI folder is to check Large icons in settings. Otherwise my icons are ignored and program uses the original icons, perhaps because of the used directive [Toolbar-48] in toolbar.ini, where there is no directive for small icons (if Large icons unchecked).

Code: Select all

[Toolbar-48]
folder=icons-toolbars
size=24
Note, to make icons small again I set size to 24 and all is ok now.

mrwul
Posts: 214
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul » Fri Jan 19, 2018 6:55 am

Ah, thanks, I've found that folder...
Indeed, I only did a search for 'cmd_ftAll', but no hits, hence this question.
BTW the mezich.ru site is blocked by my AV software. As the domain ends up with .ru , well, I simply don't go there.
For me it isn't with taking any risk. If there is no official .ico well, then I've to accept that. Maybe one day Pierre will create one.

That aside, it seems I can't set any icon at all...(?)
What ever I select, the set icon remains grey.

-
SnagIt-19012018 075426.png
SnagIt-19012018 075426.png (3.11 KiB) Viewed 653 times
-

User avatar
XnTriq
Moderator & Librarian
Posts: 5320
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq » Fri Jan 19, 2018 10:15 pm

mrwul wrote:That aside, it seems I can't set any icon at all...(?)
What ever I select, the set icon remains grey.
Still not fixed :bugconfirmed:

Please give this workaround a try:
  1. Make a backup of \XnViewMP\UI\toolbar.ini.
  2. Use a text editor to replace the contents of \XnViewMP\UI\toolbar.ini with the following “code”:

    Code: Select all

    [Toolbar-48]
    folder=icons-24
    size=24
  3. Create a new folder \XnViewMP\UI\icons-24\.
  4. Place the 24×24 version of zoom-fit-icon.png or any other 24×24 PNG into \XnViewMP\UI\icons-24\ and rename this image to cmd_fitAll.png.
  5. Start XnViewMP and go to ToolsSettings...InterfaceToolBar.
  6. If you haven't already done so, add a button for Fit image to window | cmd_fitAll to the toolbar of Browse mode and/or View mode.
  7. Activate Large icons.
  8. Save the changed settings and restart XnViewMP.

mrwul
Posts: 214
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul » Sun Jan 21, 2018 10:07 am

Wonderful, that worked fine!
SnagIt-21012018 110352.png
SnagIt-21012018 110352.png (12.59 KiB) Viewed 616 times
Many many thanks indeed.

As long as there is 'native' solution offered by Pierre, then I should keep this 'guideline' in mind in case of any future installs.

A bit of a workaround, but for me, it works.

Again, thanks a lot!

-

User avatar
XnTriq
Moderator & Librarian
Posts: 5320
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq » Sun Jan 21, 2018 8:45 pm

Thanks for the screenshot, mrwul! Let's hope that this issue will be addressed in one of the next releases so we won't have to resort to this workaround anymore.

Post Reply