mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Fix look of external link button
CURA-8561
This commit is contained in:
parent
f6b351f97f
commit
183fa06cfe
1 changed files with 23 additions and 7 deletions
|
|
@ -145,17 +145,33 @@ Rectangle
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.SimpleButton
|
Button
|
||||||
{
|
{
|
||||||
id: externalLinkButton
|
id: externalLinkButton
|
||||||
|
|
||||||
Layout.preferredWidth: UM.Theme.getSize("card_tiny_icon").width
|
// For some reason if i set padding, they don't match up. If i set all of them explicitly, it does work?
|
||||||
Layout.preferredHeight: UM.Theme.getSize("card_tiny_icon").height
|
leftPadding: UM.Theme.getSize("narrow_margin").width
|
||||||
Layout.alignment: Qt.AlignTop
|
rightPadding: UM.Theme.getSize("narrow_margin").width
|
||||||
iconSource: UM.Theme.getIcon("LinkExternal")
|
topPadding: UM.Theme.getSize("narrow_margin").width
|
||||||
hoverColor: UM.Theme.getColor("text_link")
|
bottomPadding: UM.Theme.getSize("narrow_margin").width
|
||||||
onClicked: Qt.openUrlExternally(packageData.packageInfoUrl)
|
|
||||||
|
Layout.preferredWidth: UM.Theme.getSize("card_tiny_icon").width + 2 * padding
|
||||||
|
Layout.preferredHeight: UM.Theme.getSize("card_tiny_icon").width + 2 * padding
|
||||||
|
contentItem: UM.RecolorImage
|
||||||
|
{
|
||||||
|
source: UM.Theme.getIcon("LinkExternal")
|
||||||
|
color: UM.Theme.getColor("icon")
|
||||||
|
implicitWidth: UM.Theme.getSize("card_tiny_icon").width
|
||||||
|
implicitHeight: UM.Theme.getSize("card_tiny_icon").height
|
||||||
|
}
|
||||||
|
|
||||||
|
background: Rectangle
|
||||||
|
{
|
||||||
|
color: externalLinkButton.hovered ? UM.Theme.getColor("action_button_hovered"): "transparent"
|
||||||
|
radius: externalLinkButton.width / 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue