From 68500ed1d0a36f1f2c7f9582f740daeef5d13b08 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 27 May 2015 15:37:32 +0200 Subject: [PATCH] Position the setting tooltip to the left of the settings instead of below This makes the tooltip not cover the settings. Fixes Asana issue 39 --- resources/qml/Sidebar.qml | 4 ++-- resources/qml/SidebarTooltip.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 0d4d0df599..e803406369 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -16,10 +16,10 @@ UM.AngledCornerRectangle { property alias saveAction: saveButton.saveAction; cornerSize: UM.Theme.sizes.default_margin.width; - + function showTooltip(item, position, text) { tooltip.text = text; - position = item.mapToItem(base, position.x, position.y); + position = item.mapToItem(base, position.x, position.y / 2); tooltip.show(position); } diff --git a/resources/qml/SidebarTooltip.qml b/resources/qml/SidebarTooltip.qml index 9003faf995..6e0ba74404 100644 --- a/resources/qml/SidebarTooltip.qml +++ b/resources/qml/SidebarTooltip.qml @@ -22,10 +22,10 @@ Rectangle { function show(position) { if(position.y + base.height > parent.height) { - x = position.x; + x = position.x - base.width; y = parent.height - base.height; } else { - x = position.x; + x = position.x - base.width; y = position.y; } base.opacity = 1;