summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-01-01 16:38:52 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-01-01 16:38:52 +0100
commit1dc53a301fcc1d3b1a82136de3dac1258ad70823 (patch)
tree4dadfe157cfe24dabfff364fae32433b9f01f73e
parentSpeed up blurhashes (diff)
downloadnheko-1dc53a301fcc1d3b1a82136de3dac1258ad70823.tar.xz
Fix hovering aliases that only have text
-rw-r--r--resources/qml/Avatar.qml27
1 files changed, 10 insertions, 17 deletions
diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml

index a9ffa1cf..edde1556 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml
@@ -4,8 +4,8 @@ // SPDX-License-Identifier: GPL-3.0-or-later import "./ui" -import QtQuick 2.6 -import QtQuick.Controls 2.3 +import QtQuick 2.15 +import QtQuick.Controls 2.15 import QtQuick.Window 2.15 import im.nheko 1.0 @@ -25,13 +25,12 @@ Rectangle { height: 48 radius: Settings.avatarCircles ? height / 2 : height / 8 color: Nheko.colors.alternateBase - Component.onCompleted: { - mouseArea.clicked.connect(clicked); - } Label { id: label + enabled: false + anchors.fill: parent text: TimelineManager.escapeEmoji(displayName ? String.fromCodePoint(displayName.codePointAt(0)) : "") textFormat: Text.RichText @@ -73,18 +72,6 @@ Rectangle { sourceSize.height: avatar.height * Screen.devicePixelRatio source: avatar.url ? (avatar.url + "?radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale")) : "" - MouseArea { - id: mouseArea - - anchors.fill: parent - - Ripple { - rippleTarget: mouseArea - color: Qt.rgba(Nheko.colors.alternateBase.r, Nheko.colors.alternateBase.g, Nheko.colors.alternateBase.b, 0.5) - } - - } - } Rectangle { @@ -125,4 +112,10 @@ Rectangle { cursorShape: Qt.PointingHandCursor } + TapHandler { + id: mouseArea + + onSingleTapped: avatar.clicked(eventPoint) + } + }