diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml index 5a1ff16b95..47c80a9ce6 100644 --- a/resources/qml/Widgets/ComboBox.qml +++ b/resources/qml/Widgets/ComboBox.qml @@ -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 : "" } } }