mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-23 13:33:50 +03:00
tasks:make parabolic effect fixes
This commit is contained in:
parent
d3eed82145
commit
a1ec6de412
@ -1432,8 +1432,8 @@ bool View::event(QEvent *e)
|
||||
QMetaObject::invokeMethod(m_currentParabolicItem,
|
||||
"parabolicMove",
|
||||
Qt::DirectConnection,
|
||||
Q_ARG(int, internal.x()),
|
||||
Q_ARG(int, internal.y()));
|
||||
Q_ARG(qreal, internal.x()),
|
||||
Q_ARG(qreal, internal.y()));
|
||||
} else {
|
||||
//! clearing parabolic item
|
||||
setCurrentParabolicItem(nullptr);
|
||||
|
@ -22,8 +22,8 @@ import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
Item {
|
||||
id: _parabolicArea
|
||||
signal parabolicEntered(int mouseX, int mouseY);
|
||||
signal parabolicMove(int mouseX, int mouseY);
|
||||
signal parabolicEntered(real mouseX, real mouseY);
|
||||
signal parabolicMove(real mouseX, real mouseY);
|
||||
signal parabolicExited();
|
||||
|
||||
readonly property bool containsMouse: appletItem.parabolic.currentParabolicItem === _parabolicArea
|
||||
@ -80,8 +80,7 @@ Item {
|
||||
if (root.isHorizontal){
|
||||
appletItem.layouts.currentSpot = mouseX;
|
||||
calculateParabolicScales(mouseX);
|
||||
}
|
||||
else{
|
||||
} else{
|
||||
appletItem.layouts.currentSpot = mouseY;
|
||||
calculateParabolicScales(mouseY);
|
||||
}
|
||||
|
@ -22,15 +22,13 @@ import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
Item {
|
||||
id: _parabolicArea
|
||||
signal parabolicEntered(int mouseX, int mouseY);
|
||||
signal parabolicMove(int mouseX, int mouseY);
|
||||
signal parabolicEntered(real mouseX, real mouseY);
|
||||
signal parabolicMove(real mouseX, real mouseY);
|
||||
signal parabolicExited();
|
||||
|
||||
readonly property bool containsMouse: taskItem.parabolic.currentParabolicItem === _parabolicArea
|
||||
|
||||
property real center:root.isHorizontal ?
|
||||
(wrapper.width + hiddenSpacerLeft.separatorSpace + hiddenSpacerRight.separatorSpace) / 2 :
|
||||
(wrapper.height + hiddenSpacerLeft.separatorSpace + hiddenSpacerRight.separatorSpace) / 2
|
||||
readonly property real center: wrapper.center
|
||||
|
||||
MouseArea {
|
||||
id: parabolicMouseArea
|
||||
@ -91,6 +89,8 @@ Item {
|
||||
if (root.autoScrollTasksEnabled) {
|
||||
scrollableList.autoScrollFor(taskItem, false);
|
||||
}
|
||||
|
||||
//! do not send any parabolic mouse movement. At this point mouseX/Y are not valid
|
||||
}
|
||||
|
||||
onParabolicMove: {
|
||||
|
@ -433,9 +433,9 @@ MouseArea{
|
||||
onDockIsShownCompletelyChanged: {
|
||||
if (dockIsShownCompletely && taskItem.containsMouse) {
|
||||
if (root.vertical) {
|
||||
taskItem.mousePosChanged(taskItem.mouseY);
|
||||
// taskItem.mousePosChanged(taskItem.mouseY);
|
||||
} else {
|
||||
taskItem.mousePosChanged(taskItem.mouseX);
|
||||
// taskItem.mousePosChanged(taskItem.mouseX);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,8 +94,6 @@ Item{
|
||||
property real visualScaledHeight: (taskItem.metrics.iconSize + root.internalHeightMargins) * mScale
|
||||
/// end of Scalers///////
|
||||
|
||||
// property int index: taskItem.Positioner.index
|
||||
//property real center: (width + hiddenSpacerLeft.separatorSpace + hiddenSpacerRight.separatorSpace) / 2
|
||||
property real center: !root.vertical ?
|
||||
(width + hiddenSpacerLeft.separatorSpace + hiddenSpacerRight.separatorSpace) / 2 :
|
||||
(height + hiddenSpacerLeft.separatorSpace + hiddenSpacerRight.separatorSpace) / 2
|
||||
|
Loading…
Reference in New Issue
Block a user