From ddaca2004484f1e024f49d2e6dc99ef5e261f64d Mon Sep 17 00:00:00 2001 From: SutandoTsukai181 <52977072+SutandoTsukai181@users.noreply.github.com> Date: Mon, 4 May 2020 04:54:28 +0300 Subject: [PATCH] Prevent the speed slider from changing size ...when an element in its row has variable width. --- src/citra_qt/configuration/configure_general.cpp | 4 ++++ src/citra_qt/configuration/configure_general.ui | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/citra_qt/configuration/configure_general.cpp b/src/citra_qt/configuration/configure_general.cpp index 738db0deb..ec63c140c 100644 --- a/src/citra_qt/configuration/configure_general.cpp +++ b/src/citra_qt/configuration/configure_general.cpp @@ -50,6 +50,10 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent) .rightJustified(tr("unthrottled").size())); } }); + + // Dummy label to avoid the columns growing/shrinking according to text length. This value + // should be enough and will scale according to the length of the localized string. + ui->fixed_label->setFixedWidth(tr("unthrottled").size() * 7); } ConfigureGeneral::~ConfigureGeneral() = default; diff --git a/src/citra_qt/configuration/configure_general.ui b/src/citra_qt/configuration/configure_general.ui index 4219b4175..0dfba41b8 100644 --- a/src/citra_qt/configuration/configure_general.ui +++ b/src/citra_qt/configuration/configure_general.ui @@ -210,6 +210,16 @@ + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + +