fix size error when new item inserted

Change-Id: I51aa1b7c1a03a8059d82e5f49dae1b910511321f
This commit is contained in:
石博文 2017-11-17 10:58:18 +08:00
parent 875eca925c
commit 25ddde5da9
Notes: Deepin Code Review 2017-11-17 11:05:32 +08:00
Verified+1: Anonymous Coward #1000004
Verified+1: <zhaofangfang@linuxdeepin.com>
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Fri, 17 Nov 2017 11:05:31 +0800
Reviewed-on: https://cr.deepin.io/28595
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -237,7 +237,7 @@ void MainWindow::interalMove(const QPoint &p)
}
}
int hx = 2, wx = 2;
int hx = height() * ratio, wx = width() * ratio;
if (m_settings->hideMode() != HideMode::KeepShowing &&
m_settings->hideState() == HideState::Hide &&
m_panelHideAni->state() == QVariantAnimation::Stopped)
@ -246,11 +246,11 @@ void MainWindow::interalMove(const QPoint &p)
{
case Top:
case Bottom:
wx = width() * ratio;
hx = 2;
break;
case Left:
case Right:
hx = height() * ratio;
wx = 2;
}
}