2019-12-19 22:46:16 +11:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-07-14 10:15:20 +10:00
|
|
|
import QtQuick 2.12
|
2020-03-14 02:35:05 +11:00
|
|
|
import QtQuick.Layouts 1.12
|
2019-07-14 10:15:20 +10:00
|
|
|
|
2020-03-14 02:35:05 +11:00
|
|
|
HColumnLayout {
|
2019-07-16 19:29:47 +10:00
|
|
|
spacing: theme.spacing / 2
|
2019-07-14 10:15:20 +10:00
|
|
|
|
|
|
|
|
2020-03-14 02:35:05 +11:00
|
|
|
property alias label: label
|
|
|
|
property alias field: field
|
|
|
|
property alias toolTip: toolTip
|
|
|
|
|
|
|
|
|
|
|
|
HRowLayout {
|
|
|
|
HLabel {
|
|
|
|
id: label
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
|
|
|
|
HIcon {
|
|
|
|
svgName: "field-tooltip-available"
|
|
|
|
visible: toolTip.text
|
|
|
|
|
|
|
|
Binding on colorize {
|
|
|
|
value: theme.colors.accentElement
|
|
|
|
when: hoverHandler.hovered || toolTip.visible
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
HoverHandler {
|
|
|
|
id: hoverHandler
|
|
|
|
enabled: toolTip.text
|
|
|
|
}
|
|
|
|
|
|
|
|
TapHandler {
|
|
|
|
onTapped: toolTip.instantShow()
|
|
|
|
enabled: toolTip.text
|
|
|
|
}
|
|
|
|
|
|
|
|
HToolTip {
|
|
|
|
id: toolTip
|
|
|
|
visible: toolTip.text && hoverHandler.hovered
|
|
|
|
}
|
2019-07-14 10:15:20 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
HTextField {
|
2020-03-14 02:35:05 +11:00
|
|
|
id: field
|
2019-07-14 10:15:20 +10:00
|
|
|
radius: 2
|
2020-03-14 02:35:05 +11:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
2019-07-14 10:15:20 +10:00
|
|
|
}
|
|
|
|
}
|