mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-09 00:58:15 +03:00
tasksparabolic:use view triggering values
This commit is contained in:
parent
259f04f7c9
commit
b5ceb4d91a
@ -1292,6 +1292,10 @@ void View::setCurrentParabolicItem(QQuickItem *item)
|
||||
return;
|
||||
}
|
||||
|
||||
if (item && m_currentParabolicItem) {
|
||||
QMetaObject::invokeMethod(item, "parabolicExited", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
m_currentParabolicItem = item;
|
||||
emit currentParabolicItemChanged();
|
||||
}
|
||||
@ -1440,7 +1444,7 @@ bool View::event(QEvent *e)
|
||||
//! sending move event to parabolic item
|
||||
QMetaObject::invokeMethod(m_currentParabolicItem,
|
||||
"parabolicMove",
|
||||
Qt::DirectConnection,
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(qreal, internal.x()),
|
||||
Q_ARG(qreal, internal.y()));
|
||||
} else {
|
||||
@ -1587,14 +1591,13 @@ void View::onCurrentParabolicItemChanged()
|
||||
m_parabolicItemNullifier.stop();
|
||||
|
||||
if (m_currentParabolicItem != nullptr) {
|
||||
//! send the ParabolicEnter because the
|
||||
QPointF internal = m_currentParabolicItem->mapFromScene(m_lastOrphanParabolicMove);
|
||||
|
||||
if (m_currentParabolicItem->contains(internal)) {
|
||||
//! sending enter event to parabolic item
|
||||
QMetaObject::invokeMethod(m_currentParabolicItem,
|
||||
"parabolicEntered",
|
||||
Qt::DirectConnection,
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(qreal, internal.x()),
|
||||
Q_ARG(qreal, internal.y()));
|
||||
}
|
||||
|
@ -48,16 +48,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: appletItem.parabolic
|
||||
|
||||
onCurrentParabolicItemChanged: {
|
||||
if (appletItem.parabolic.currentParabolicItem !== _parabolicArea) {
|
||||
_parabolicArea.parabolicExited();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onParabolicEntered: {
|
||||
appletItem.parabolic.stopRestoreZoomTimer();
|
||||
|
||||
|
@ -46,16 +46,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: taskItem.parabolic
|
||||
|
||||
onCurrentParabolicItemChanged: {
|
||||
if (taskItem.parabolic.currentParabolicItem !== _parabolicArea) {
|
||||
_parabolicArea.parabolicExited();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections{
|
||||
target: root
|
||||
|
||||
@ -112,7 +102,8 @@ Item {
|
||||
|
||||
//! do not send any parabolic mouse movement. At this point mouseX/Y are NOT valid/accurate
|
||||
var current = root.isHorizontal ? mouseX : mouseY;
|
||||
console.log(" current spot ENTER : " + current);
|
||||
icList.currentSpot = current;
|
||||
calculateParabolicScales(current);
|
||||
}
|
||||
|
||||
onParabolicMove: {
|
||||
@ -120,7 +111,6 @@ Item {
|
||||
lastMouseY = mouseY;
|
||||
|
||||
var mousePos = root.isHorizontal ? mouseX : mouseY;
|
||||
console.log(" current move : " + mousePos);
|
||||
|
||||
if (mousePos<0 || (inBlockingAnimation && !(inAttentionAnimation||inFastRestoreAnimation||inMimicParabolicAnimation)))
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user