Skip to content

Commit

Permalink
Add macOS 1024x1024 icon for dock, app switcher, etc., rendering
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
dakcarto committed Mar 8, 2017
1 parent 8f470e9 commit 35edc18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Binary file added images/icons/qgis-icon-macos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) ) );
#else
myApp.setWindowIcon( QIcon( QgsApplication::appIconPath() ) );
#endif


//
Expand Down

2 comments on commit 35edc18

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could other platforms benefit from this too?

@dakcarto
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.