mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fixed(dock): fix bug 2697
This commit is contained in:
parent
3cfbc502f0
commit
212103100b
@ -171,14 +171,6 @@ const QSize DockSettings::panelSize() const
|
||||
const QRect DockSettings::windowRect(const Position position, const bool hide) const
|
||||
{
|
||||
QSize size = m_mainWindowSize;
|
||||
if (hide) {
|
||||
switch (position) {
|
||||
case Top:
|
||||
case Bottom: size.setHeight(2); break;
|
||||
case Left:
|
||||
case Right: size.setWidth(2); break;
|
||||
}
|
||||
}
|
||||
|
||||
const QRect primaryRect = this->primaryRect();
|
||||
const int offsetX = (primaryRect.width() - size.width()) / 2;
|
||||
|
@ -501,25 +501,15 @@ void MainWindow::updateGeometry()
|
||||
m_mainPanel->setPositonValue(position);
|
||||
resizeMainPanelWindow();
|
||||
|
||||
bool animation = true;
|
||||
bool isHide = m_settings->hideState() == Hide && !testAttribute(Qt::WA_UnderMouse);
|
||||
|
||||
if (isHide) {
|
||||
switch (position) {
|
||||
case Top:
|
||||
case Bottom: size.setHeight(2); break;
|
||||
case Left:
|
||||
case Right: size.setWidth(2); break;
|
||||
}
|
||||
animation = false;
|
||||
QWidget::setFixedSize(size);
|
||||
}
|
||||
const QRect windowRect = m_settings->windowRect(position, isHide);
|
||||
const QRect windowRect = m_settings->windowRect(position, true);
|
||||
|
||||
internalMove(windowRect.topLeft());
|
||||
|
||||
m_size = m_settings->m_mainWindowSize;
|
||||
|
||||
QWidget::setFixedSize(size);
|
||||
setStrutPartial();
|
||||
|
||||
m_mainPanel->update();
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user