diff options
Diffstat (limited to 'src/yuzu/configuration/shared_widget.cpp')
-rw-r--r-- | src/yuzu/configuration/shared_widget.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index dc8b312380..807d1d6686 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp @@ -376,6 +376,32 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu layout->addWidget(qt_label); } + request = [&]() { + if (request != RequestType::Default) { + return request; + } + switch (setting.Specialization()) { + case Settings::Specialization::Default: + return RequestType::Default; + case Settings::Specialization::Time: + return RequestType::DateTimeEdit; + case Settings::Specialization::Hex: + return RequestType::HexEdit; + case Settings::Specialization::RuntimeList: + managed = false; + [[fallthrough]]; + case Settings::Specialization::List: + return RequestType::ComboBox; + case Settings::Specialization::Scalar: + return RequestType::Slider; + case Settings::Specialization::Countable: + return RequestType::SpinBox; + default: + break; + } + return request; + }(); + if (setting.TypeId() == typeid(bool)) { data_component = CreateCheckBox(&setting, label, serializer, restore_func, touch); } else if (setting.IsEnum()) { @@ -544,6 +570,11 @@ Widget* Builder::BuildWidget(Settings::BasicSetting* setting, return nullptr; } + if (setting->Specialization() == Settings::Specialization::Paired) { + LOG_DEBUG(Frontend, "\"{}\" has specialization Paired: ignoring", setting->GetLabel()); + return nullptr; + } + return new Widget(setting, *translations, *combobox_translations, parent, runtime_lock, apply_funcs, request, managed, multiplier, other_setting, string); } |