mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 16:28:58 +08:00
Remove read more button on packagecard
CURA-8762
This commit is contained in:
parent
3b801e9f18
commit
35f1ad4097
@ -41,54 +41,6 @@ Rectangle
|
|||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
|
|
||||||
onLineLaidOut:
|
|
||||||
{
|
|
||||||
if(truncated && line.isLast)
|
|
||||||
{
|
|
||||||
let max_line_width = parent.width - readMoreButton.width - fontMetrics.advanceWidth("… ") - 2 * UM.Theme.getSize("default_margin").width;
|
|
||||||
if(line.implicitWidth > max_line_width)
|
|
||||||
{
|
|
||||||
line.width = max_line_width;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
line.width = line.implicitWidth - fontMetrics.advanceWidth("…"); //Truncate the ellipsis. We're adding this ourselves.
|
|
||||||
}
|
|
||||||
descriptionLabel.lastLineWidth = line.implicitWidth;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
id: tripleDotLabel
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: descriptionLabel.lastLineWidth
|
|
||||||
anchors.bottom: descriptionLabel.bottom
|
|
||||||
|
|
||||||
text: "… "
|
|
||||||
font: descriptionLabel.font
|
|
||||||
color: descriptionLabel.color
|
|
||||||
visible: descriptionLabel.truncated && descriptionLabel.text !== ""
|
|
||||||
}
|
|
||||||
Cura.TertiaryButton
|
|
||||||
{
|
|
||||||
id: readMoreButton
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: descriptionLabel.bottom
|
|
||||||
height: fontMetrics.height //Height of a single line.
|
|
||||||
|
|
||||||
text: catalog.i18nc("@info", "Read more")
|
|
||||||
iconSource: UM.Theme.getIcon("LinkExternal")
|
|
||||||
|
|
||||||
visible: descriptionLabel.truncated && descriptionLabel.text !== ""
|
|
||||||
enabled: visible
|
|
||||||
leftPadding: UM.Theme.getSize("default_margin").width
|
|
||||||
rightPadding: UM.Theme.getSize("wide_margin").width
|
|
||||||
textFont: descriptionLabel.font
|
|
||||||
isIconOnRightSide: true
|
|
||||||
|
|
||||||
onClicked: Qt.openUrlExternally(packageData.marketplaceURL)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user