Merge branch 'CURA-8564_Add_onboarding_banners_with_link_to_explain_Cura_MP' into marketplace_redesign

This commit is contained in:
casper 2021-11-30 14:27:41 +01:00
commit a0dce47d54
5 changed files with 18 additions and 17 deletions

View File

@ -49,15 +49,6 @@ Window
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
OnboardBanner
{
visible: content.item && content.item.bannerVisible
text: content.item && content.item.bannerText
icon: content.item && content.item.bannerIcon
onRemove: content.item && content.item.onRemoveBanner
readMoreUrl: content.item && content.item.bannerReadMoreUrl
}
// Page title. // Page title.
Item Item
{ {
@ -81,6 +72,15 @@ Window
} }
} }
OnboardBanner
{
visible: content.item && content.item.bannerVisible
text: content.item && content.item.bannerText
icon: content.item && content.item.bannerIcon
onRemove: content.item && content.item.onRemoveBanner
readMoreUrl: content.item && content.item.bannerReadMoreUrl
}
// Search & Top-Level Tabs // Search & Top-Level Tabs
Item Item
{ {

View File

@ -10,7 +10,7 @@ Packages
bannerVisible: UM.Preferences.getValue("cura/market_place_show_material_banner") bannerVisible: UM.Preferences.getValue("cura/market_place_show_material_banner")
bannerIcon: UM.Theme.getIcon("Spool") bannerIcon: UM.Theme.getIcon("Spool")
bannerText: catalog.i18nc("@text", "Streamline your workflow and customize your Ultimaker Cura experience with plugins contributed by our amazing community of users.") bannerText: catalog.i18nc("@text", "Select and install material profiles optimised for your Ultimaker 3D printers.")
bannerReadMoreUrl: "" // TODO add when support page is ready bannerReadMoreUrl: "" // TODO add when support page is ready
onRemoveBanner: function() { onRemoveBanner: function() {
UM.Preferences.setValue("cura/market_place_show_material_banner", false); UM.Preferences.setValue("cura/market_place_show_material_banner", false);

View File

@ -36,8 +36,8 @@ Rectangle
left: parent.left left: parent.left
margins: UM.Theme.getSize("default_margin").width margins: UM.Theme.getSize("default_margin").width
} }
width: UM.Theme.getSize("button_icon").width width: UM.Theme.getSize("banner_icon_size").width
height: UM.Theme.getSize("button_icon").height height: UM.Theme.getSize("banner_icon_size").height
} }
// Close button // Close button
@ -85,8 +85,8 @@ Rectangle
if (line.implicitWidth + readMoreButton.width + UM.Theme.getSize("default_margin").width > width) if (line.implicitWidth + readMoreButton.width + UM.Theme.getSize("default_margin").width > width)
{ {
// If it does place it after the body text // If it does place it after the body text
readMoreButton.anchors.bottomMargin = -(fontMetrics.height + UM.Theme.getSize("thin_margin").height); readMoreButton.anchors.bottomMargin = -(fontMetrics.height);
readMoreButton.anchors.leftMargin = 0; readMoreButton.anchors.leftMargin = UM.Theme.getSize("thin_margin").width;
} }
else else
{ {
@ -106,7 +106,6 @@ Rectangle
Cura.TertiaryButton Cura.TertiaryButton
{ {
visible: readMoreUrl !== ""
id: readMoreButton id: readMoreButton
anchors.left: infoText.left anchors.left: infoText.left
anchors.bottom: infoText.bottom anchors.bottom: infoText.bottom

View File

@ -10,7 +10,7 @@ Packages
bannerVisible: UM.Preferences.getValue("cura/market_place_show_plugin_banner") bannerVisible: UM.Preferences.getValue("cura/market_place_show_plugin_banner")
bannerIcon: UM.Theme.getIcon("Shop") bannerIcon: UM.Theme.getIcon("Shop")
bannerText: catalog.i18nc("@text", "Select and install material profiles optimised for your Ultimaker 3D printers.") bannerText: catalog.i18nc("@text", "Streamline your workflow and customize your Ultimaker Cura experience with plugins contributed by our amazing community of users.")
bannerReadMoreUrl: "" // TODO add when support page is ready bannerReadMoreUrl: "" // TODO add when support page is ready
onRemoveBanner: function() { onRemoveBanner: function() {
UM.Preferences.setValue("cura/market_place_show_plugin_banner", false) UM.Preferences.setValue("cura/market_place_show_plugin_banner", false)

View File

@ -683,6 +683,8 @@
"table_row": [2.0, 2.0], "table_row": [2.0, 2.0],
"welcome_wizard_content_image_big": [18, 15], "welcome_wizard_content_image_big": [18, 15],
"welcome_wizard_cloud_content_image": [4, 4] "welcome_wizard_cloud_content_image": [4, 4],
"banner_icon_size": [2.0, 2.0]
} }
} }