Floppy icons are different between ports

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Floppy icons are different between ports

Post by ONEEYEMAN »

Hi, ALL,
I'm using following code:

Code: Select all

m_tb->AddTool( wxID_SAVEQUERY, _( "Save" ), wxArtProvider::GetBitmapBundle( wxART_FLOPPY, wxART_TOOLBAR ), wxArtProvider::GetBitmapBundle( wxART_FLOPPY, wxART_TOOLBAR ), wxITEM_NORMAL, _( "Save" ), _( "Save Query" ) );
On both Linux and Mac it displays just the floppy disk, however, on Windows (8.1 here) I have a weirdly looking icon with the floppy over the floppy reader.

I just ran the artdemo and confirmed it there.

Is this intentional?

This icon is usually used as a "Save"/"Save As" toolbar tool/menu item and most programs I know use just a floppy disk...

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Floppy icons are different between ports

Post by doublemax »

Yes, that's intentional. Under Windows some icons are taken from the OS, wxART_FLOPPY is mapped to SIID_DRIVE35:
https://learn.microsoft.com/en-us/windo ... tockiconid

wxART_FILE_SAVE would be the "normal" value for a "Save" button, but it's not a floppy.

Unfortunately it seems that you can't use wxTangoArtProvider under Windows.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Floppy icons are different between ports

Post by ONEEYEMAN »

doublemax,
Does this mean I have to find a free "floppy" SVG to use under Windows?
Or make one myself?

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Floppy icons are different between ports

Post by doublemax »

ONEEYEMAN wrote: Sun Jan 29, 2023 4:03 pm Does this mean I have to find a free "floppy" SVG to use under Windows?
Or make one myself?
If you really want a floppy icon, then yes.

from the default art provider: <wxdir>/art/floppy.xpm
Tango icon: https://upload.wikimedia.org/wikipedia/ ... floppy.svg
Tango icon set: https://commons.wikimedia.org/wiki/Tango_icons
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Floppy icons are different between ports

Post by ONEEYEMAN »

doublemax,
This is pretty much de-facto standard for the "Save" action...

Look at MS Office, MSVC, all other applications...

I don't know why MS itself is not using it...

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Floppy icons are different between ports

Post by doublemax »

ONEEYEMAN wrote: Sun Jan 29, 2023 5:30 pm Look at MS Office, MSVC, all other applications...

I don't know why MS itself is not using it...
The Windows stock icon is for an actual floppy drive, it's not intended to be used as a save icon.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Floppy icons are different between ports

Post by ONEEYEMAN »

doublemax,
It does look like it is for the drive and not for the floppy itself...
And of course there is no such icon in the MS stock items.

Thank you.
Post Reply