From 1488f965b730bcdd679d966011a92f76298c4939 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 13 Apr 2018 11:43:43 +0200 Subject: [PATCH] Scale height of slider hover area with screenScaleFactor This way it scales along with the high-resolution screen scaling for high-DPI screens. --- resources/qml/SidebarSimple.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index c32b8ba957..cbf2ac227a 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -247,17 +247,19 @@ Item { function showTooltip (showTooltip) { - if (showTooltip) { + if (showTooltip) + { var content = catalog.i18nc("@tooltip", "This quality profile is not available for you current material and nozzle configuration. Please change these to enable this quality profile") base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("sidebar_margin").width, customisedSettings.height), content) } - else { + else + { base.hideTooltip() } } id: unavailableLineToolTip - height: 20 // hovered area height + height: 20 * screenScaleFactor // hovered area height z: parent.z + 1 // should be higher, otherwise the area can be hovered x: 0 anchors.verticalCenter: qualitySlider.verticalCenter @@ -267,7 +269,8 @@ Item id: leftArea width: { - if (qualityModel.availableTotalTicks == 0) { + if (qualityModel.availableTotalTicks == 0) + { return qualityModel.qualitySliderStepWidth * qualityModel.totalTicks } return qualityModel.qualitySliderStepWidth * qualityModel.qualitySliderAvailableMin - 10