Improve positioning of tooltips in advanced mode

This commit is contained in:
Arjen Hiemstra 2016-05-11 17:03:54 +02:00
parent b7fd97737c
commit d68f274a09
3 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ Rectangle
function showTooltip(item, position, text)
{
tooltip.text = text;
position = item.mapToItem(base, position.x, position.y / 2);
position = item.mapToItem(base, position.x, position.y);
tooltip.show(position);
}

View File

@ -120,7 +120,7 @@ Item
}
}
onEntered: {
base.showTooltip(infillCellRight, Qt.point(-infillCellRight.x, parent.height), model.text);
base.showTooltip(infillCellRight, Qt.point(-infillCellRight.x, 0), model.text);
}
onExited: {
base.hideTooltip();
@ -224,7 +224,7 @@ Item
onEntered:
{
parent.hovered_ex = true
base.showTooltip(brimCheckBox, Qt.point(-helpersCellRight.x, parent.height),
base.showTooltip(brimCheckBox, Qt.point(-helpersCellRight.x, 0),
catalog.i18nc("@label", "Enable printing a brim. This will add a single-layer-thick flat area around your object which is easy to cut off afterwards."));
}
onExited:
@ -257,7 +257,7 @@ Item
onEntered:
{
parent.hovered_ex = true
base.showTooltip(supportCheckBox, Qt.point(-helpersCellRight.x, parent.height),
base.showTooltip(supportCheckBox, Qt.point(-helpersCellRight.x, 0),
catalog.i18nc("@label", "Enable printing support structures. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air."));
}
onExited:

View File

@ -31,7 +31,7 @@ UM.PointingRectangle {
y = position.y - UM.Theme.getSize("tooltip_arrow_margins").height;
}
base.opacity = 1;
target = Qt.point(40 , position.y)
target = Qt.point(40 , position.y + UM.Theme.getSize("tooltip_arrow_margins").height / 2)
}
function hide() {