Fix: item is not update when wm changed

Change-Id: If70b1dd2fd39a715fc878f94f71cf130efcde6cc
This commit is contained in:
石博文 2018-02-09 14:29:36 +08:00
parent 0a13d93e4a
commit 7251c61622
Notes: Deepin Code Review 2018-02-09 18:33:05 +08:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Fri, 09 Feb 2018 18:33:04 +0800
Reviewed-on: https://cr.deepin.io/31721
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -329,6 +329,9 @@ void MainPanel::adjustItemSize()
{
Q_ASSERT(sender() == m_itemAdjustTimer);
// ensure all item is update, whatever layout is changed
QTimer::singleShot(1, this, static_cast<void (MainPanel::*)()>(&MainPanel::update));
const auto ratio = devicePixelRatioF();
QSize itemSize;