mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 18:25:54 +08:00
Hide Read More button if not truncated
There would be nothing to read. Contributes to issue CURA-8561.
This commit is contained in:
parent
c8741898bf
commit
57093f0ef6
@ -120,9 +120,9 @@ Rectangle
|
|||||||
|
|
||||||
onLineLaidOut:
|
onLineLaidOut:
|
||||||
{
|
{
|
||||||
if(line.isLast)
|
if(truncated && line.isLast)
|
||||||
{
|
{
|
||||||
line.width = Math.min(line.width, parent.width - readMoreButton.width)
|
line.width = Math.min(line.width, parent.width - readMoreButton.width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -134,6 +134,8 @@ Rectangle
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
height: authorBy.height //Height of a single line.
|
height: authorBy.height //Height of a single line.
|
||||||
|
|
||||||
|
visible: descriptionLabel.truncated
|
||||||
|
enabled: visible
|
||||||
leftPadding: UM.Theme.getSize("default_margin").width
|
leftPadding: UM.Theme.getSize("default_margin").width
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
textFont: descriptionLabel.font
|
textFont: descriptionLabel.font
|
||||||
|
Loading…
x
Reference in New Issue
Block a user