mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Set proper minimum width of name display modes dropdown (#2976)
This commit is contained in:
parent
94a99ac4f0
commit
735c0ad1ac
|
@ -617,16 +617,19 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
||||||
const QStringList usernameDisplayModes = {"Username", "Localized name",
|
const QStringList usernameDisplayModes = {"Username", "Localized name",
|
||||||
"Username and localized name"};
|
"Username and localized name"};
|
||||||
|
|
||||||
layout.addDropdown<std::underlying_type<UsernameDisplayMode>::type>(
|
ComboBox *nameDropdown =
|
||||||
"Username style", usernameDisplayModes, s.usernameDisplayMode,
|
layout.addDropdown<std::underlying_type<UsernameDisplayMode>::type>(
|
||||||
[usernameDisplayModes](auto val) {
|
"Username style", usernameDisplayModes, s.usernameDisplayMode,
|
||||||
return usernameDisplayModes.at(val - 1);
|
[usernameDisplayModes](auto val) {
|
||||||
// UsernameDisplayMode enum indexes from 1
|
return usernameDisplayModes.at(val - 1);
|
||||||
},
|
// UsernameDisplayMode enum indexes from 1
|
||||||
[](auto args) {
|
},
|
||||||
return args.index + 1;
|
[](auto args) {
|
||||||
},
|
return args.index + 1;
|
||||||
false);
|
},
|
||||||
|
false);
|
||||||
|
nameDropdown->setMinimumWidth(nameDropdown->minimumSizeHint().width());
|
||||||
|
|
||||||
layout.addDropdown<float>(
|
layout.addDropdown<float>(
|
||||||
"Username font weight", {"50", "Default", "75", "100"}, s.boldScale,
|
"Username font weight", {"50", "Default", "75", "100"}, s.boldScale,
|
||||||
[](auto val) {
|
[](auto val) {
|
||||||
|
|
Loading…
Reference in a new issue