From 06b0ea5a813074d0e4afc54db218bc0c84e04a7d Mon Sep 17 00:00:00 2001 From: Joachim Kohlhammer Date: Mon, 5 Aug 2024 16:25:27 +0200 Subject: [PATCH] TrainerDay: Setting the geometry of the dialog Setting the geometriy of the download dialog instead of the minimum size, thus allowing full resizing. See https://groups.google.com/g/golden-cheetah-users/c/Xi6d3L1t9QA/m/gWe2Q2uNAQAJ --- src/Train/TrainerDayDownloadDialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Train/TrainerDayDownloadDialog.cpp b/src/Train/TrainerDayDownloadDialog.cpp index 74be136a0..4071b9db9 100644 --- a/src/Train/TrainerDayDownloadDialog.cpp +++ b/src/Train/TrainerDayDownloadDialog.cpp @@ -33,8 +33,11 @@ TrainerDayDownloadDialog::TrainerDayDownloadDialog(Context *context) : QDialog(c this->setWhatsThis(help->getWhatsThisText(HelpWhatsThis::MenuBar_Tools_Download_ERGDB)); // make the dialog a resonable size - setMinimumWidth(QApplication::primaryScreen()->geometry().width() * 0.8); - setMinimumHeight(QApplication::primaryScreen()->geometry().height() * 0.8); + int screenWidth = QApplication::primaryScreen()->geometry().width(); + int screenHeight = QApplication::primaryScreen()->geometry().height(); + double widthFactor = 0.8; + double heightFactor = 0.8; + setGeometry(screenWidth * (1.0 - widthFactor) / 2.0, screenHeight * (1.0 - heightFactor) / 2.0, screenWidth * widthFactor, screenHeight * heightFactor); legacy = new QWidget(); QVBoxLayout *legacyLayout = new QVBoxLayout;