Просмотр исходного кода

Merge branch 'CURA-8564_Add_onboarding_banners_with_link_to_explain_Cura_MP' into marketplace_redesign

casper 3 лет назад
Родитель
Сommit
a0dce47d54

+ 9 - 9
plugins/Marketplace/resources/qml/Marketplace.qml

@@ -49,15 +49,6 @@ Window
 
             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.
             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
             Item
             {

+ 1 - 1
plugins/Marketplace/resources/qml/Materials.qml

@@ -10,7 +10,7 @@ Packages
 
     bannerVisible:  UM.Preferences.getValue("cura/market_place_show_material_banner")
     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
     onRemoveBanner: function() {
         UM.Preferences.setValue("cura/market_place_show_material_banner", false);

+ 4 - 5
plugins/Marketplace/resources/qml/OnboardBanner.qml

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

+ 1 - 1
plugins/Marketplace/resources/qml/Plugins.qml

@@ -10,7 +10,7 @@ Packages
 
     bannerVisible: UM.Preferences.getValue("cura/market_place_show_plugin_banner")
     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
     onRemoveBanner: function() {
         UM.Preferences.setValue("cura/market_place_show_plugin_banner", false)

+ 3 - 1
resources/themes/cura-light/theme.json

@@ -683,6 +683,8 @@
         "table_row": [2.0, 2.0],
 
         "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]
     }
 }