status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
297 stars 79 forks source link

[Linux] Add icon pack with multiple sizes on linux #14854

Open alexjba opened 5 months ago

alexjba commented 5 months ago

Description

Linux icon looks a bit pixelated. Most probably due to how we set the app icon from nim_status_client. We've previously had a resizable svg icon and the app icon was fine, but with the new logo the gradient doesn't look good if it's loaded from the svg file. As an alternative we're loading a .png file, but this icon will be resized by the OS depending on where it needs to show it.

Please check the comment below for proposed solutions.

          > The white tray icon on Ubuntu looks good: ![image](https://private-user-images.githubusercontent.com/11926403/331685496-a1f1bcac-d2e6-4b70-8c2d-1b7bfcfec9f1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTYwMzM2NDcsIm5iZiI6MTcxNjAzMzM0NywicGF0aCI6Ii8xMTkyNjQwMy8zMzE2ODU0OTYtYTFmMWJjYWMtZDJlNi00YjcwLThjMmQtMWI3YmZjZmVjOWYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTE4VDExNTU0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU2YzczZjQwY2UxOTY5OGQyNWRhYWQxNTZhYTA5MzEwZWI3YzE4YTMxZGQ4ODczZmFiNjI3NzdkZGIxODdlM2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cL6Hu0aQiQKKKfbBDhgfdkcC1EPxMg5XJloaYhpJuSw)

The one in the main bar is a bit pixelated still, but it seems better. It's a bit smaller than before though: image

Unfortunately IDK how to properly set the app icons on linux. All the documentation I could find require an installer to copy the app icon files to user's icons folder.

I've added the proper configuration for macOS and windows, but on Linux I'll leave the current implementation using Qt's setWindowIcon.

We could try 2 quick approaches to fix the linux icon:

  1. Debug the SVG icon to see why the gradient is not working (it should be supported, but some changes in the SVG might be needed)
  2. Try to set all the png files in the QIcon consumed by setWindowIcon API. See https://doc.qt.io/qt-5/qicon.html#addFile

Unfortunately I need help from someone using linux. We can add another task for this.

Originally posted by @alexjba in https://github.com/status-im/status-desktop/issues/14773#issuecomment-2118804480

alexjba commented 5 months ago

cc @jrainville

caybro commented 5 months ago

One possible solution is to use QIcon and load multiple PNG sizes; or go with an SVG