mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-05 05:47:26 +03:00
fix configurationarea events sunk mechanism
This commit is contained in:
parent
2d48769771
commit
32d2e75b0c
@ -31,7 +31,6 @@ import org.kde.latte.core 0.2 as LatteCore
|
||||
|
||||
MouseArea {
|
||||
id: configurationArea
|
||||
|
||||
z: 1000
|
||||
|
||||
width: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? root.width : thickness
|
||||
@ -41,7 +40,6 @@ MouseArea {
|
||||
hoverEnabled: root.inConfigureAppletsMode
|
||||
|
||||
focus: true
|
||||
|
||||
cursorShape: {
|
||||
if (currentApplet && tooltip.visible && currentApplet.latteStyleApplet) {
|
||||
return root.isHorizontal ? Qt.SizeHorCursor : Qt.SizeVerCursor;
|
||||
@ -77,14 +75,8 @@ MouseArea {
|
||||
|
||||
function hoveredItem(x, y) {
|
||||
//! main layout
|
||||
var relevantLayout;
|
||||
var item;
|
||||
|
||||
if (!item) {
|
||||
// main layout
|
||||
relevantLayout = mapFromItem(layoutsContainer.mainLayout, 0, 0);
|
||||
item = layoutsContainer.mainLayout.childAt(x-relevantLayout.x, y-relevantLayout.y);
|
||||
}
|
||||
var relevantLayout = mapFromItem(layoutsContainer.mainLayout, 0, 0);
|
||||
var item = layoutsContainer.mainLayout.childAt(x-relevantLayout.x, y-relevantLayout.y);
|
||||
|
||||
if (!item) {
|
||||
// start layout
|
||||
@ -150,12 +142,12 @@ MouseArea {
|
||||
|
||||
//! ignore thicknes moving at all cases
|
||||
if (plasmoid.formFactor === PlasmaCore.Types.Horizontal) {
|
||||
mousesink.y = 0;
|
||||
mousesink.y = configurationArea.height / 2;
|
||||
} else {
|
||||
mousesink.x = 0;
|
||||
mousesink.x = configurationArea.width / 2;
|
||||
}
|
||||
|
||||
var item = hoveredItem(mousesink.x, mousesink.y);
|
||||
var item = hoveredItem(mousesink.x, mousesink.y);
|
||||
|
||||
if (item && item !== placeHolder) {
|
||||
placeHolder.parent = configurationArea;
|
||||
|
Loading…
x
Reference in New Issue
Block a user