mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 09:05:57 +08:00
Move static anchor properties inside the TertiaryButton
element
CURA-8564
This commit is contained in:
parent
ad1798ee6e
commit
8d8de1c6f4
@ -87,16 +87,12 @@ Rectangle
|
|||||||
if (line.implicitWidth + readMoreButton.width + UM.Theme.getSize("default_margin").width > width)
|
if (line.implicitWidth + readMoreButton.width + UM.Theme.getSize("default_margin").width > width)
|
||||||
{
|
{
|
||||||
// If it does place it after the body text
|
// If it does place it after the body text
|
||||||
readMoreButton.anchors.left = infoText.left;
|
|
||||||
readMoreButton.anchors.bottom = infoText.bottom;
|
|
||||||
readMoreButton.anchors.bottomMargin = -(fontMetrics.height + UM.Theme.getSize("thin_margin").height);
|
readMoreButton.anchors.bottomMargin = -(fontMetrics.height + UM.Theme.getSize("thin_margin").height);
|
||||||
readMoreButton.anchors.leftMargin = 0;
|
readMoreButton.anchors.leftMargin = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Otherwise place it under the text
|
// Otherwise place it under the text
|
||||||
readMoreButton.anchors.left = infoText.left;
|
|
||||||
readMoreButton.anchors.bottom = infoText.bottom;
|
|
||||||
readMoreButton.anchors.leftMargin = line.implicitWidth + UM.Theme.getSize("default_margin").width;
|
readMoreButton.anchors.leftMargin = line.implicitWidth + UM.Theme.getSize("default_margin").width;
|
||||||
readMoreButton.anchors.bottomMargin = 0;
|
readMoreButton.anchors.bottomMargin = 0;
|
||||||
}
|
}
|
||||||
@ -114,6 +110,8 @@ Rectangle
|
|||||||
{
|
{
|
||||||
visible: readMoreUrl !== ""
|
visible: readMoreUrl !== ""
|
||||||
id: readMoreButton
|
id: readMoreButton
|
||||||
|
anchors.left: infoText.left
|
||||||
|
anchors.bottom: infoText.bottom
|
||||||
text: "Learn More"
|
text: "Learn More"
|
||||||
textFont: UM.Theme.getFont("default")
|
textFont: UM.Theme.getFont("default")
|
||||||
textColor: infoText.color
|
textColor: infoText.color
|
||||||
|
Loading…
x
Reference in New Issue
Block a user