Corrected Insight window size restoration bug
This commit is contained in:
@@ -49,18 +49,19 @@ namespace Bloom
|
|||||||
this->setObjectName("main-window");
|
this->setObjectName("main-window");
|
||||||
this->setWindowTitle("Bloom Insight");
|
this->setWindowTitle("Bloom Insight");
|
||||||
|
|
||||||
const auto defaultMinimumSize = QSize(1000, 500);
|
auto windowSize = QSize(1000, 500);
|
||||||
|
|
||||||
if (this->insightProjectSettings.mainWindowSize.has_value()) {
|
if (this->insightProjectSettings.mainWindowSize.has_value()) {
|
||||||
this->setMinimumSize(
|
windowSize = QSize(
|
||||||
std::max(this->insightProjectSettings.mainWindowSize->width(), defaultMinimumSize.width()),
|
std::max(this->insightProjectSettings.mainWindowSize->width(), windowSize.width()),
|
||||||
std::max(this->insightProjectSettings.mainWindowSize->height(), defaultMinimumSize.height())
|
std::max(this->insightProjectSettings.mainWindowSize->height(), windowSize.height())
|
||||||
);
|
);
|
||||||
|
|
||||||
} else {
|
|
||||||
this->setMinimumSize(defaultMinimumSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->setFixedSize(windowSize);
|
||||||
|
this->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
|
||||||
|
this->setMinimumSize(0, 0);
|
||||||
|
|
||||||
auto mainWindowUiFile = QFile(
|
auto mainWindowUiFile = QFile(
|
||||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||||
+ "/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui"
|
+ "/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui"
|
||||||
@@ -167,7 +168,6 @@ namespace Bloom
|
|||||||
auto* footerLayout = this->footer->findChild<QHBoxLayout*>();
|
auto* footerLayout = this->footer->findChild<QHBoxLayout*>();
|
||||||
footerLayout->insertWidget(2, this->taskIndicator);
|
footerLayout->insertWidget(2, this->taskIndicator);
|
||||||
|
|
||||||
const auto windowSize = this->size();
|
|
||||||
this->windowContainer->setFixedSize(windowSize);
|
this->windowContainer->setFixedSize(windowSize);
|
||||||
this->layoutContainer->setFixedSize(windowSize);
|
this->layoutContainer->setFixedSize(windowSize);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user