Move HoverLinkIndicator to separate file

This commit is contained in:
Tobias Fella
2024-04-30 23:00:33 +02:00
parent 65aa8919b9
commit 4dae3c34b4
3 changed files with 37 additions and 18 deletions

View File

@@ -0,0 +1,30 @@
// SPDX-FileCopyrightText: 2024 Tobias Fella <tobias.fella@kde.org>
// SPDX-FileCopyrightText: 2024 Carl Schwan <carl@carlschwan.eu>
// SPDX-License-Identifier: LGPL-2.0-or-later
import QtQuick
import QtQuick.Controls as QQC2
import org.kde.kirigami as Kirigami
QQC2.Control {
id: root
property string text
visible: !root.text.startsWith("https://matrix.to/") && root.text.length > 0
Kirigami.Theme.colorSet: Kirigami.Theme.View
z: 20
Accessible.ignored: true
contentItem: QQC2.Label {
text: root.text.startsWith("https://matrix.to/") ? "" : root.text
Accessible.description: i18nc("@info screenreader", "The currently selected link")
}
background: Rectangle {
color: Kirigami.Theme.backgroundColor
}
}