Skip to content
Browse files
Add macOS 1024x1024 icon for dock, app switcher, etc., rendering
[ci skip]
  • Loading branch information
dakcarto committed Mar 8, 2017
1 parent 8f470e9 commit 35edc182ea20eca6b3ae16defce5557f21b390a2
Showing with 5 additions and 0 deletions.
  1. BIN images/icons/qgis-icon-macos.png
  2. +5 −0 src/app/main.cpp
Binary file not shown.
@@ -809,7 +809,12 @@ int main( int argc, char *argv[] )

QgsApplication myApp( argc, argv, myUseGuiFlag, configpath );

#ifdef Q_OS_MAC
// Set 1024x1024 icon for dock, app switcher, etc., rendering
myApp.setWindowIcon( QIcon( QgsApplication::iconsPath() + QStringLiteral( "qgis-icon-macos.png" ) ) );
myApp.setWindowIcon( QIcon( QgsApplication::appIconPath() ) );


2 comments on commit 35edc18


This comment has been minimized.

Copy link

@nyalldawson nyalldawson replied Mar 9, 2017

Could other platforms benefit from this too?


This comment has been minimized.

Copy link
Member Author

@dakcarto dakcarto replied Mar 10, 2017

Possibly. I did not test.

I only noticed the issue on macOS, and that it could be resolved by setting the icon with QApplication:: setWindowIcon(). However, the Qt doc on the app icon is not clear on whether this helps with similar app representations on other platforms, e.g. 'dock,' app switcher, etc. It seems a desktop entry is appropriate on common Linux platforms, and the .ico approach is right for Windows.

Would be worth testing a higher resolution QApplication windowIcon on those platforms, in case it does help. Certainly something bigger than the paltry 60x60 should be the standard gong forward in any event... like 256x256 or 512x512. Again, this is the app (top level window) icon, which differs from the desktop icon, and higher resolutions may not benefit other platforms than macOS.

@elpaso, I know you are running a hidpi monitor. Do you have time to test out some higher res icons on KDE?

Please sign in to comment.