Make sure the description tooltip is not cutoff at the bottom of the window

This commit is contained in:
Arjen Hiemstra 2015-04-03 17:58:07 +02:00
parent 502133a006
commit 923b375f8b

View File

@ -18,8 +18,13 @@ Rectangle {
property alias text: label.text; property alias text: label.text;
function show(position) { function show(position) {
if(position.y + base.height > parent.height) {
x = position.x;
y = parent.height - base.height;
} else {
x = position.x; x = position.x;
y = position.y; y = position.y;
}
base.opacity = 1; base.opacity = 1;
} }
@ -37,8 +42,7 @@ Rectangle {
right: parent.right; right: parent.right;
rightMargin: UM.Theme.sizes.tooltip_margins.width; rightMargin: UM.Theme.sizes.tooltip_margins.width;
} }
// horizontalAlignment: Qt.AlignJustify;
wrapMode: Text.Wrap; wrapMode: Text.Wrap;
font: UM.Theme.fonts.default;
} }
} }