QNapi / qnapi

Qt-based, multi-engine, multi-platform subtitle downloader
http://qnapi.github.io
291 stars 39 forks source link

Load tray icon from theme if found #125

Open bilelmoussaoui opened 7 years ago

bilelmoussaoui commented 7 years ago

Hey,

Can you please make the tray icon themeable? The tray icon, for now, is loaded from the qrc. Which makes it looks a bit strange with the rest of the monochrome tray icons on Linux. The best way to handle this is to make the tray icon themeable. Load it from the theme if found, if not fall back to qrc so everyone is happy. See here https://github.com/QNapi/qnapi/blob/cdc431b2214ae45e420286ff460bb0131d7a1360/gui/src/qnapiapp.cpp#L166

You can use QIcon::fromTheme("qnapi-tray") and install that icon on hicolor/status. Providing an SVG icon would be really nice so it can scale correctly. The tray icons should provide at least 16, 22, 24 sizes.

I can create a PR with the code patch, but my design skills are so bad to provide a tray icon :)

Thanks.