mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix tooltip not shown when the tooltip text is too long
When the tooltip text is too long and the tooltip width ends up being longer than the window it is supposed to be drawn into, the tooltip is not drawn at all. This commit fixed that by allowing the tooltip width of the ActionButton to be changed within QML, limiting it to a certain size that fits the purpose. CURA-8112
This commit is contained in:
parent
2d45b8c2cd
commit
f643f19af6
2 changed files with 2 additions and 0 deletions
|
@ -67,6 +67,7 @@ Item
|
||||||
text: "Upgrade plan"
|
text: "Upgrade plan"
|
||||||
visible: createNewProjectButtonVisible && !manager.userAccountCanCreateNewLibraryProject && (manager.retrievingProjectsStatus == DF.RetrievalStatus.Success || manager.retrievingProjectsStatus == DF.RetrievalStatus.Failed)
|
visible: createNewProjectButtonVisible && !manager.userAccountCanCreateNewLibraryProject && (manager.retrievingProjectsStatus == DF.RetrievalStatus.Success || manager.retrievingProjectsStatus == DF.RetrievalStatus.Failed)
|
||||||
tooltip: "You have reached the maximum number of projects allowed by your subscription. Please upgrade to the Professional subscription to create more projects."
|
tooltip: "You have reached the maximum number of projects allowed by your subscription. Please upgrade to the Professional subscription to create more projects."
|
||||||
|
tooltipWidth: parent.width * 3 / 4
|
||||||
|
|
||||||
onClicked: Qt.openUrlExternally("https://ultimaker.com/software/enterprise-software")
|
onClicked: Qt.openUrlExternally("https://ultimaker.com/software/enterprise-software")
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ Button
|
||||||
property alias textFont: buttonText.font
|
property alias textFont: buttonText.font
|
||||||
property alias cornerRadius: backgroundRect.radius
|
property alias cornerRadius: backgroundRect.radius
|
||||||
property alias tooltip: tooltip.tooltipText
|
property alias tooltip: tooltip.tooltipText
|
||||||
|
property alias tooltipWidth: tooltip.width
|
||||||
|
|
||||||
property color color: UM.Theme.getColor("primary")
|
property color color: UM.Theme.getColor("primary")
|
||||||
property color hoverColor: UM.Theme.getColor("primary_hover")
|
property color hoverColor: UM.Theme.getColor("primary_hover")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue