From c1cac55a61190a94bc80828a918ceb28694e8dfe Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 17 Nov 2021 21:44:55 +0000 Subject: [PATCH] Automatically resize the Insight window upon the user opening the bottom panel, to ensure there is adequate space --- .../InsightWindow/InsightWindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index 5b3d4f78..5bfad1b9 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -254,6 +254,14 @@ void InsightWindow::toggleRamInspectionPane() { this->ramInspectionPane->activate(); this->bottomPanel->show(); this->ramInspectionButton->setChecked(true); + + if (this->targetPackageWidget != nullptr) { + this->setMinimumHeight(std::max( + this->minimumHeight(), + this->targetPackageWidget->height() + this->header->height() + this->footer->height() + + this->menuBar()->height() + this->bottomPanel->getMinimumResize() + 30 + )); + } } } @@ -271,6 +279,14 @@ void InsightWindow::toggleEepromInspectionPane() { this->eepromInspectionPane->activate(); this->bottomPanel->show(); this->eepromInspectionButton->setChecked(true); + + if (this->targetPackageWidget != nullptr) { + this->setMinimumHeight(std::max( + this->minimumHeight(), + this->targetPackageWidget->height() + this->header->height() + this->footer->height() + + this->menuBar()->height() + this->bottomPanel->getMinimumResize() + 30 + )); + } } }