aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/shared_widget.cpp
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2025-10-20 04:08:38 +0200
committercrueter <crueter@eden-emu.dev>2025-10-20 04:08:38 +0200
commit54d6283ac338b0b748668ce0d5a3b28ea0ca9924 (patch)
tree4f5df5bb765109d970b0ea20ba8ffd95e672e57f /src/yuzu/configuration/shared_widget.cpp
parent2e9dbe3f1d8133570cd9db92aa05769733451029 (diff)
[desktop] Fix misaligned output device (#2786)
Builder::BuildWidget previously relied on Qt to handle layout stretching by implicitly setting each widget to have a stretch of 0. This is very bad behavior, so to fix this we must set a stretch of 1 on each widget that's added by the builder furthermore, default and default_dark did not properly define a min-width or min-height for QComboBox. This caused the platform theme to take over sizing which is NOT GOOD and should basically be avoided always Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2786 Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/yuzu/configuration/shared_widget.cpp')
-rw-r--r--src/yuzu/configuration/shared_widget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp
index b7fc98d637..2d76a774f6 100644
--- a/src/yuzu/configuration/shared_widget.cpp
+++ b/src/yuzu/configuration/shared_widget.cpp
@@ -507,7 +507,7 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
created = true;
const auto type = setting.TypeId();
- QLayout* layout = new QHBoxLayout(this);
+ QHBoxLayout* layout = new QHBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
if (other_setting == nullptr) {
@@ -574,10 +574,10 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
if (require_checkbox) {
QWidget* lhs =
CreateCheckBox(other_setting, label, checkbox_serializer, checkbox_restore_func, touch);
- layout->addWidget(lhs);
+ layout->addWidget(lhs, 1);
} else if (setting.TypeId() != typeid(bool)) {
QLabel* qt_label = CreateLabel(label);
- layout->addWidget(qt_label);
+ layout->addWidget(qt_label, 1);
}
if (setting.TypeId() == typeid(bool)) {
@@ -649,7 +649,7 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
return;
}
- layout->addWidget(data_component);
+ layout->addWidget(data_component, 1);
if (!managed) {
return;