mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
rename option name
This commit is contained in:
parent
85f883d5ac
commit
6df4053fc6
5 changed files with 13 additions and 13 deletions
|
@ -186,17 +186,17 @@ void Preferences::setAlternatingRowColors(const bool b)
|
||||||
setValue(u"Preferences/General/AlternatingRowColors"_s, b);
|
setValue(u"Preferences/General/AlternatingRowColors"_s, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Preferences::useColorCodedProgressBar() const
|
bool Preferences::useProgressBarFollowTextColor() const
|
||||||
{
|
{
|
||||||
return value(u"Preferences/General/ColorCodedProgressBar"_s, true);
|
return value(u"Preferences/General/ProgressBarFollowTextColor"_s, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setColorCodedProgressBar(const bool b)
|
void Preferences::setProgressBarFollowTextColor(const bool b)
|
||||||
{
|
{
|
||||||
if (b == useColorCodedProgressBar())
|
if (b == useProgressBarFollowTextColor())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
setValue(u"Preferences/General/ColorCodedProgressBar"_s, b);
|
setValue(u"Preferences/General/ProgressBarFollowTextColor"_s, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Preferences::getHideZeroValues() const
|
bool Preferences::getHideZeroValues() const
|
||||||
|
|
|
@ -113,8 +113,8 @@ public:
|
||||||
void showSpeedInTitleBar(bool show);
|
void showSpeedInTitleBar(bool show);
|
||||||
bool useAlternatingRowColors() const;
|
bool useAlternatingRowColors() const;
|
||||||
void setAlternatingRowColors(bool b);
|
void setAlternatingRowColors(bool b);
|
||||||
bool useColorCodedProgressBar() const;
|
bool useProgressBarFollowTextColor() const;
|
||||||
void setColorCodedProgressBar(bool b);
|
void setProgressBarFollowTextColor(bool b);
|
||||||
bool getHideZeroValues() const;
|
bool getHideZeroValues() const;
|
||||||
void setHideZeroValues(bool b);
|
void setHideZeroValues(bool b);
|
||||||
int getHideZeroComboValues() const;
|
int getHideZeroComboValues() const;
|
||||||
|
|
|
@ -261,7 +261,7 @@ void OptionsDialog::loadBehaviorTabOptions()
|
||||||
|
|
||||||
m_ui->confirmDeletion->setChecked(pref->confirmTorrentDeletion());
|
m_ui->confirmDeletion->setChecked(pref->confirmTorrentDeletion());
|
||||||
m_ui->checkAltRowColors->setChecked(pref->useAlternatingRowColors());
|
m_ui->checkAltRowColors->setChecked(pref->useAlternatingRowColors());
|
||||||
m_ui->colorCodedProgressBar->setChecked(pref->useColorCodedProgressBar());
|
m_ui->progressBarFollowTextColor->setChecked(pref->useProgressBarFollowTextColor());
|
||||||
m_ui->checkHideZero->setChecked(pref->getHideZeroValues());
|
m_ui->checkHideZero->setChecked(pref->getHideZeroValues());
|
||||||
m_ui->comboHideZero->setCurrentIndex(pref->getHideZeroComboValues());
|
m_ui->comboHideZero->setCurrentIndex(pref->getHideZeroComboValues());
|
||||||
m_ui->comboHideZero->setEnabled(m_ui->checkHideZero->isChecked());
|
m_ui->comboHideZero->setEnabled(m_ui->checkHideZero->isChecked());
|
||||||
|
@ -390,7 +390,7 @@ void OptionsDialog::loadBehaviorTabOptions()
|
||||||
|
|
||||||
connect(m_ui->confirmDeletion, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
connect(m_ui->confirmDeletion, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||||
connect(m_ui->checkAltRowColors, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
connect(m_ui->checkAltRowColors, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||||
connect(m_ui->colorCodedProgressBar, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
connect(m_ui->progressBarFollowTextColor, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||||
connect(m_ui->checkHideZero, &QAbstractButton::toggled, m_ui->comboHideZero, &QWidget::setEnabled);
|
connect(m_ui->checkHideZero, &QAbstractButton::toggled, m_ui->comboHideZero, &QWidget::setEnabled);
|
||||||
connect(m_ui->checkHideZero, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
connect(m_ui->checkHideZero, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||||
connect(m_ui->comboHideZero, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
|
connect(m_ui->comboHideZero, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
|
||||||
|
@ -485,7 +485,7 @@ void OptionsDialog::saveBehaviorTabOptions() const
|
||||||
|
|
||||||
pref->setConfirmTorrentDeletion(m_ui->confirmDeletion->isChecked());
|
pref->setConfirmTorrentDeletion(m_ui->confirmDeletion->isChecked());
|
||||||
pref->setAlternatingRowColors(m_ui->checkAltRowColors->isChecked());
|
pref->setAlternatingRowColors(m_ui->checkAltRowColors->isChecked());
|
||||||
pref->setColorCodedProgressBar(m_ui->colorCodedProgressBar->isChecked());
|
pref->setProgressBarFollowTextColor(m_ui->progressBarFollowTextColor->isChecked());
|
||||||
pref->setHideZeroValues(m_ui->checkHideZero->isChecked());
|
pref->setHideZeroValues(m_ui->checkHideZero->isChecked());
|
||||||
pref->setHideZeroComboValues(m_ui->comboHideZero->currentIndex());
|
pref->setHideZeroComboValues(m_ui->comboHideZero->currentIndex());
|
||||||
|
|
||||||
|
|
|
@ -298,9 +298,9 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="colorCodedProgressBar">
|
<widget class="QCheckBox" name="progressBarFollowTextColor">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string extracomment="Progress bar color is based on torrent state.">Use color-coded progress bar</string>
|
<string extracomment="Progress bar color is based on text color.">Make progress bars follow text colors</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
|
@ -93,7 +93,7 @@ void TransferListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||||
|
|
||||||
QColor color = {};
|
QColor color = {};
|
||||||
|
|
||||||
if (Preferences::instance()->useColorCodedProgressBar())
|
if (Preferences::instance()->useProgressBarFollowTextColor())
|
||||||
{
|
{
|
||||||
color = index.data(Qt::ForegroundRole).value<QColor>();
|
color = index.data(Qt::ForegroundRole).value<QColor>();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue