mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-28 23:04:34 +08:00
Always display tooltip on combobox items if text gets elided
So if the text is too long to display, there is still a way to display it.
This commit is contained in:
parent
5e383d4f42
commit
29258aa5e2
@ -124,6 +124,7 @@ ComboBox
|
||||
|
||||
contentItem: Label
|
||||
{
|
||||
id: delegateLabel
|
||||
// FIXME: Somehow the top/bottom anchoring is not correct on Linux and it results in invisible texts.
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
@ -138,10 +139,15 @@ ComboBox
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
background: UM.TooltipArea
|
||||
{
|
||||
Rectangle
|
||||
{
|
||||
color: parent.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent"
|
||||
border.color: parent.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent"
|
||||
anchors.fill: parent
|
||||
}
|
||||
text: delegateLabel.truncated ? delegateItem.text : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user