From 058274510302c3dcb75cfa411fb378248ce7a61d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 1 Mar 2026 17:29:35 -0500 Subject: [PATCH] Replace some QDialogs with window widgets --- CHANGELOG.md | 1 + forms/mapimageexporter.ui | 5 +---- forms/palettecolorsearch.ui | 2 +- forms/wildmonsearch.ui | 2 +- include/ui/mapimageexporter.h | 2 +- include/ui/palettecolorsearch.h | 4 ++-- include/ui/wildmonsearch.h | 4 ++-- src/ui/mapimageexporter.cpp | 5 +++-- src/ui/palettecolorsearch.cpp | 5 +++-- src/ui/wildmonsearch.cpp | 3 ++- 10 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77de60e1..e176ef42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp - Fix the tool tips for the tileset selectors always listing the same tileset size. - Fix event sprite names that appear in `symbol_obj_event_gfx_pointers` by value and not by name not rendering with the correct sprite. - Fix event sprites sometimes rendering with incorrect transparency temporarily after a sprite change. +- Fix not being able to minimize/maximize some windows. ## [6.3.0] - 2025-12-26 ### Added diff --git a/forms/mapimageexporter.ui b/forms/mapimageexporter.ui index c8d479b8..9ce5126a 100644 --- a/forms/mapimageexporter.ui +++ b/forms/mapimageexporter.ui @@ -1,7 +1,7 @@ MapImageExporter - + 0 @@ -13,9 +13,6 @@ Export Map Image - - true - diff --git a/forms/palettecolorsearch.ui b/forms/palettecolorsearch.ui index 749cf6ee..32722a49 100644 --- a/forms/palettecolorsearch.ui +++ b/forms/palettecolorsearch.ui @@ -1,7 +1,7 @@ PaletteColorSearch - + 0 diff --git a/forms/wildmonsearch.ui b/forms/wildmonsearch.ui index bdd507c5..26679192 100644 --- a/forms/wildmonsearch.ui +++ b/forms/wildmonsearch.ui @@ -1,7 +1,7 @@ WildMonSearch - + 0 diff --git a/include/ui/mapimageexporter.h b/include/ui/mapimageexporter.h index 6ff49f09..fbb50551 100644 --- a/include/ui/mapimageexporter.h +++ b/include/ui/mapimageexporter.h @@ -30,7 +30,7 @@ struct ImageExporterSettings { QColor fillColor = Qt::transparent; }; -class MapImageExporter : public QDialog +class MapImageExporter : public QWidget { Q_OBJECT diff --git a/include/ui/palettecolorsearch.h b/include/ui/palettecolorsearch.h index 967f6efa..aabc9a01 100644 --- a/include/ui/palettecolorsearch.h +++ b/include/ui/palettecolorsearch.h @@ -1,7 +1,7 @@ #ifndef PALETTECOLORSEARCH_H #define PALETTECOLORSEARCH_H -#include +#include #include #include @@ -12,7 +12,7 @@ namespace Ui { class PaletteColorSearch; } -class PaletteColorSearch : public QDialog +class PaletteColorSearch : public QWidget { Q_OBJECT diff --git a/include/ui/wildmonsearch.h b/include/ui/wildmonsearch.h index 4fe608b8..793f3e92 100644 --- a/include/ui/wildmonsearch.h +++ b/include/ui/wildmonsearch.h @@ -1,7 +1,7 @@ #ifndef WILDMONSEARCH_H #define WILDMONSEARCH_H -#include +#include #include "numericsorttableitem.h" @@ -11,7 +11,7 @@ namespace Ui { class WildMonSearch; } -class WildMonSearch : public QDialog +class WildMonSearch : public QWidget { Q_OBJECT diff --git a/src/ui/mapimageexporter.cpp b/src/ui/mapimageexporter.cpp index e507c50e..46782c65 100644 --- a/src/ui/mapimageexporter.cpp +++ b/src/ui/mapimageexporter.cpp @@ -35,7 +35,7 @@ QString MapImageExporter::getDescription(ImageExporterMode mode) { } MapImageExporter::MapImageExporter(QWidget *parent, Project *project, Map *map, Layout *layout, ImageExporterMode mode) : - QDialog(parent), + QWidget(parent), ui(new Ui::MapImageExporter), m_project(project), m_map(map), @@ -44,6 +44,7 @@ MapImageExporter::MapImageExporter(QWidget *parent, Project *project, Map *map, m_originalMode(mode) { setAttribute(Qt::WA_DeleteOnClose); + setWindowFlags(Qt::Window); ui->setupUi(this); m_scene = new CheckeredBgScene(QSize(8,8), this); @@ -132,7 +133,7 @@ void MapImageExporter::showEvent(QShowEvent *event) { } void MapImageExporter::resizeEvent(QResizeEvent *event) { - QDialog::resizeEvent(event); + QWidget::resizeEvent(event); scalePreview(); } diff --git a/src/ui/palettecolorsearch.cpp b/src/ui/palettecolorsearch.cpp index e1f47a90..9d49d252 100644 --- a/src/ui/palettecolorsearch.cpp +++ b/src/ui/palettecolorsearch.cpp @@ -12,17 +12,18 @@ enum ResultsDataRole { }; PaletteColorSearch::PaletteColorSearch(Project *project, const Tileset *primaryTileset, const Tileset *secondaryTileset, QWidget *parent) : - QDialog(parent), + QWidget(parent), ui(new Ui::PaletteColorSearch), m_project(project), m_primaryTileset(primaryTileset), m_secondaryTileset(secondaryTileset) { setAttribute(Qt::WA_DeleteOnClose); + setWindowFlags(Qt::Window); ui->setupUi(this); ui->buttonBox->setVisible(isModal()); - connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::close); + connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close); // Rather than try to keep track of metatile/tile changes that affect which colors are used, // we'll just refresh when the window is activated. diff --git a/src/ui/wildmonsearch.cpp b/src/ui/wildmonsearch.cpp index 981114fb..2c82c582 100644 --- a/src/ui/wildmonsearch.cpp +++ b/src/ui/wildmonsearch.cpp @@ -14,11 +14,12 @@ enum ResultsDataRole { }; WildMonSearch::WildMonSearch(Project *project, QWidget *parent) : - QDialog(parent), + QWidget(parent), ui(new Ui::WildMonSearch), project(project) { setAttribute(Qt::WA_DeleteOnClose); + setWindowFlags(Qt::Window); ui->setupUi(this); // Set up species combo box