mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-06 07:19:51 +01:00
Add Ubuntu dark and light tray icons. Fixes issue #838
This commit is contained in:
parent
a425dddd7d
commit
3e87d7b703
25
dist/CMakeLists.txt
vendored
25
dist/CMakeLists.txt
vendored
@ -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)
|
||||
|
BIN
dist/icons/ubuntu-mono-dark/clementine-panel-grey.png
vendored
Normal file
BIN
dist/icons/ubuntu-mono-dark/clementine-panel-grey.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 945 B |
BIN
dist/icons/ubuntu-mono-dark/clementine-panel.png
vendored
Normal file
BIN
dist/icons/ubuntu-mono-dark/clementine-panel.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
dist/icons/ubuntu-mono-light/clementine-panel-grey.png
vendored
Normal file
BIN
dist/icons/ubuntu-mono-light/clementine-panel-grey.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 931 B |
BIN
dist/icons/ubuntu-mono-light/clementine-panel.png
vendored
Normal file
BIN
dist/icons/ubuntu-mono-light/clementine-panel.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -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)
|
||||
|
@ -14,6 +14,7 @@
|
||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "iconloader.h"
|
||||
#include "qtsystemtrayicon.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
@ -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());
|
||||
|
@ -14,10 +14,9 @@
|
||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "systemtrayicon.h"
|
||||
|
||||
#include "macsystemtrayicon.h"
|
||||
#include "qtsystemtrayicon.h"
|
||||
#include "systemtrayicon.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QEvent>
|
||||
|
Loading…
Reference in New Issue
Block a user