mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00:00
- FEATURE: Added monochrome icon for light themes
- BUGFIX: Change systray icon on the fly (no restart needed)
This commit is contained in:
parent
dfa16320f0
commit
01b5844174
@ -1,3 +1,7 @@
|
|||||||
|
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.8.0
|
||||||
|
- FEATURE: Added monochrome icon for light themes
|
||||||
|
- BUGFIX: Change systray icon on the fly (no restart needed)
|
||||||
|
|
||||||
* Sun Mar 20 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.7.0
|
* Sun Mar 20 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.7.0
|
||||||
- FEATURE: Added search field for torrent content
|
- FEATURE: Added search field for torrent content
|
||||||
- FEATURE: Added auto-shutdown confirmation dialog
|
- FEATURE: Added auto-shutdown confirmation dialog
|
||||||
|
BIN
src/Icons/skin/qbittorrent_mono_light.png
Normal file
BIN
src/Icons/skin/qbittorrent_mono_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
@ -47,7 +47,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>2.7.0</string>
|
<string>2.8.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
<file>Icons/magnet.png</file>
|
<file>Icons/magnet.png</file>
|
||||||
<file>Icons/slow.png</file>
|
<file>Icons/slow.png</file>
|
||||||
<file>Icons/L.gif</file>
|
<file>Icons/L.gif</file>
|
||||||
|
<file>Icons/skin/qbittorrent_mono_light.png</file>
|
||||||
<file>Icons/skin/seeding.png</file>
|
<file>Icons/skin/seeding.png</file>
|
||||||
<file>Icons/skin/splash.png</file>
|
<file>Icons/skin/splash.png</file>
|
||||||
<file>Icons/skin/tabs.gif</file>
|
<file>Icons/skin/tabs.gif</file>
|
||||||
|
@ -994,6 +994,10 @@ void MainWindow::loadPreferences(bool configure_session) {
|
|||||||
delete myTrayIconMenu;
|
delete myTrayIconMenu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Reload systray icon
|
||||||
|
if(newSystrayIntegration && systrayIcon) {
|
||||||
|
systrayIcon->setIcon(getSystrayIcon());
|
||||||
|
}
|
||||||
// General
|
// General
|
||||||
if(pref.isToolbarDisplayed()) {
|
if(pref.isToolbarDisplayed()) {
|
||||||
toolBar->setVisible(true);
|
toolBar->setVisible(true);
|
||||||
@ -1350,8 +1354,14 @@ void MainWindow::checkForActiveTorrents()
|
|||||||
QIcon MainWindow::getSystrayIcon() const
|
QIcon MainWindow::getSystrayIcon() const
|
||||||
{
|
{
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_WS_X11)
|
||||||
if(Preferences().useMonochromeTrayIcon()) {
|
TrayIcon::Style style = Preferences().trayIconStyle();
|
||||||
|
switch(style) {
|
||||||
|
case TrayIcon::MONO_DARK:
|
||||||
return QIcon(":/Icons/skin/qbittorrent_mono_dark.png");
|
return QIcon(":/Icons/skin/qbittorrent_mono_dark.png");
|
||||||
|
case TrayIcon::MONO_LIGHT:
|
||||||
|
return QIcon(":/Icons/skin/qbittorrent_mono_light.png");
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
|
@ -171,8 +171,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>499</width>
|
<width>508</width>
|
||||||
<height>515</height>
|
<height>531</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
@ -360,9 +360,6 @@
|
|||||||
<string>Desktop</string>
|
<string>Desktop</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkShowSplash">
|
<widget class="QCheckBox" name="checkShowSplash">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -390,13 +387,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkUseMonoSystrayIcon">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use monochrome system tray icon (requires restart)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkMinimizeToSysTray">
|
<widget class="QCheckBox" name="checkMinimizeToSysTray">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -414,6 +404,49 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_trayIconStyle">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tray icon style:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboTrayIcon">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Normal</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Monochrome (Dark theme)</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Monochrome (Light theme)</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkProgramExitConfirm">
|
<widget class="QCheckBox" name="checkProgramExitConfirm">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -473,8 +506,8 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>-330</y>
|
<y>0</y>
|
||||||
<width>499</width>
|
<width>453</width>
|
||||||
<height>744</height>
|
<height>744</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -924,7 +957,7 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>447</width>
|
<width>480</width>
|
||||||
<height>457</height>
|
<height>457</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -1404,7 +1437,7 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>404</width>
|
<width>403</width>
|
||||||
<height>334</height>
|
<height>334</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -1793,7 +1826,7 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>542</width>
|
<width>589</width>
|
||||||
<height>422</height>
|
<height>422</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -2176,7 +2209,7 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>378</width>
|
<width>380</width>
|
||||||
<height>255</height>
|
<height>255</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -2325,8 +2358,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>517</width>
|
<width>64</width>
|
||||||
<height>414</height>
|
<height>18</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_36"/>
|
<layout class="QVBoxLayout" name="verticalLayout_36"/>
|
||||||
|
@ -107,7 +107,8 @@ options_imp::options_imp(QWidget *parent):
|
|||||||
checkShowSystray->setEnabled(false);
|
checkShowSystray->setEnabled(false);
|
||||||
}
|
}
|
||||||
#if !defined(Q_WS_X11)
|
#if !defined(Q_WS_X11)
|
||||||
checkUseMonoSystrayIcon->setVisible(false);
|
label_trayIconStyle->setVisible(false);
|
||||||
|
comboTrayIcon->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
// Connect signals / slots
|
// Connect signals / slots
|
||||||
// General tab
|
// General tab
|
||||||
@ -135,7 +136,7 @@ options_imp::options_imp(QWidget *parent):
|
|||||||
connect(checkShowSplash, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
connect(checkShowSplash, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||||
connect(checkProgramExitConfirm, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
connect(checkProgramExitConfirm, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||||
connect(checkPreventFromSuspend, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
connect(checkPreventFromSuspend, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||||
connect(checkUseMonoSystrayIcon, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
connect(comboTrayIcon, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
|
||||||
#if defined(Q_WS_X11) && !defined(QT_DBUS_LIB)
|
#if defined(Q_WS_X11) && !defined(QT_DBUS_LIB)
|
||||||
checkPreventFromSuspend->setDisabled(true);
|
checkPreventFromSuspend->setDisabled(true);
|
||||||
#endif
|
#endif
|
||||||
@ -327,7 +328,7 @@ void options_imp::saveOptions(){
|
|||||||
pref.setLocale(locale);
|
pref.setLocale(locale);
|
||||||
pref.setAlternatingRowColors(checkAltRowColors->isChecked());
|
pref.setAlternatingRowColors(checkAltRowColors->isChecked());
|
||||||
pref.setSystrayIntegration(systrayIntegration());
|
pref.setSystrayIntegration(systrayIntegration());
|
||||||
pref.setUseMonochromeTrayIcon(checkUseMonoSystrayIcon->isChecked());
|
pref.setTrayIconStyle(TrayIcon::Style(comboTrayIcon->currentIndex()));
|
||||||
pref.setCloseToTray(closeToTray());
|
pref.setCloseToTray(closeToTray());
|
||||||
pref.setMinimizeToTray(minimizeToTray());
|
pref.setMinimizeToTray(minimizeToTray());
|
||||||
pref.setStartMinimized(startMinimized());
|
pref.setStartMinimized(startMinimized());
|
||||||
@ -476,8 +477,8 @@ void options_imp::loadOptions(){
|
|||||||
checkCloseToSystray->setChecked(pref.closeToTray());
|
checkCloseToSystray->setChecked(pref.closeToTray());
|
||||||
checkMinimizeToSysTray->setChecked(pref.minimizeToTray());
|
checkMinimizeToSysTray->setChecked(pref.minimizeToTray());
|
||||||
checkStartMinimized->setChecked(pref.startMinimized());
|
checkStartMinimized->setChecked(pref.startMinimized());
|
||||||
checkUseMonoSystrayIcon->setChecked(pref.useMonochromeTrayIcon());
|
|
||||||
}
|
}
|
||||||
|
comboTrayIcon->setCurrentIndex(pref.trayIconStyle());
|
||||||
checkProgramExitConfirm->setChecked(pref.confirmOnExit());
|
checkProgramExitConfirm->setChecked(pref.confirmOnExit());
|
||||||
checkPreventFromSuspend->setChecked(pref.preventFromSuspend());
|
checkPreventFromSuspend->setChecked(pref.preventFromSuspend());
|
||||||
// End General preferences
|
// End General preferences
|
||||||
@ -854,13 +855,13 @@ void options_imp::enableMaxConnecsLimitPerTorrent(bool checked){
|
|||||||
void options_imp::enableSystrayOptions() {
|
void options_imp::enableSystrayOptions() {
|
||||||
checkCloseToSystray->setEnabled(true);
|
checkCloseToSystray->setEnabled(true);
|
||||||
checkMinimizeToSysTray->setEnabled(true);
|
checkMinimizeToSysTray->setEnabled(true);
|
||||||
checkUseMonoSystrayIcon->setEnabled(true);
|
comboTrayIcon->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void options_imp::disableSystrayOptions() {
|
void options_imp::disableSystrayOptions() {
|
||||||
checkCloseToSystray->setEnabled(false);
|
checkCloseToSystray->setEnabled(false);
|
||||||
checkMinimizeToSysTray->setEnabled(false);
|
checkMinimizeToSysTray->setEnabled(false);
|
||||||
checkUseMonoSystrayIcon->setEnabled(false);
|
comboTrayIcon->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void options_imp::setSystrayOptionsState(bool checked) {
|
void options_imp::setSystrayOptionsState(bool checked) {
|
||||||
|
@ -58,6 +58,9 @@ enum maxRatioAction {PAUSE_ACTION, REMOVE_ACTION};
|
|||||||
namespace Proxy {
|
namespace Proxy {
|
||||||
enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4, SOCKS4=5};
|
enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4, SOCKS4=5};
|
||||||
}
|
}
|
||||||
|
namespace TrayIcon {
|
||||||
|
enum Style { NORMAL = 0, MONO_DARK, MONO_LIGHT };
|
||||||
|
}
|
||||||
|
|
||||||
class Preferences : public QIniSettings {
|
class Preferences : public QIniSettings {
|
||||||
Q_DISABLE_COPY(Preferences);
|
Q_DISABLE_COPY(Preferences);
|
||||||
@ -1033,11 +1036,11 @@ public:
|
|||||||
setValue(QString::fromUtf8("Preferences/Advanced/confirmTorrentDeletion"), enabled);
|
setValue(QString::fromUtf8("Preferences/Advanced/confirmTorrentDeletion"), enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool useMonochromeTrayIcon() const {
|
TrayIcon::Style trayIconStyle() const {
|
||||||
return value(QString::fromUtf8("Preferences/Advanced/useMonochromeTrayIcon"), false).toBool();
|
return TrayIcon::Style(value(QString::fromUtf8("Preferences/Advanced/TrayIconStyle"), TrayIcon::NORMAL).toInt());
|
||||||
}
|
}
|
||||||
void setUseMonochromeTrayIcon(bool use) {
|
void setTrayIconStyle(TrayIcon::Style style) {
|
||||||
setValue(QString::fromUtf8("Preferences/Advanced/useMonochromeTrayIcon"), use);
|
setValue(QString::fromUtf8("Preferences/Advanced/TrayIconStyle"), style);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
os2 {
|
os2 {
|
||||||
DEFINES += VERSION=\'\"v2.7.0\"\'
|
DEFINES += VERSION=\'\"v2.8.0alpha1\"\'
|
||||||
} else {
|
} else {
|
||||||
DEFINES += VERSION=\\\"v2.7.0\\\"
|
DEFINES += VERSION=\\\"v2.8.0alpha1\\\"
|
||||||
}
|
}
|
||||||
DEFINES += VERSION_MAJOR=2
|
DEFINES += VERSION_MAJOR=2
|
||||||
DEFINES += VERSION_MINOR=7
|
DEFINES += VERSION_MINOR=8
|
||||||
DEFINES += VERSION_BUGFIX=0
|
DEFINES += VERSION_BUGFIX=0
|
||||||
|
|
||||||
# NORMAL,ALPHA,BETA,RELEASE_CANDIDATE,DEVEL
|
# NORMAL,ALPHA,BETA,RELEASE_CANDIDATE,DEVEL
|
||||||
DEFINES += VERSION_TYPE=NORMAL
|
DEFINES += VERSION_TYPE=ALPHA
|
||||||
|
Loading…
x
Reference in New Issue
Block a user