refactor: use theme icons for on settings dialog and mac os tray
This commit is contained in:
parent
6b29e1c6ef
commit
1ec6d02339
2 changed files with 9 additions and 5 deletions
|
|
@ -644,14 +644,18 @@ void MainWindow::setIcon()
|
||||||
// Using a theme icon that is packed in exe renders an invisible icon
|
// Using a theme icon that is packed in exe renders an invisible icon
|
||||||
// Instead use the resource path of the packed icon
|
// Instead use the resource path of the packed icon
|
||||||
// TODO Report to Qt ref the bug here
|
// TODO Report to Qt ref the bug here
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
QString iconString = QStringLiteral(":/icons/deskflow-%1/apps/64/deskflow").arg(iconMode());
|
QString iconString = QStringLiteral(":/icons/deskflow-%1/apps/64/deskflow").arg(iconMode());
|
||||||
if (!appConfig().colorfulTrayIcon()) {
|
if (!appConfig().colorfulTrayIcon()) {
|
||||||
iconString.append(QStringLiteral("-symbolic"));
|
iconString.append(QStringLiteral("-symbolic"));
|
||||||
}
|
}
|
||||||
m_trayIcon->setIcon(QIcon(iconString));
|
m_trayIcon->setIcon(QIcon(iconString));
|
||||||
#ifdef Q_OS_MAC
|
#else
|
||||||
if (!appConfig().colorfulTrayIcon())
|
if (m_AppConfig.colorfulTrayIcon())
|
||||||
m_trayIcon->icon().setIsMask(true);
|
m_trayIcon->setIcon(QIcon::fromTheme(QStringLiteral("deskflow")));
|
||||||
|
else
|
||||||
|
m_trayIcon->setIcon(QIcon::fromTheme(QStringLiteral("deskflow")));
|
||||||
|
m_trayIcon->icon().setIsMask(true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,8 @@ SettingsDialog::SettingsDialog(
|
||||||
ui->m_pPushButtonTlsCertPath->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen));
|
ui->m_pPushButtonTlsCertPath->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen));
|
||||||
ui->m_pButtonBrowseLog->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen));
|
ui->m_pButtonBrowseLog->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen));
|
||||||
|
|
||||||
ui->rb_icon_mono->setIcon(QIcon(QStringLiteral(":/icons/deskflow-%1/apps/64/deskflow-symbolic").arg(iconMode())));
|
ui->rb_icon_mono->setIcon(QIcon::fromTheme(QStringLiteral("deskflow-symbolic")));
|
||||||
ui->rb_icon_colorful->setIcon(QIcon(QStringLiteral(":/icons/deskflow-%1/apps/64/deskflow").arg(iconMode())));
|
ui->rb_icon_colorful->setIcon(QIcon::fromTheme(QStringLiteral("deskflow")));
|
||||||
|
|
||||||
// force the first tab, since qt creator sets the active tab as the last one
|
// force the first tab, since qt creator sets the active tab as the last one
|
||||||
// the developer was looking at, and it's easy to accidentally save that.
|
// the developer was looking at, and it's easy to accidentally save that.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue