drawers: fix interaction areas

Outer corners shouldn't be part of interaction area
This commit is contained in:
2 * r + 2 * t 2025-06-05 18:41:45 +10:00
parent d37b3926c8
commit 023d00d658
14 changed files with 21 additions and 24 deletions

View file

@ -34,7 +34,7 @@ ShapePath {
}
PathLine {
relativeX: 0
relativeY: root.wrapper.height - root.rounding * 4
relativeY: root.wrapper.height - root.rounding * 2
}
PathArc {
relativeX: root.invertBottomRounding ? root.roundingX : -root.roundingX

View file

@ -11,7 +11,7 @@ Item {
visible: width > 0 && height > 0
implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight + BorderConfig.rounding * 2
implicitHeight: content.implicitHeight
Content {
id: content

View file

@ -35,7 +35,7 @@ ShapePath {
}
PathLine {
relativeX: root.wrapper.width - root.rounding * 4
relativeX: root.wrapper.width - root.rounding * 2
relativeY: 0
}
@ -65,7 +65,5 @@ ShapePath {
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.anim.curves.standard
}
}
}

View file

@ -9,7 +9,7 @@ Item {
visible: height > 0
implicitHeight: 0
implicitWidth: content.implicitWidth + BorderConfig.rounding * 2
implicitWidth: content.implicitWidth
states: State {
name: "visible"

View file

@ -22,7 +22,7 @@ Shape {
wrapper: panels.osd
startX: root.width - panels.session.width
startY: (root.height - wrapper.height) / 2
startY: (root.height - wrapper.height) / 2 - rounding
}
Notifications.Background {
@ -36,20 +36,20 @@ Shape {
wrapper: panels.session
startX: root.width
startY: (root.height - wrapper.height) / 2
startY: (root.height - wrapper.height) / 2 - rounding
}
Launcher.Background {
wrapper: panels.launcher
startX: (root.width - wrapper.width) / 2
startX: (root.width - wrapper.width) / 2 - rounding
startY: root.height
}
Dashboard.Background {
wrapper: panels.dashboard
startX: (root.width - wrapper.width) / 2
startX: (root.width - wrapper.width) / 2 - rounding
startY: 0
}
@ -58,6 +58,6 @@ Shape {
invertBottomRounding: wrapper.y + wrapper.height - BorderConfig.rounding >= root.height
startX: 0
startY: wrapper.y
startY: wrapper.y - rounding
}
}

View file

@ -16,7 +16,7 @@ MouseArea {
function withinPanelHeight(panel: Item, x: real, y: real): bool {
const panelY = BorderConfig.thickness + panel.y;
return y >= panelY && y <= panelY + panel.height;
return y >= panelY - BorderConfig.rounding && y <= panelY + panel.height + BorderConfig.rounding;
}
function inRightPanel(panel: Item, x: real, y: real): bool {
@ -25,7 +25,7 @@ MouseArea {
function inTopPanel(panel: Item, x: real, y: real): bool {
const panelX = BorderConfig.thickness + panel.x;
return y < BorderConfig.thickness + panel.y + panel.height && x >= panelX && x <= panelX + panel.width;
return y < BorderConfig.thickness + panel.y + panel.height && x >= panelX - BorderConfig.rounding && x <= panelX + panel.width + BorderConfig.rounding;
}
anchors.fill: parent
@ -57,8 +57,7 @@ MouseArea {
}
// Show dashboard on hover
const showDashboard = root.inTopPanel(panels.dashboard, x, y);
visibilities.dashboard = showDashboard;
visibilities.dashboard = inTopPanel(panels.dashboard, x, y);
// Show popouts on hover
const popout = panels.popouts;

View file

@ -32,7 +32,7 @@ ShapePath {
radiusY: Math.min(root.rounding, root.wrapper.height)
}
PathLine {
relativeX: root.wrapper.width - root.rounding * 4
relativeX: root.wrapper.width - root.rounding * 2
relativeY: 0
}
PathArc {

View file

@ -9,7 +9,7 @@ Item {
visible: height > 0
implicitHeight: 0
implicitWidth: content.implicitWidth + BorderConfig.rounding * 2
implicitWidth: content.implicitWidth
states: State {
name: "visible"

View file

@ -17,7 +17,7 @@ ShapePath {
fillColor: BorderConfig.colour
PathLine {
relativeX: -root.wrapper.width
relativeX: -(root.wrapper.width + root.rounding)
relativeY: 0
}
PathArc {
@ -38,7 +38,7 @@ ShapePath {
direction: root.fullHeightRounding < 0 ? PathArc.Clockwise : PathArc.Counterclockwise
}
PathLine {
relativeX: root.wrapper.height > 0 ? root.wrapper.width - root.rounding * 2 - root.fullHeightRounding : root.wrapper.width
relativeX: root.wrapper.height > 0 ? root.wrapper.width - root.rounding - root.fullHeightRounding : root.wrapper.width
relativeY: 0
}
PathArc {

View file

@ -6,7 +6,7 @@ Item {
visible: height > 0
implicitHeight: content.implicitHeight
implicitWidth: content.implicitWidth + BorderConfig.rounding
implicitWidth: content.implicitWidth
Content {
id: content

View file

@ -33,7 +33,7 @@ ShapePath {
}
PathLine {
relativeX: 0
relativeY: root.wrapper.height - root.rounding * 4
relativeY: root.wrapper.height - root.rounding * 2
}
PathArc {
relativeX: root.roundingX

View file

@ -11,7 +11,7 @@ Item {
visible: width > 0
implicitWidth: 0
implicitHeight: content.implicitHeight + BorderConfig.rounding * 2
implicitHeight: content.implicitHeight
states: State {
name: "visible"

View file

@ -33,7 +33,7 @@ ShapePath {
}
PathLine {
relativeX: 0
relativeY: root.wrapper.height - root.rounding * 4
relativeY: root.wrapper.height - root.rounding * 2
}
PathArc {
relativeX: root.roundingX

View file

@ -10,7 +10,7 @@ Item {
visible: width > 0
implicitWidth: 0
implicitHeight: content.implicitHeight + BorderConfig.rounding * 2
implicitHeight: content.implicitHeight
states: State {
name: "visible"