mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 10:51:50 -05:00
configure_general: Sort data
This commit is contained in:
parent
827082c5ac
commit
e2de48f14b
1 changed files with 7 additions and 1 deletions
|
@ -32,9 +32,11 @@ void ConfigureGeneral::SetConfiguration() {
|
|||
const bool runtime_lock = !system.IsPoweredOn();
|
||||
QLayout& layout = *ui->general_widget->layout();
|
||||
|
||||
std::map<std::string, QWidget*> hold{};
|
||||
|
||||
for (const auto setting :
|
||||
UISettings::values.linkage.by_category[Settings::Category::UiGeneral]) {
|
||||
ConfigurationShared::Widget* widget =
|
||||
auto* widget =
|
||||
new ConfigurationShared::Widget(setting, translations, this, runtime_lock, apply_funcs);
|
||||
|
||||
if (!widget->Valid()) {
|
||||
|
@ -42,6 +44,10 @@ void ConfigureGeneral::SetConfiguration() {
|
|||
continue;
|
||||
}
|
||||
|
||||
hold.insert({setting->GetLabel(), widget});
|
||||
}
|
||||
|
||||
for (const auto& [label, widget] : hold) {
|
||||
layout.addWidget(widget);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue