Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2020-11-17 12:52:25 +0300
committerGhostkeeper <rubend@tutanota.com>2020-11-17 12:52:25 +0300
commit29258aa5e2754b72852f9769de62502e5892b110 (patch)
tree4b99e047f253b1c8be3bfebb75a59e2acc280999 /resources
parent5e383d4f424580c3e38bf7212e20d86f4ab1c34d (diff)
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.
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/Widgets/ComboBox.qml12
1 files changed, 9 insertions, 3 deletions
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 : ""
}
}
}