From e44a58b3a37b283e97ea4ee614d00f7d77ebf5ed Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 16 Nov 2021 16:51:09 +0100 Subject: [PATCH] Use reusable simple button instead of redefining it --- .../Marketplace/resources/qml/PackageCard.qml | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/plugins/Marketplace/resources/qml/PackageCard.qml b/plugins/Marketplace/resources/qml/PackageCard.qml index b93720f300..85df7ae0f1 100644 --- a/plugins/Marketplace/resources/qml/PackageCard.qml +++ b/plugins/Marketplace/resources/qml/PackageCard.qml @@ -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) } }