Top Icon from desktop app is very distorted

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
Fl4m3Ph03n1x
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Nov 08, 2022 9:14 am

Top Icon from desktop app is very distorted

Post by Fl4m3Ph03n1x »

Background

I have a desktop app that uses WxWidgets to be rendered. Things work mostly well, however there is one problem: The icon on the top bar is very distorted (marked in yellow).
b3f4b901220c425f4ac2763e53488228340d125d_2_437x600.jpeg
b3f4b901220c425f4ac2763e53488228340d125d_2_437x600.jpeg (56 KiB) Viewed 597 times
In contrast, the icon at the bottom of the image (also marked in yellow) is acceptable.

Questions
  • Is this a bug/issue with the latest stable version of wxWidgets? (some people suggest this is fixed in wxPython: https://stackoverflow.com/q/74349763/1337392)
  • Is it possible to have a different icon for the windows taskbar (bottom) and one for the top bar? If so, how could this be done?
  • Are there any specific limitations to the types of icons one case use? (i.e., what dimensions should my icon have to be displayed properly in the top bar of the application?)
PB
Part Of The Furniture
Part Of The Furniture
Posts: 3696
Joined: Sun Jan 03, 2010 5:45 pm

Re: Top Icon from desktop app is very distorted

Post by PB »

As you already mentioned, your icon probably does not meet the platform requirements.

MSW requirements are mentioned (not sure if up-to-date) in the official docs: https://docs.wxwidgets.org/latest/class ... 764ca53b06

Either way, at least on MSW it is best to provide an icon bundle (i.e., use SetIcons()) with a bunch of usual sizes, so the OS can pick the best size depending on where the icon is used and the DPI.

(MSW only) If the icon in the taskbar is from the active application window, I don't think the two can be different (aside from using an overlay icon etc with wxTaskBarButton). Of course, a different icon can be used for the application itself (displayed in some shell places), usually done with it being the first icon in the executable. But generally, the two icons are usually the same for a simple application with one top level window.
Fl4m3Ph03n1x
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Nov 08, 2022 9:14 am

Re: Top Icon from desktop app is very distorted

Post by Fl4m3Ph03n1x »

Thank you, this was very helpful!
Post Reply