Fixes for comments from r1266
This commit is contained in:
parent
4799823ed1
commit
c8cb8cf012
@ -375,6 +375,8 @@ endif(APPLE)
|
||||
list(APPEND OTHER_SOURCES
|
||||
core/macglobalshortcutbackend.h
|
||||
core/macglobalshortcutbackend.mm
|
||||
ui/macsystemtrayicon.h
|
||||
ui/macsystemtrayicon.mm
|
||||
widgets/osd_mac.mm
|
||||
widgets/osd_win.cpp
|
||||
widgets/osd_x11.cpp
|
||||
|
@ -34,10 +34,6 @@ public:
|
||||
void SetupMenu(QAction* previous, QAction* play, QAction* stop,
|
||||
QAction* stop_after, QAction* next, QAction* love,
|
||||
QAction* ban, QAction* quit);
|
||||
bool IsVisible() const;
|
||||
void SetVisible(bool visible);
|
||||
|
||||
void ShowPopup(const QString &summary, const QString &message, int timeout);
|
||||
|
||||
private:
|
||||
void SetupMenuItem(QAction* action);
|
||||
|
@ -97,13 +97,11 @@ class MacSystemTrayIconPrivate : boost::noncopyable {
|
||||
};
|
||||
|
||||
MacSystemTrayIcon::MacSystemTrayIcon(QObject* parent)
|
||||
: SystemTrayIcon(parent) {
|
||||
QIcon orange(":icon_large.png");
|
||||
QIcon grey(":icon_large_grey.png");
|
||||
|
||||
orange_icon_ = orange.pixmap(128, QIcon::Normal);
|
||||
grey_icon_ = grey.pixmap(128, QIcon::Normal);
|
||||
|
||||
: SystemTrayIcon(parent),
|
||||
orange_icon_(QPixmap(":icon_large.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_);
|
||||
}
|
||||
|
||||
@ -130,21 +128,10 @@ void MacSystemTrayIcon::SetupMenuItem(QAction* action) {
|
||||
connect(action, SIGNAL(changed()), SLOT(ActionChanged()));
|
||||
}
|
||||
|
||||
void MacSystemTrayIcon::ShowPopup(const QString &summary,
|
||||
const QString &message, int timeout) {
|
||||
}
|
||||
|
||||
void MacSystemTrayIcon::UpdateIcon() {
|
||||
QApplication::setWindowIcon(CreateIcon(orange_icon_, grey_icon_));
|
||||
}
|
||||
|
||||
bool MacSystemTrayIcon::IsVisible() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void MacSystemTrayIcon::SetVisible(bool) {
|
||||
}
|
||||
|
||||
void MacSystemTrayIcon::ActionChanged() {
|
||||
QAction* action = qobject_cast<QAction*>(sender());
|
||||
p_->ActionChanged(action);
|
||||
|
Loading…
x
Reference in New Issue
Block a user