diff options
author | Chris Xiong <chirs241097@gmail.com> | 2022-09-26 22:45:20 -0400 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2022-09-26 22:45:20 -0400 |
commit | c95bd9595bdc612a78c6364ce6ca8f20ef28cd52 (patch) | |
tree | b4537b6698fa903ff07800dc1c4acffccf08b585 | |
parent | 2e7924a07d45c1d1468552f951dcd2f2dcc948fa (diff) | |
download | deduper-c95bd9595bdc612a78c6364ce6ca8f20ef28cd52.tar.xz |
Remove cancel button from progress dialog in finalizing stage.
Also remove all window buttons from the dialog.
-rw-r--r-- | qdeduper/mingui.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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<std::pair<fs::path, bool>> paths) { this->pd->setMaximum(0); this->pd->setLabelText("Finalizing..."); + QPushButton *cancelbtn = this->pd->findChild<QPushButton*>(); + if (Q_LIKELY(cancelbtn)) cancelbtn->setVisible(false); } }, Qt::ConnectionType::QueuedConnection); populate_cfg_t c = this->sdb->get_sig_config(); |