Add an icon to a CMD_ (toolbar)

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

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

Add an icon to a CMD_ (toolbar)

Post by mrwul »

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: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq »

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: 327
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul »

Thanks a lot!
Will wait until v0.80 will be released then.
=
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq »

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: 43444
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Add an icon to a CMD_ (toolbar)

Post by xnview »

you would like to set an icon a current command? Currently 'set icon' works with '--COMMAND--'
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq »

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: 327
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul »

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 4504 times
=
mrwul
Posts: 327
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul »

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: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq »

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: 327
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul »

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 4422 times
-
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq »

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: 327
Joined: Tue May 25, 2010 7:01 pm

Re: Add an icon to a CMD_ (toolbar)

Post by mrwul »

Wonderful, that worked fine!
SnagIt-21012018 110352.png
SnagIt-21012018 110352.png (12.59 KiB) Viewed 4385 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: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add an icon to a CMD_ (toolbar)

Post by XnTriq »

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.
User avatar
MARK2580
Posts: 88
Joined: Tue Nov 20, 2018 5:22 am

Re: Add an icon to a CMD_ (toolbar)

Post by MARK2580 »

It has been 2 years, nothing is fixed and not modified. Even this workaround no longer works, I'm tired of seeing huge text buttons, the place of the icons.
User avatar
xnview
Author of XnView
Posts: 43444
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Add an icon to a CMD_ (toolbar)

Post by xnview »

MARK2580 wrote: Thu May 07, 2020 9:54 pm It has been 2 years, nothing is fixed and not modified. Even this workaround no longer works, I'm tired of seeing huge text buttons, the place of the icons.
What's your problem?
Pierre.
Post Reply