HToolTip: fix binding loop

This commit is contained in:
miruka 2019-09-11 16:47:13 -04:00
parent 0e6b6c830d
commit 2e3d21aa31

View File

@ -1,15 +1,11 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
ToolTip {
id: toolTip
delay: theme.controls.toolTip.delay
padding: background.border.width
contentWidth: Math.min(
mainUI.width / 1.25,
// contentItem.implicitWidth,
theme.fontSize.normal * 0.5 * 75,
)
property alias label: label
@ -22,17 +18,22 @@ ToolTip {
border.width: theme.controls.toolTip.borderWidth
}
contentItem: HLabel {
id: label
color: theme.controls.toolTip.text
text: toolTip.text
wrapMode: Text.Wrap
property var pr: width
contentItem: HRowLayout {
HLabel {
id: label
color: theme.controls.toolTip.text
text: toolTip.text
wrapMode: Text.Wrap
leftPadding: theme.spacing / 1.5
rightPadding: leftPadding
topPadding: theme.spacing / 2
bottomPadding: topPadding
leftPadding: theme.spacing / 1.5
rightPadding: leftPadding
topPadding: theme.spacing / 2
bottomPadding: topPadding
Layout.maximumWidth: Math.min(
mainUI.width / 1.25, theme.fontSize.normal * 0.5 * 75,
)
}
}
enter: Transition {