From 923b375f8b85bad0678e400ee206a0545593f84c Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Fri, 3 Apr 2015 17:58:07 +0200 Subject: [PATCH] Make sure the description tooltip is not cutoff at the bottom of the window --- qml/SidebarTooltip.qml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qml/SidebarTooltip.qml b/qml/SidebarTooltip.qml index 04d92609c1..643e6b75e0 100644 --- a/qml/SidebarTooltip.qml +++ b/qml/SidebarTooltip.qml @@ -18,8 +18,13 @@ Rectangle { property alias text: label.text; function show(position) { - x = position.x; - y = position.y; + if(position.y + base.height > parent.height) { + x = position.x; + y = parent.height - base.height; + } else { + x = position.x; + y = position.y; + } base.opacity = 1; } @@ -37,8 +42,7 @@ Rectangle { right: parent.right; rightMargin: UM.Theme.sizes.tooltip_margins.width; } - -// horizontalAlignment: Qt.AlignJustify; wrapMode: Text.Wrap; + font: UM.Theme.fonts.default; } }