Prevent the speed slider from changing size

...when an element in its row has variable width.
This commit is contained in:
SutandoTsukai181 2020-05-04 04:54:28 +03:00
parent 3605d561fe
commit ddaca20044
2 changed files with 14 additions and 0 deletions

View File

@ -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;

View File

@ -210,6 +210,16 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="fixed_label">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>