From c95bd9595bdc612a78c6364ce6ca8f20ef28cd52 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 26 Sep 2022 22:45:20 -0400 Subject: Remove cancel button from progress dialog in finalizing stage. Also remove all window buttons from the dialog. --- qdeduper/mingui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qdeduper/mingui.cpp b/qdeduper/mingui.cpp index 0c32d05..3d11e36 100644 --- a/qdeduper/mingui.cpp +++ b/qdeduper/mingui.cpp @@ -128,10 +128,14 @@ DeduperMainWindow::DeduperMainWindow() pd->setMaximumHeight(120); pd->setMinimumHeight(120); pd->close(); + Qt::WindowFlags pdwf = pd->windowFlags(); + pdwf |= Qt::WindowType::CustomizeWindowHint; + pdwf &= ~(Qt::WindowType::WindowCloseButtonHint | Qt::WindowType::WindowContextHelpButtonHint); + pd->setWindowFlags(pdwf); QFont fnt = QFontDatabase::systemFont(QFontDatabase::SystemFont::FixedFont); lv->setFont(fnt); infopanel->setFont(fnt); - pd->setFont(fnt); + pdlb->setFont(fnt); sr = new SettingsRegistry(QStandardPaths::writableLocation(QStandardPaths::StandardLocation::ConfigLocation) + QString("/qdeduperrc")); int generalt = sr->register_tab("General"); @@ -701,6 +705,8 @@ void DeduperMainWindow::scan_dirs(std::vector> paths) { this->pd->setMaximum(0); this->pd->setLabelText("Finalizing..."); + QPushButton *cancelbtn = this->pd->findChild(); + if (Q_LIKELY(cancelbtn)) cancelbtn->setVisible(false); } }, Qt::ConnectionType::QueuedConnection); populate_cfg_t c = this->sdb->get_sig_config(); -- cgit v1.2.3