mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
COSMETIC: Added monochrome tray icon
This commit is contained in:
@@ -106,6 +106,9 @@ options_imp::options_imp(QWidget *parent):
|
||||
checkShowSystray->setChecked(false);
|
||||
checkShowSystray->setEnabled(false);
|
||||
}
|
||||
#if !defined(Q_WS_X11) || !defined(QT_SVG_LIB)
|
||||
checkUseMonoSystrayIcon->setVisible(false);
|
||||
#endif
|
||||
// Connect signals / slots
|
||||
// General tab
|
||||
connect(checkShowSystray, SIGNAL(toggled(bool)), this, SLOT(setSystrayOptionsState(bool)));
|
||||
@@ -132,6 +135,7 @@ options_imp::options_imp(QWidget *parent):
|
||||
connect(checkShowSplash, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkProgramExitConfirm, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkPreventFromSuspend, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkUseMonoSystrayIcon, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
#if defined(Q_WS_X11) && !defined(QT_DBUS_LIB)
|
||||
checkPreventFromSuspend->setDisabled(true);
|
||||
#endif
|
||||
@@ -323,6 +327,7 @@ void options_imp::saveOptions(){
|
||||
pref.setLocale(locale);
|
||||
pref.setAlternatingRowColors(checkAltRowColors->isChecked());
|
||||
pref.setSystrayIntegration(systrayIntegration());
|
||||
pref.setUseMonochromeTrayIcon(checkUseMonoSystrayIcon->isChecked());
|
||||
pref.setCloseToTray(closeToTray());
|
||||
pref.setMinimizeToTray(minimizeToTray());
|
||||
pref.setStartMinimized(startMinimized());
|
||||
@@ -471,6 +476,7 @@ void options_imp::loadOptions(){
|
||||
checkCloseToSystray->setChecked(pref.closeToTray());
|
||||
checkMinimizeToSysTray->setChecked(pref.minimizeToTray());
|
||||
checkStartMinimized->setChecked(pref.startMinimized());
|
||||
checkUseMonoSystrayIcon->setChecked(pref.useMonochromeTrayIcon());
|
||||
}
|
||||
checkProgramExitConfirm->setChecked(pref.confirmOnExit());
|
||||
checkPreventFromSuspend->setChecked(pref.preventFromSuspend());
|
||||
@@ -848,11 +854,13 @@ void options_imp::enableMaxConnecsLimitPerTorrent(bool checked){
|
||||
void options_imp::enableSystrayOptions() {
|
||||
checkCloseToSystray->setEnabled(true);
|
||||
checkMinimizeToSysTray->setEnabled(true);
|
||||
checkUseMonoSystrayIcon->setEnabled(true);
|
||||
}
|
||||
|
||||
void options_imp::disableSystrayOptions() {
|
||||
checkCloseToSystray->setEnabled(false);
|
||||
checkMinimizeToSysTray->setEnabled(false);
|
||||
checkUseMonoSystrayIcon->setEnabled(false);
|
||||
}
|
||||
|
||||
void options_imp::setSystrayOptionsState(bool checked) {
|
||||
|
||||
Reference in New Issue
Block a user