make wild encounter windows obey theme

This commit is contained in:
garak 2019-09-11 08:42:06 -04:00 committed by huderlem
parent 9375fd580c
commit b1509cb000
3 changed files with 9 additions and 9 deletions

View file

@ -72,7 +72,7 @@ public:
void setConnectionMap(QString mapName);
void addNewConnection();
void removeCurrentConnection();
void addNewWildMonGroup();
void addNewWildMonGroup(QWidget *window);
void updateDiveMap(QString mapName);
void updateEmergeMap(QString mapName);
void setSelectedConnectionFromMap(QString mapName);
@ -80,7 +80,7 @@ public:
void updateSecondaryTileset(QString tilesetLabel, bool forceLoad = false);
void toggleBorderVisibility(bool visible);
void updateCustomMapHeaderValues(QTableWidget *);
void configureEncounterJSON();
void configureEncounterJSON(QWidget *);
Tileset *getCurrentMapPrimaryTileset();
DraggablePixmapItem *addMapEvent(Event *event);

View file

@ -204,13 +204,13 @@ void Editor::displayWildMonTables() {
stack->setCurrentIndex(0);
}
void Editor::addNewWildMonGroup() {
void Editor::addNewWildMonGroup(QWidget *window) {
QStackedWidget *stack = ui->stackedWidget_WildMons;
QComboBox *labelCombo = ui->comboBox_EncounterGroupLabel;
int stackIndex = stack->currentIndex();
QDialog dialog(nullptr, Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
QDialog dialog(window, Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
dialog.setWindowTitle("New Wild Encounter Group Label");
dialog.setWindowModality(Qt::NonModal);
@ -316,7 +316,7 @@ void Editor::addNewWildMonGroup() {
}
}
void Editor::configureEncounterJSON() {
void Editor::configureEncounterJSON(QWidget *window) {
QVector<QWidget *> fieldSlots;
Fields tempFields = project->wildMonFields;
@ -357,7 +357,7 @@ void Editor::configureEncounterJSON() {
return slot;
};
QDialog dialog(nullptr, Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
QDialog dialog(window, Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
dialog.setWindowTitle("Configure Wild Encounter Fields");
dialog.setWindowModality(Qt::NonModal);

View file

@ -129,7 +129,7 @@ void MainWindow::initMiscHeapObjects() {
}
void MainWindow::initMapSortOrder() {
QMenu *mapSortOrderMenu = new QMenu();
QMenu *mapSortOrderMenu = new QMenu(this);
QActionGroup *mapSortOrderActionGroup = new QActionGroup(ui->toolButton_MapSortOrder);
mapSortOrderMenu->addAction(ui->actionSort_by_Group);
@ -1987,11 +1987,11 @@ void MainWindow::on_pushButton_RemoveConnection_clicked()
}
void MainWindow::on_pushButton_NewWildMonGroup_clicked() {
editor->addNewWildMonGroup();
editor->addNewWildMonGroup(this);
}
void MainWindow::on_pushButton_ConfigureEncountersJSON_clicked() {
editor->configureEncounterJSON();
editor->configureEncounterJSON(this);
}
void MainWindow::on_comboBox_DiveMap_activated(const QString &mapName)