dock: fix hover region and weird popup cutoff

This commit is contained in:
end-4 2025-07-16 10:23:21 +07:00
parent 623cd842a6
commit d176d38552

View file

@ -30,6 +30,8 @@ Scope { // Scope
anchors { anchors {
bottom: true bottom: true
left: true
right: true
} }
exclusiveZone: root.pinned ? implicitHeight exclusiveZone: root.pinned ? implicitHeight
@ -48,14 +50,15 @@ Scope { // Scope
MouseArea { MouseArea {
id: dockMouseArea id: dockMouseArea
anchors.top: parent.top
height: parent.height height: parent.height
anchors.topMargin: dockRoot.reveal ? 0 : anchors {
Config.options?.dock.hoverToReveal ? (dockRoot.implicitHeight - Config.options.dock.hoverRegionHeight) : top: parent.top
(dockRoot.implicitHeight + 1) topMargin: dockRoot.reveal ? 0 :
Config.options?.dock.hoverToReveal ? (dockRoot.implicitHeight - Config.options.dock.hoverRegionHeight) :
anchors.left: parent.left (dockRoot.implicitHeight + 1)
anchors.right: parent.right horizontalCenter: parent.horizontalCenter
}
implicitWidth: dockHoverRegion.implicitWidth + Appearance.sizes.elevationMargin * 2
hoverEnabled: true hoverEnabled: true
Behavior on anchors.topMargin { Behavior on anchors.topMargin {
@ -65,6 +68,7 @@ Scope { // Scope
Item { Item {
id: dockHoverRegion id: dockHoverRegion
anchors.fill: parent anchors.fill: parent
implicitWidth: dockBackground.implicitWidth
Item { // Wrapper for the dock background Item { // Wrapper for the dock background
id: dockBackground id: dockBackground