From 1e3f76f040ebbb59f4dc8131f680910729a2da57 Mon Sep 17 00:00:00 2001 From: Nav Date: Mon, 11 Oct 2021 22:00:57 +0100 Subject: [PATCH] Used size policy for the resizing of the target registers scroll area, as opposed to a manual resize in resizeEvent() --- .../TargetRegistersPaneWidget.cpp | 5 +---- .../UiFiles/TargetRegistersSidePane.ui | 12 ++++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp index 5cd6fffe..6a536f2d 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp @@ -217,10 +217,7 @@ void TargetRegistersPaneWidget::resizeEvent(QResizeEvent* event) { * In order to avoid the panel resize handle overlapping the scroll bar handle, we reduce the size of * the scroll area. */ - this->itemScrollArea->setFixedSize( - width - this->parent->getHandleSize(), - parentSize.height() - this->toolBar->height() - this->searchInput->height() - 5 - ); + this->itemScrollArea->setFixedWidth(width - this->parent->getHandleSize()); } void TargetRegistersPaneWidget::postActivate() { diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui index f207d02f..9085e9c3 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/TargetRegistersSidePane.ui @@ -116,12 +116,15 @@ - + true Qt::ScrollBarAsNeeded QAbstractScrollArea::AdjustToContents Qt::ScrollBarAlwaysOff + + + @@ -139,13 +142,6 @@ - - - - Qt::Vertical - - -