From 09a5cf1de2cca9d004dd09b8b79e5972ee5f26f6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 23 Aug 2017 17:53:00 +0200 Subject: [PATCH] Shift sidebar tooltips with the arrow outside of sidebar Because now the arrow has the same colour as the sidebar so you won't see it otherwise. Contributes to issue CURA-4148. --- resources/qml/Settings/SettingView.qml | 2 +- resources/qml/Sidebar.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 183ea5e7c3..b6b79ed3d4 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -297,7 +297,7 @@ Item contextMenu.provider = provider contextMenu.popup(); } - onShowTooltip: base.showTooltip(delegate, { x: 0, y: delegate.height / 2 }, text) + onShowTooltip: base.showTooltip(delegate, { x: -UM.Theme.getSize("default_arrow").width, y: delegate.height / 2 }, text) onHideTooltip: base.hideTooltip() onShowAllHiddenInheritedSettings: { diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index d1917f23ce..3d2b7e39dc 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -43,14 +43,14 @@ Rectangle onTriggered: { - base.showTooltip(base, {x:1, y:item.y}, text); + base.showTooltip(base, {x: 0, y: item.y}, text); } } function showTooltip(item, position, text) { tooltip.text = text; - position = item.mapToItem(base, position.x, position.y); + position = item.mapToItem(base, position.x - UM.Theme.getSize("default_arrow").width, position.y); tooltip.show(position); }