diff options
| author | 2023-05-18 16:07:48 -0400 | |
|---|---|---|
| committer | 2023-07-21 10:56:07 -0400 | |
| commit | f055f2dcf40580b6f1e9e0394ef401da5e332a75 (patch) | |
| tree | 836678d484659bff1ee69629af82072956d662ac /src | |
| parent | shared_widget: Refactor helpers (diff) | |
| download | yuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.tar.gz yuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.tar.xz yuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.zip | |
shared_widget: Use a better icon
This one looks more relevant on Windows.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/shared_widget.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index 3ef2c25c6..f39e3fccb 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp | |||
| @@ -26,7 +26,7 @@ namespace ConfigurationShared { | |||
| 26 | 26 | ||
| 27 | QPushButton* Widget::CreateRestoreGlobalButton(Settings::BasicSetting& setting, QWidget* parent) { | 27 | QPushButton* Widget::CreateRestoreGlobalButton(Settings::BasicSetting& setting, QWidget* parent) { |
| 28 | QStyle* style = parent->style(); | 28 | QStyle* style = parent->style(); |
| 29 | QIcon* icon = new QIcon(style->standardIcon(QStyle::SP_DialogResetButton)); | 29 | QIcon* icon = new QIcon(style->standardIcon(QStyle::SP_LineEditClearButton)); |
| 30 | QPushButton* restore_button = new QPushButton(*icon, QStringLiteral(""), parent); | 30 | QPushButton* restore_button = new QPushButton(*icon, QStringLiteral(""), parent); |
| 31 | restore_button->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); | 31 | restore_button->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); |
| 32 | 32 | ||
| @@ -271,7 +271,7 @@ void Widget::CreateSlider(const QString& label, bool reversed, float multiplier, | |||
| 271 | restore_button->setVisible(false); | 271 | restore_button->setVisible(false); |
| 272 | }); | 272 | }); |
| 273 | 273 | ||
| 274 | QObject::connect(slider, &QAbstractSlider::sliderMoved, [=](int) { | 274 | QObject::connect(slider, &QAbstractSlider::valueChanged, [=]() { |
| 275 | restore_button->setEnabled(true); | 275 | restore_button->setEnabled(true); |
| 276 | restore_button->setVisible(true); | 276 | restore_button->setVisible(true); |
| 277 | }); | 277 | }); |
| @@ -461,8 +461,7 @@ void Widget::CreateDateTimeEdit(const QString& label, std::function<void()>& loa | |||
| 461 | return; | 461 | return; |
| 462 | } | 462 | } |
| 463 | 463 | ||
| 464 | other_setting->LoadString( | 464 | setting.LoadString(std::to_string(date_time_edit->dateTime().toSecsSinceEpoch())); |
| 465 | std::to_string(date_time_edit->dateTime().toSecsSinceEpoch())); | ||
| 466 | }; | 465 | }; |
| 467 | } else { | 466 | } else { |
| 468 | if (!has_checkbox) { | 467 | if (!has_checkbox) { |
| @@ -473,7 +472,7 @@ void Widget::CreateDateTimeEdit(const QString& label, std::function<void()>& loa | |||
| 473 | auto get_clear_val = [=]() { | 472 | auto get_clear_val = [=]() { |
| 474 | return QDateTime::fromSecsSinceEpoch([=]() { | 473 | return QDateTime::fromSecsSinceEpoch([=]() { |
| 475 | if (restrict && checkbox->checkState() == Qt::Checked) { | 474 | if (restrict && checkbox->checkState() == Qt::Checked) { |
| 476 | return std::stoll(other_setting->ToStringGlobal()); | 475 | return std::stoll(setting.ToStringGlobal()); |
| 477 | } | 476 | } |
| 478 | return current_time; | 477 | return current_time; |
| 479 | }()); | 478 | }()); |
| @@ -498,8 +497,7 @@ void Widget::CreateDateTimeEdit(const QString& label, std::function<void()>& loa | |||
| 498 | const bool using_global = !restore_button->isEnabled(); | 497 | const bool using_global = !restore_button->isEnabled(); |
| 499 | other_setting->SetGlobal(using_global); | 498 | other_setting->SetGlobal(using_global); |
| 500 | if (!using_global) { | 499 | if (!using_global) { |
| 501 | other_setting->LoadString( | 500 | setting.LoadString(std::to_string(date_time_edit->dateTime().toSecsSinceEpoch())); |
| 502 | std::to_string(date_time_edit->dateTime().toSecsSinceEpoch())); | ||
| 503 | } | 501 | } |
| 504 | }; | 502 | }; |
| 505 | } | 503 | } |