diff --git a/resources/qml/TopBar.qml b/resources/qml/TopBar.qml index ee401370..b9d1f85f 100644 --- a/resources/qml/TopBar.qml +++ b/resources/qml/TopBar.qml @@ -30,7 +30,7 @@ Rectangle { TapHandler { onSingleTapped: { - if (eventPoint.position.y > topBar.height - pinnedMessages.height) { + if (eventPoint.position.y > topBar.height - (pinnedMessages.visible ? pinnedMessages.height : 0)) { eventPoint.accepted = true return; } @@ -63,12 +63,6 @@ Rectangle { grabPermissions: PointerHandler.TakeOverForbidden | PointerHandler.CanTakeOverFromAnything } - CursorShape { - anchors.fill: parent - anchors.bottomMargin: pinnedMessages.height - cursorShape: Qt.PointingHandCursor - } - GridLayout { id: topLayout @@ -307,4 +301,10 @@ Rectangle { } } } + + CursorShape { + anchors.fill: parent + anchors.bottomMargin: pinnedMessages.visible ? pinnedMessages.height : 0 + cursorShape: Qt.PointingHandCursor + } }