Use reusable simple button instead of redefining it

This commit is contained in:
Jaime van Kessel 2021-11-16 16:51:09 +01:00
parent 7c29e69f55
commit e44a58b3a3

View File

@ -164,7 +164,7 @@ Rectangle
color: UM.Theme.getColor("text")
}
Button
UM.SimpleButton
{
id: externalLinkButton
@ -172,20 +172,10 @@ Rectangle
Layout.preferredHeight: UM.Theme.getSize("card_tiny_icon").height
Layout.alignment: Qt.AlignTop
Rectangle
{
anchors.fill: parent
radius: width
color: externalLinkButton.hovered ? UM.Theme.getColor("action_button_hovered") : "transparent"
UM.RecolorImage
{
anchors.fill: parent
color: UM.Theme.getColor("text")
source: UM.Theme.getIcon("LinkExternal")
}
}
iconSource: UM.Theme.getIcon("LinkExternal")
hoverColor: UM.Theme.getColor("text_link")
backgroundColor: UM.Theme.getColor("detail_background")
hoverBackgroundColor: UM.Theme.getColor("action_button_hovered")
onClicked: Qt.openUrlExternally(packageData.packageInfoUrl)
}
}