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.
This commit is contained in:
Ghostkeeper 2017-08-23 17:53:00 +02:00
parent fde4f44a1e
commit 09a5cf1de2
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75
2 changed files with 3 additions and 3 deletions

View file

@ -297,7 +297,7 @@ Item
contextMenu.provider = provider contextMenu.provider = provider
contextMenu.popup(); 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() onHideTooltip: base.hideTooltip()
onShowAllHiddenInheritedSettings: onShowAllHiddenInheritedSettings:
{ {

View file

@ -43,14 +43,14 @@ Rectangle
onTriggered: onTriggered:
{ {
base.showTooltip(base, {x:1, y:item.y}, text); base.showTooltip(base, {x: 0, y: item.y}, text);
} }
} }
function showTooltip(item, position, text) function showTooltip(item, position, text)
{ {
tooltip.text = 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); tooltip.show(position);
} }