mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 07:09:02 +08:00
Don't show tooltip if it shows the same text as the button
It's only useful if the text on the button gets elided.
This commit is contained in:
parent
a39ac2ca22
commit
0190247c5a
@ -67,6 +67,15 @@ Button
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
TextMetrics
|
||||
{
|
||||
id: buttonTextMetrics
|
||||
text: buttonText.text
|
||||
font: buttonText.font
|
||||
elide: buttonText.elide
|
||||
elideWidth: buttonText.width
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: buttonText
|
||||
@ -124,7 +133,7 @@ Button
|
||||
Cura.ToolTip
|
||||
{
|
||||
id: tooltip
|
||||
visible: button.hovered
|
||||
visible: button.hovered && buttonTextMetrics.elidedText != buttonText.text
|
||||
}
|
||||
|
||||
BusyIndicator
|
||||
|
Loading…
x
Reference in New Issue
Block a user