mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
refactor: Remove the bottom area to prevent unintentional operation in auto-hide mode
隐藏模式下,如果鼠标唤起dock,容易呼出窗口预览,这是不必要的操作。
This commit is contained in:
parent
3a64c637f9
commit
6f317050f3
@ -26,6 +26,7 @@
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QJsonObject>
|
||||
#include <QCursor>
|
||||
|
||||
Position DockItem::DockPosition = Position::Top;
|
||||
DisplayMode DockItem::DockDisplayMode = DisplayMode::Efficient;
|
||||
@ -161,6 +162,11 @@ void DockItem::mousePressEvent(QMouseEvent *e)
|
||||
|
||||
void DockItem::enterEvent(QEvent *e)
|
||||
{
|
||||
// Remove the bottom area to prevent unintentional operation in auto-hide mode.
|
||||
if (!rect().adjusted(0, 0, width(), height() - 5).contains(mapFromGlobal(QCursor::pos()))) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_hover = true;
|
||||
m_hoverEffect->setHighlighting(true);
|
||||
m_popupTipsDelayTimer->start();
|
||||
|
Loading…
x
Reference in New Issue
Block a user