Use an alias property for the banner icon

CURA-8564
This commit is contained in:
casper 2021-11-29 12:16:52 +01:00 committed by Jelle Spijker
parent 7e48657872
commit 67fc514b8f
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
4 changed files with 5 additions and 11 deletions

View file

@ -11,7 +11,7 @@ import Cura 1.6 as Cura
// Onboarding banner.
Rectangle
{
property string bannerIcon
property alias bannerIcon: onboardingIcon.source;
property string bannerText
property var onRemoveBanner
property string readMoreUrl
@ -28,7 +28,7 @@ Rectangle
color: UM.Theme.getColor("action_panel_secondary")
// Icon
Item
UM.RecolorImage
{
id: onboardingIcon
anchors
@ -39,12 +39,6 @@ Rectangle
}
width: UM.Theme.getSize("button_icon").width
height: UM.Theme.getSize("button_icon").height
UM.RecolorImage
{
anchors.fill: parent
color: UM.Theme.getColor("primary_text")
source: UM.Theme.getIcon(bannerIcon)
}
}
// Close button