mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06: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
1 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
{
|
||||
color: parent.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent"
|
||||
border.color: parent.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent"
|
||||
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…
Add table
Add a link
Reference in a new issue