mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-05 21:06:58 +01:00
Fix systemtray icon on macOS
This commit is contained in:
parent
6cd4de548f
commit
20766c1feb
@ -57,8 +57,7 @@ protected:
|
||||
void UpdateIcon();
|
||||
|
||||
private:
|
||||
QPixmap orange_icon_;
|
||||
QPixmap grey_icon_;
|
||||
QPixmap normal_icon_;
|
||||
std::unique_ptr<MacSystemTrayIconPrivate> p_;
|
||||
Q_DISABLE_COPY(MacSystemTrayIcon);
|
||||
};
|
||||
|
@ -164,9 +164,8 @@ class MacSystemTrayIconPrivate {
|
||||
|
||||
MacSystemTrayIcon::MacSystemTrayIcon(QObject* parent)
|
||||
: SystemTrayIcon(parent),
|
||||
orange_icon_(QPixmap(":/icons/64x64/strawberry.png").scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation)),
|
||||
grey_icon_(QPixmap(":icon_large_grey.png").scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation)) {
|
||||
QApplication::setWindowIcon(orange_icon_);
|
||||
normal_icon_(QPixmap(":/pictures/strawberry.png").scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation)) {
|
||||
QApplication::setWindowIcon(normal_icon_);
|
||||
}
|
||||
|
||||
MacSystemTrayIcon::~MacSystemTrayIcon() {
|
||||
@ -194,7 +193,7 @@ void MacSystemTrayIcon::SetupMenuItem(QAction* action) {
|
||||
}
|
||||
|
||||
void MacSystemTrayIcon::UpdateIcon() {
|
||||
QApplication::setWindowIcon(CreateIcon(orange_icon_, grey_icon_));
|
||||
QApplication::setWindowIcon(CreateIcon(normal_icon_, normal_icon_));
|
||||
}
|
||||
|
||||
void MacSystemTrayIcon::ActionChanged() {
|
||||
|
Loading…
Reference in New Issue
Block a user