mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-05 23:04:30 +08:00
Add extensible switch case for tooltip
This way it's - more clear what the two cases are - and more robust if we ever add a third. Contributes to issue CURA-8562.
This commit is contained in:
parent
35ba8f78a0
commit
bddcf3cb0c
@ -90,7 +90,15 @@ Rectangle
|
||||
|
||||
Cura.ToolTip
|
||||
{
|
||||
tooltipText: packageData.packageType == "plugin" ? catalog.i18nc("@info", "Ultimaker Verified Plugin") : catalog.i18nc("@info", "Ultimaker Certified Material")
|
||||
tooltipText:
|
||||
{
|
||||
switch(packageData.packageType)
|
||||
{
|
||||
case "plugin": return catalog.i18nc("@info", "Ultimaker Verified Plug-in");
|
||||
case "material": return catalog.i18nc("@info", "Ultimaker Certified Material");
|
||||
default: return catalog.i18nc("@info", "Ultimaker Verified Package");
|
||||
}
|
||||
}
|
||||
visible: parent.hovered
|
||||
targetPoint: Qt.point(0, Math.round(parent.y + parent.height / 2))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user