feat: plugin will be overlap when change the dock position bug for 13105

This commit is contained in:
wangxuwen 2020-01-02 14:59:42 +08:00
parent 89ed26e574
commit 7cd081710e
3 changed files with 13 additions and 0 deletions

View File

@ -274,3 +274,13 @@ int NormalContainer::whereToInsertSystemTrayByDefault(FashionTrayWidgetWrapper *
return insertIndex;
}
void NormalContainer::updateSize()
{
if (QPropertyAnimation::Stopped == m_sizeAnimation->state()) {
if (dockPosition() == Dock::Top || dockPosition() == Dock::Bottom)
setMaximumWidth(totalSize().width());
else {
setMaximumHeight(totalSize().height());
}
}
}

View File

@ -17,6 +17,7 @@ public:
void setExpand(const bool expand) Q_DECL_OVERRIDE;
int itemCount() override;
QSize sizeHint() const override;
void updateSize();
protected:
int whereToInsert(FashionTrayWidgetWrapper *wrapper) Q_DECL_OVERRIDE;

View File

@ -381,4 +381,6 @@ void FashionTrayItem::resizeTray()
m_controlWidget->setFixedSize(QWIDGETSIZE_MAX, m_iconSize);
}
m_normalContainer->updateSize();
}