mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
bugfix:can't show dock by mouse at first time in smart(keep)-hide mode
Change-Id: I49631c2addca57d51d3da88a3ac786123a209c61
This commit is contained in:
parent
004c235852
commit
6d953151bd
Notes:
Deepin Code Review
2016-06-14 07:19:47 +00:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: <yangwanqing@linuxdeepin.com> Submitted-by: <yangwanqing@linuxdeepin.com> Submitted-at: Mon, 12 Oct 2015 16:11:05 +0800 Reviewed-on: https://cr.deepin.io/7692 Project: dde/dde-dock Branch: refs/heads/master
@ -87,6 +87,12 @@ void MainWidget::enterEvent(QEvent *)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWidget::leaveEvent(QEvent *)
|
||||
{
|
||||
if (!this->geometry().contains(QCursor::pos()))
|
||||
m_dhsm->UpdateState();
|
||||
}
|
||||
|
||||
void MainWidget::showDock()
|
||||
{
|
||||
m_hasHidden = false;
|
||||
@ -102,7 +108,7 @@ void MainWidget::hideDock()
|
||||
void MainWidget::onPanelSizeChanged()
|
||||
{
|
||||
QRect rec = QApplication::desktop()->screenGeometry();
|
||||
this->setFixedSize(m_mainPanel->size());
|
||||
this->setFixedSize(m_mainPanel->width(), height());
|
||||
this->move((rec.width() - width()) / 2, y());
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@ public:
|
||||
|
||||
protected:
|
||||
void enterEvent(QEvent *);
|
||||
void leaveEvent(QEvent *);
|
||||
|
||||
private:
|
||||
void showDock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user