Browse Source

Use the SVG for the tray icon.

adaptive-webui-19844
sledgehammer999 7 years ago
parent
commit
09cb95d3da
No known key found for this signature in database
GPG Key ID: 6E4A2D025B7CC9A2
  1. 2
      AUTHORS
  2. 1
      dist/unix/CMakeLists.txt
  3. 9
      src/gui/mainwindow.cpp
  4. 2
      src/icons.qrc
  5. 0
      src/icons/skin/qbittorrent-tray-with-font.svg
  6. 0
      src/icons/skin/qbittorrent-tray.svg
  7. BIN
      src/icons/skin/qbittorrent22.png
  8. 3
      unixconf.pri

2
AUTHORS

@ -34,7 +34,7 @@ Code from other projects:
license: GPLv2/3 license: GPLv2/3
Images Authors: Images Authors:
* files: src/icons/qbittorrent.svg (and related pngs) * files: src/icons/skin/qbittorrent-tray.svg (and related pngs)
copyright: Provided by HVS <hvs linuxmail org> (raster first proposal) and Atif Afzal(@atfzl github) <atif5801@gmail.com> (vectorized and modified) copyright: Provided by HVS <hvs linuxmail org> (raster first proposal) and Atif Afzal(@atfzl github) <atif5801@gmail.com> (vectorized and modified)
license: GPLv2+ license: GPLv2+

1
dist/unix/CMakeLists.txt vendored

@ -38,6 +38,7 @@ if (GUI)
COMPONENT data) COMPONENT data)
install(FILES install(FILES
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray.svg
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-dark.svg ${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-dark.svg
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-light.svg ${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-light.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status

9
src/gui/mainwindow.cpp

@ -1960,6 +1960,8 @@ QIcon MainWindow::getSystrayIcon() const
} }
#else #else
switch (style) { switch (style) {
case TrayIcon::NORMAL:
return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray.svg"));
case TrayIcon::MONO_DARK: case TrayIcon::MONO_DARK:
return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray-dark.svg")); return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray-dark.svg"));
case TrayIcon::MONO_LIGHT: case TrayIcon::MONO_LIGHT:
@ -1969,11 +1971,8 @@ QIcon MainWindow::getSystrayIcon() const
} }
#endif #endif
QIcon icon; // As a failsafe in case the enum is invalid
icon.addFile(":/icons/skin/qbittorrent22.png", QSize(22, 22)); return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray.svg"));
icon.addFile(":/icons/skin/qbittorrent16.png", QSize(16, 16));
icon.addFile(":/icons/skin/qbittorrent32.png", QSize(32, 32));
return icon;
} }
#endif #endif

2
src/icons.qrc

@ -359,10 +359,10 @@
<file>icons/skin/logo2.gif</file> <file>icons/skin/logo2.gif</file>
<file>icons/skin/mascot.png</file> <file>icons/skin/mascot.png</file>
<file>icons/skin/paused.png</file> <file>icons/skin/paused.png</file>
<file>icons/skin/qbittorrent-tray.svg</file>
<file>icons/skin/qbittorrent-tray-dark.svg</file> <file>icons/skin/qbittorrent-tray-dark.svg</file>
<file>icons/skin/qbittorrent-tray-light.svg</file> <file>icons/skin/qbittorrent-tray-light.svg</file>
<file>icons/skin/qbittorrent16.png</file> <file>icons/skin/qbittorrent16.png</file>
<file>icons/skin/qbittorrent22.png</file>
<file>icons/skin/qbittorrent32.png</file> <file>icons/skin/qbittorrent32.png</file>
<file>icons/skin/queued.png</file> <file>icons/skin/queued.png</file>
<file>icons/skin/ratio.png</file> <file>icons/skin/ratio.png</file>

0
src/icons/qbittorrent-with-font.svg → src/icons/skin/qbittorrent-tray-with-font.svg

Before

Width:  |  Height:  |  Size: 740 B

After

Width:  |  Height:  |  Size: 740 B

0
src/icons/qbittorrent.svg → src/icons/skin/qbittorrent-tray.svg

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/icons/skin/qbittorrent22.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

3
unixconf.pri

@ -91,7 +91,8 @@ nogui:systemd {
statusIcon192.files = $$DIST_PATH/menuicons/192x192/status/qbittorrent-tray.png statusIcon192.files = $$DIST_PATH/menuicons/192x192/status/qbittorrent-tray.png
statusIcon192.path = $$DATADIR/icons/hicolor/192x192/status/ statusIcon192.path = $$DATADIR/icons/hicolor/192x192/status/
statusIconScalable.files = $$PWD/src/icons/skin/qbittorrent-tray-dark.svg \ statusIconScalable.files = $$PWD/src/icons/skin/qbittorrent-tray.svg \
$$PWD/src/icons/skin/qbittorrent-tray-dark.svg \
$$PWD/src/icons/skin/qbittorrent-tray-light.svg $$PWD/src/icons/skin/qbittorrent-tray-light.svg
statusIconScalable.path = $$DATADIR/icons/hicolor/scalable/status/ statusIconScalable.path = $$DATADIR/icons/hicolor/scalable/status/

Loading…
Cancel
Save