From 350dd5db3c01d686fe1e44236d61484fc22e4191 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 10 May 2019 11:32:40 +0200 Subject: [PATCH] Correct positioning of tooltip for g-code text area --- resources/qml/PrinterOutput/ManualPrinterControl.qml | 11 +++++++---- resources/qml/Settings/SettingView.qml | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/resources/qml/PrinterOutput/ManualPrinterControl.qml b/resources/qml/PrinterOutput/ManualPrinterControl.qml index 106ae7db03..8870fc6169 100644 --- a/resources/qml/PrinterOutput/ManualPrinterControl.qml +++ b/resources/qml/PrinterOutput/ManualPrinterControl.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2019 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 @@ -357,13 +357,16 @@ Item onHoveredChanged: { - if (containsMouse) { + if (containsMouse) + { base.showTooltip( base, - { x: 0, y: customCommandControlMouseArea.mapToItem(base, 0, 0).y }, + { x: -tooltip.width, y: customCommandControlMouseArea.mapToItem(base, 0, 0).y }, catalog.i18nc("@tooltip of G-code command input", "Send a custom G-code command to the connected printer. Press 'enter' to send the command.") ) - } else { + } + else + { base.hideTooltip() } } diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 972cbcdbb1..b0e225fd8e 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2019 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 @@ -371,7 +371,7 @@ Item contextMenu.provider = provider contextMenu.popup(); } - onShowTooltip: base.showTooltip(delegate, Qt.point(- settingsView.x - UM.Theme.getSize("default_margin").width, 0), text) + onShowTooltip: base.showTooltip(delegate, Qt.point(-settingsView.x - UM.Theme.getSize("default_margin").width, 0), text) onHideTooltip: base.hideTooltip() onShowAllHiddenInheritedSettings: {