mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06: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
1 changed files with 9 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue