mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 00:28:59 +08:00
Show tooltip if text got elided
This way you can still see the whole text, even if the cell is too small. Handy. Contributes to issue CURA-8686.
This commit is contained in:
parent
f22fea5f22
commit
e607ae7b92
@ -132,14 +132,25 @@ Item
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
MouseArea
|
||||
TextMetrics
|
||||
{
|
||||
id: cellTextMetrics
|
||||
text: cellContent.text
|
||||
font: cellContent.font
|
||||
elide: cellContent.elide
|
||||
elideWidth: cellContent.width
|
||||
}
|
||||
UM.TooltipArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
||||
enabled: tableBase.allowSelection
|
||||
text: (cellTextMetrics.elidedText == cellContent.text) ? "" : cellContent.text //Show full text in tooltip if it was elided.
|
||||
onClicked:
|
||||
{
|
||||
tableBase.currentRow = row; //Select this row.
|
||||
if(tableBase.allowSelection)
|
||||
{
|
||||
tableBase.currentRow = row; //Select this row.
|
||||
}
|
||||
}
|
||||
onDoubleClicked:
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user