2024-01-22 14:41:47 -05:00
|
|
|
import QtCore
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Controls.Basic
|
2024-06-24 18:49:23 -04:00
|
|
|
import QtQuick.Layouts
|
2024-01-22 14:41:47 -05:00
|
|
|
|
2024-06-24 18:49:23 -04:00
|
|
|
ColumnLayout {
|
|
|
|
id: root
|
|
|
|
property alias text: mainTextLabel.text
|
|
|
|
property alias helpText: helpTextLabel.text
|
|
|
|
|
|
|
|
property alias textFormat: mainTextLabel.textFormat
|
|
|
|
property alias wrapMode: mainTextLabel.wrapMode
|
|
|
|
property alias font: mainTextLabel.font
|
|
|
|
property alias horizontalAlignment: mainTextLabel.horizontalAlignment
|
|
|
|
signal linkActivated(link : url);
|
|
|
|
property alias color: mainTextLabel.color
|
|
|
|
property alias linkColor: mainTextLabel.linkColor
|
|
|
|
|
|
|
|
Label {
|
|
|
|
id: mainTextLabel
|
|
|
|
color: theme.settingsTitleTextColor
|
2024-06-28 12:57:57 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarger
|
2024-06-24 18:49:23 -04:00
|
|
|
font.bold: true
|
|
|
|
onLinkActivated: function(link) {
|
|
|
|
root.linkActivated(link);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
id: helpTextLabel
|
2024-06-28 12:57:57 -04:00
|
|
|
visible: text !== ""
|
2024-06-24 18:49:23 -04:00
|
|
|
Layout.fillWidth: true
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
color: theme.settingsTitleTextColor
|
2024-06-28 12:57:57 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2024-06-24 18:49:23 -04:00
|
|
|
font.bold: false
|
2024-06-28 12:57:57 -04:00
|
|
|
|
2024-06-24 18:49:23 -04:00
|
|
|
onLinkActivated: function(link) {
|
|
|
|
root.linkActivated(link);
|
|
|
|
}
|
2024-06-27 11:08:32 -04:00
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
acceptedButtons: Qt.NoButton // pass clicks to parent
|
|
|
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
|
|
|
}
|
2024-06-24 18:49:23 -04:00
|
|
|
}
|
2024-01-22 14:41:47 -05:00
|
|
|
}
|