aboutsummaryrefslogtreecommitdiff
path: root/src/charselect.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <Varsash@Gmail.com>2021-02-11 15:50:19 +0300
committerGitHub <noreply@github.com>2021-02-11 15:50:19 +0300
commit3ac6b337a1e6de51a257af70631c7e02a12fe00f (patch)
treee8510c796974739e781f882941113a5f43684124 /src/charselect.cpp
parent90190f5a809b239f2ae11e8b7b1e434585d75927 (diff)
Fix charselect elements not affected by theme reloading (#465)
Diffstat (limited to 'src/charselect.cpp')
-rw-r--r--src/charselect.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/charselect.cpp b/src/charselect.cpp
index 1356f242..bdd951c1 100644
--- a/src/charselect.cpp
+++ b/src/charselect.cpp
@@ -18,8 +18,6 @@ void Courtroom::construct_char_select()
ui_char_list->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
ui_char_list->hideColumn(1);
ui_char_list->setDropIndicatorShown(true);
- set_size_and_pos(ui_char_list, "char_list");
-
ui_char_buttons = new QWidget(ui_char_select_background);
@@ -40,21 +38,12 @@ void Courtroom::construct_char_select()
ui_char_search = new QLineEdit(ui_char_select_background);
ui_char_search->setPlaceholderText(tr("Search"));
- ui_char_search->setFocus();
- set_size_and_pos(ui_char_search, "char_search");
ui_char_passworded = new QCheckBox(ui_char_select_background);
ui_char_passworded->setText(tr("Passworded"));
- set_size_and_pos(ui_char_passworded, "char_passworded");
ui_char_taken = new QCheckBox(ui_char_select_background);
ui_char_taken->setText(tr("Taken"));
- set_size_and_pos(ui_char_taken, "char_taken");
-
- ui_char_taken->setChecked(true);
- ui_char_passworded->setChecked(true);
-
- set_size_and_pos(ui_char_buttons, "char_buttons");
connect(ui_char_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)),
this, SLOT(on_char_list_double_clicked(QTreeWidgetItem *, int)));
@@ -76,8 +65,6 @@ void Courtroom::construct_char_select()
connect(ui_char_taken, SIGNAL(stateChanged(int)), this,
SLOT(on_char_taken_clicked()));
- truncate_label_text(ui_char_taken, "char_taken");
- truncate_label_text(ui_char_passworded, "char_passworded");
}
void Courtroom::set_char_select()
@@ -94,10 +81,22 @@ void Courtroom::set_char_select()
}
else
this->setFixedSize(f_charselect.width, f_charselect.height);
-
ui_char_select_background->resize(f_charselect.width, f_charselect.height);
ui_char_select_background->set_image("charselect_background");
+ ui_char_search->setFocus();
+ set_size_and_pos(ui_char_search, "char_search");
+ set_size_and_pos(ui_char_list, "char_list");
+ set_size_and_pos(ui_char_passworded, "char_passworded");
+ set_size_and_pos(ui_char_taken, "char_taken");
+ set_size_and_pos(ui_char_buttons, "char_buttons");
+
+ ui_char_taken->setChecked(true);
+ ui_char_passworded->setChecked(true);
+
+ truncate_label_text(ui_char_taken, "char_taken");
+ truncate_label_text(ui_char_passworded, "char_passworded");
+
filter_character_list();
ui_char_search->setFocus();