[#1945] Fixed ToolTip position when there is no space

Closes #1945
This commit is contained in:
Alexandra Betouni 2021-07-19 13:05:12 +03:00 committed by Iuri Matias
parent 8a4eeb14c0
commit 81fe8976dd

View File

@ -14,6 +14,7 @@ ToolTip {
topPadding: Style.current.smallPadding
bottomPadding: Style.current.smallPadding
delay: 200
background: Item {
id: tooltipBg
Rectangle {
@ -41,7 +42,7 @@ ToolTip {
}
}
y: {
if (orientation === "bottom") {
if ((orientation === "bottom") || (tooltip.y > 0)) {
return -height / 2 + 5
}
if (orientation === "top") {
@ -64,4 +65,3 @@ ToolTip {
bottomPadding: Style.current.smallPadding
}
}