Prevent last line of popup to be cut off

We didn't take the y offset into account

CURA-9112
This commit is contained in:
Jaime van Kessel 2022-04-28 13:23:41 +02:00
parent a2d721b6ac
commit 2ecec1fa37
2 changed files with 9 additions and 3 deletions

View file

@ -63,7 +63,7 @@ UM.PointingRectangle
{ {
id: textScroll id: textScroll
width: parent.width width: parent.width
height: Math.min(label.height, base.parent.height) height: Math.min(label.height + UM.Theme.getSize("tooltip_margins").height, base.parent.height)
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AsNeeded ScrollBar.vertical.policy: ScrollBar.AsNeeded

View file

@ -62,13 +62,19 @@ Item
var affected_by_list = "" var affected_by_list = ""
for (var i in affected_by) for (var i in affected_by)
{ {
affected_by_list += "<li>%1</li>\n".arg(affected_by[i].label) if(affected_by[i].label != "")
{
affected_by_list += "<li>%1</li>\n".arg(affected_by[i].label)
}
} }
var affects_list = "" var affects_list = ""
for (var i in affects) for (var i in affects)
{ {
affects_list += "<li>%1</li>\n".arg(affects[i].label) if(affects[i].label != "")
{
affects_list += "<li>%1</li>\n".arg(affects[i].label)
}
} }
var tooltip = "<b>%1</b>\n<p>%2</p>".arg(definition.label).arg(definition.description) var tooltip = "<b>%1</b>\n<p>%2</p>".arg(definition.label).arg(definition.description)