mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-22 12:39:22 +08:00
Scale height of slider hover area with screenScaleFactor
This way it scales along with the high-resolution screen scaling for high-DPI screens.
This commit is contained in:
parent
1a6a39da93
commit
1488f965b7
@ -247,17 +247,19 @@ Item
|
|||||||
{
|
{
|
||||||
function showTooltip (showTooltip)
|
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")
|
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)
|
base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("sidebar_margin").width, customisedSettings.height), content)
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
base.hideTooltip()
|
base.hideTooltip()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
id: unavailableLineToolTip
|
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
|
z: parent.z + 1 // should be higher, otherwise the area can be hovered
|
||||||
x: 0
|
x: 0
|
||||||
anchors.verticalCenter: qualitySlider.verticalCenter
|
anchors.verticalCenter: qualitySlider.verticalCenter
|
||||||
@ -267,7 +269,8 @@ Item
|
|||||||
id: leftArea
|
id: leftArea
|
||||||
width:
|
width:
|
||||||
{
|
{
|
||||||
if (qualityModel.availableTotalTicks == 0) {
|
if (qualityModel.availableTotalTicks == 0)
|
||||||
|
{
|
||||||
return qualityModel.qualitySliderStepWidth * qualityModel.totalTicks
|
return qualityModel.qualitySliderStepWidth * qualityModel.totalTicks
|
||||||
}
|
}
|
||||||
return qualityModel.qualitySliderStepWidth * qualityModel.qualitySliderAvailableMin - 10
|
return qualityModel.qualitySliderStepWidth * qualityModel.qualitySliderAvailableMin - 10
|
||||||
|
Loading…
x
Reference in New Issue
Block a user