mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-08 00:19:02 +08:00
Use reusable simple button instead of redefining it
This commit is contained in:
parent
7c29e69f55
commit
e44a58b3a3
@ -164,7 +164,7 @@ Rectangle
|
|||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
UM.SimpleButton
|
||||||
{
|
{
|
||||||
id: externalLinkButton
|
id: externalLinkButton
|
||||||
|
|
||||||
@ -172,20 +172,10 @@ Rectangle
|
|||||||
Layout.preferredHeight: UM.Theme.getSize("card_tiny_icon").height
|
Layout.preferredHeight: UM.Theme.getSize("card_tiny_icon").height
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
Rectangle
|
iconSource: UM.Theme.getIcon("LinkExternal")
|
||||||
{
|
hoverColor: UM.Theme.getColor("text_link")
|
||||||
anchors.fill: parent
|
backgroundColor: UM.Theme.getColor("detail_background")
|
||||||
radius: width
|
hoverBackgroundColor: UM.Theme.getColor("action_button_hovered")
|
||||||
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")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: Qt.openUrlExternally(packageData.packageInfoUrl)
|
onClicked: Qt.openUrlExternally(packageData.packageInfoUrl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user