mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-23 13:33:50 +03:00
remove margins from SinkAreas
This commit is contained in:
parent
1b23e3669b
commit
c7fedca8b6
@ -240,7 +240,7 @@ QEvent *EventsSink::onEvent(QEvent *e)
|
|||||||
|
|
||||||
QPointF EventsSink::positionAdjustedForDestination(const QPointF &point) const
|
QPointF EventsSink::positionAdjustedForDestination(const QPointF &point) const
|
||||||
{
|
{
|
||||||
QRectF destinationRectToScene = m_destinationItem->mapRectToScene(QRectF(0, 0, m_destinationItem->width(), m_destinationItem->height()));
|
QRectF destinationRectToScene = m_destinationItem->mapRectToScene(QRectF(0, 0, m_destinationItem->width() - 1, m_destinationItem->height() - 1));
|
||||||
|
|
||||||
return QPointF(qBound(destinationRectToScene.left(), point.x(), destinationRectToScene.right()),
|
return QPointF(qBound(destinationRectToScene.left(), point.x(), destinationRectToScene.right()),
|
||||||
qBound(destinationRectToScene.top(), point.y(), destinationRectToScene.bottom()));
|
qBound(destinationRectToScene.top(), point.y(), destinationRectToScene.bottom()));
|
||||||
|
@ -53,13 +53,10 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//! EventsSinkOriginArea gain "1px." margin from destination in order to not create
|
|
||||||
//! endless loops between different EventsSinkOriginArea(s)
|
|
||||||
|
|
||||||
EventsSinkOriginArea {
|
EventsSinkOriginArea {
|
||||||
id: topArea
|
id: topArea
|
||||||
anchors.bottom: parent.top
|
anchors.bottom: parent.top
|
||||||
anchors.bottomMargin: 1
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
width: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? destination.width + 2 * lengthPadding : destination.width
|
width: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? destination.width + 2 * lengthPadding : destination.width
|
||||||
@ -77,7 +74,6 @@ Item {
|
|||||||
EventsSinkOriginArea {
|
EventsSinkOriginArea {
|
||||||
id: bottomArea
|
id: bottomArea
|
||||||
anchors.top: parent.bottom
|
anchors.top: parent.bottom
|
||||||
anchors.topMargin: 1
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
width: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? destination.width + 2 * lengthPadding : parent.width
|
width: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? destination.width + 2 * lengthPadding : parent.width
|
||||||
@ -95,7 +91,6 @@ Item {
|
|||||||
EventsSinkOriginArea {
|
EventsSinkOriginArea {
|
||||||
id: leftArea
|
id: leftArea
|
||||||
anchors.right: parent.left
|
anchors.right: parent.left
|
||||||
anchors.rightMargin: 1
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
height: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? parent.height : destination.height + 2 * lengthPadding
|
height: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? parent.height : destination.height + 2 * lengthPadding
|
||||||
@ -113,7 +108,6 @@ Item {
|
|||||||
EventsSinkOriginArea {
|
EventsSinkOriginArea {
|
||||||
id: rightArea
|
id: rightArea
|
||||||
anchors.left: parent.right
|
anchors.left: parent.right
|
||||||
anchors.leftMargin: 1
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
height: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? parent.height : destination.height + 2 * lengthPadding
|
height: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? parent.height : destination.height + 2 * lengthPadding
|
||||||
|
Loading…
Reference in New Issue
Block a user