Fixed bug with panel resizing where the bottom panel was overlapping on resize

This commit is contained in:
Nav
2021-10-14 23:48:32 +01:00
parent d6aa2ec91a
commit 03a36c12a7
3 changed files with 4 additions and 5 deletions

View File

@@ -77,9 +77,9 @@ void PanelWidget::mouseReleaseEvent(QMouseEvent* event) {
} }
void PanelWidget::mouseMoveEvent(QMouseEvent* event) { void PanelWidget::mouseMoveEvent(QMouseEvent* event) {
const auto position = event->pos();
if (this->resizingActive) { if (this->resizingActive) {
const auto position = event->pos();
if (this->panelType == PanelWidgetType::LEFT) { if (this->panelType == PanelWidgetType::LEFT) {
this->setFixedWidth( this->setFixedWidth(
std::max( std::max(

View File

@@ -210,7 +210,7 @@ void TargetRegistersPaneWidget::onItemSelectionChange(ItemWidget* newlySelectedW
void TargetRegistersPaneWidget::resizeEvent(QResizeEvent* event) { void TargetRegistersPaneWidget::resizeEvent(QResizeEvent* event) {
const auto parentSize = this->parent->size(); const auto parentSize = this->parent->size();
const auto width = parentSize.width() - 1; const auto width = parentSize.width() - 1;
this->container->setFixedSize(width, parentSize.height()); this->container->setFixedWidth(width);
this->searchInput->setFixedWidth(width - 20); this->searchInput->setFixedWidth(width - 20);
/* /*

View File

@@ -123,7 +123,7 @@
<property name="sizeAdjustPolicy"><enum>QAbstractScrollArea::AdjustToContents</enum></property> <property name="sizeAdjustPolicy"><enum>QAbstractScrollArea::AdjustToContents</enum></property>
<property name="horizontalScrollBarPolicy"><enum>Qt::ScrollBarAlwaysOff</enum></property> <property name="horizontalScrollBarPolicy"><enum>Qt::ScrollBarAlwaysOff</enum></property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"/> <sizepolicy hsizetype="Expanding" vsizetype="Expanding"/>
</property> </property>
<widget class="QWidget" name="item-container"> <widget class="QWidget" name="item-container">
@@ -134,7 +134,6 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetMinAndMaxSize</enum> <enum>QLayout::SetMinAndMaxSize</enum>
</property> </property>