diff --git a/dist/CMakeLists.txt b/dist/CMakeLists.txt index 091fefeb3..dc0d8e400 100644 --- a/dist/CMakeLists.txt +++ b/dist/CMakeLists.txt @@ -10,3 +10,28 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/maketarball.sh.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/clementine.nsi.in ${CMAKE_CURRENT_SOURCE_DIR}/windows/clementine.nsi @ONLY) # windows/windres.rc is done by src/CMakeLists.txt + + +if (NOT APPLE) + install(FILES clementine_64.png + DESTINATION share/icons/hicolor/64x64/apps/ + RENAME application-x-clementine.png + ) + + install(FILES ../data/icon.svg + DESTINATION share/icons/hicolor/scalable/apps/ + RENAME application-x-clementine.svg + ) + + install(FILES clementine.desktop + DESTINATION share/applications + ) + + foreach(icon clementine-panel.png clementine-panel-grey.png) + foreach(theme ubuntu-mono-dark ubuntu-mono-light) + install(FILES icons/${theme}/${icon} + DESTINATION share/icons/${theme}/apps/24/ + ) + endforeach(theme) + endforeach(icon) +endif (NOT APPLE) diff --git a/dist/icons/ubuntu-mono-dark/clementine-panel-grey.png b/dist/icons/ubuntu-mono-dark/clementine-panel-grey.png new file mode 100644 index 000000000..8425db6de Binary files /dev/null and b/dist/icons/ubuntu-mono-dark/clementine-panel-grey.png differ diff --git a/dist/icons/ubuntu-mono-dark/clementine-panel.png b/dist/icons/ubuntu-mono-dark/clementine-panel.png new file mode 100644 index 000000000..cad7399be Binary files /dev/null and b/dist/icons/ubuntu-mono-dark/clementine-panel.png differ diff --git a/dist/icons/ubuntu-mono-light/clementine-panel-grey.png b/dist/icons/ubuntu-mono-light/clementine-panel-grey.png new file mode 100644 index 000000000..c4c9e89be Binary files /dev/null and b/dist/icons/ubuntu-mono-light/clementine-panel-grey.png differ diff --git a/dist/icons/ubuntu-mono-light/clementine-panel.png b/dist/icons/ubuntu-mono-light/clementine-panel.png new file mode 100644 index 000000000..302852c46 Binary files /dev/null and b/dist/icons/ubuntu-mono-light/clementine-panel.png differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f23f15224..992f61cf2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -849,18 +849,4 @@ else (APPLE) install(TARGETS clementine RUNTIME DESTINATION bin ) - - install(FILES ../dist/clementine_64.png - DESTINATION share/icons/hicolor/64x64/apps/ - RENAME application-x-clementine.png - ) - - install(FILES ../data/icon.svg - DESTINATION share/icons/hicolor/scalable/apps/ - RENAME application-x-clementine.svg - ) - - install(FILES ../dist/clementine.desktop - DESTINATION share/applications - ) endif (APPLE) diff --git a/src/ui/qtsystemtrayicon.cpp b/src/ui/qtsystemtrayicon.cpp index aaf27e6d6..1afa5924c 100644 --- a/src/ui/qtsystemtrayicon.cpp +++ b/src/ui/qtsystemtrayicon.cpp @@ -14,6 +14,7 @@ along with Clementine. If not, see . */ +#include "iconloader.h" #include "qtsystemtrayicon.h" #include @@ -26,9 +27,19 @@ QtSystemTrayIcon::QtSystemTrayIcon(QObject* parent) tray_(new QSystemTrayIcon(this)), menu_(new QMenu) { - QIcon icon(":icon.png"); - orange_icon_ = icon.pixmap(48, QIcon::Normal); - grey_icon_ = icon.pixmap(48, QIcon::Disabled); + QIcon theme_icon = IconLoader::Load("clementine-panel"); + QIcon theme_icon_grey = IconLoader::Load("clementine-panel-grey"); + + if (theme_icon.isNull() || theme_icon_grey.isNull()) { + // Load the default icon + QIcon icon(":icon.png"); + orange_icon_ = icon.pixmap(48, QIcon::Normal); + grey_icon_ = icon.pixmap(48, QIcon::Disabled); + } else { + // Use the icons from the theme + orange_icon_ = theme_icon.pixmap(48); + grey_icon_ = theme_icon_grey.pixmap(48); + } tray_->setIcon(orange_icon_); tray_->setToolTip(QCoreApplication::applicationName()); diff --git a/src/ui/systemtrayicon.cpp b/src/ui/systemtrayicon.cpp index 45599b4a2..aba1d0c5e 100644 --- a/src/ui/systemtrayicon.cpp +++ b/src/ui/systemtrayicon.cpp @@ -14,10 +14,9 @@ along with Clementine. If not, see . */ -#include "systemtrayicon.h" - #include "macsystemtrayicon.h" #include "qtsystemtrayicon.h" +#include "systemtrayicon.h" #include #include