Browse Source

Add more materials from Marketplace menu button

This commit adds a button "Add more materials from Marketplace" in the
menu that pops up in the material list while configuring the materials
into custom ones. The button redirects the user to the Marketplace
materials page (https://marketplace.ultimaker.com/app/cura/materials)

CURA-7027
Kostas Karmas 5 years ago
parent
commit
dbab3c6e8b
2 changed files with 16 additions and 0 deletions
  1. 9 0
      resources/qml/Actions.qml
  2. 7 0
      resources/qml/Menus/MaterialMenu.qml

+ 9 - 0
resources/qml/Actions.qml

@@ -54,6 +54,7 @@ Item
     property alias manageProfiles: manageProfilesAction;
 
     property alias manageMaterials: manageMaterialsAction;
+    property alias marketplaceMaterials: marketplaceMaterialsAction;
 
     property alias preferences: preferencesAction;
 
@@ -188,6 +189,14 @@ Item
         shortcut: "Ctrl+K"
     }
 
+    Action
+    {
+        id: marketplaceMaterialsAction
+        onTriggered: Qt.openUrlExternally("https://marketplace.ultimaker.com/app/cura/materials")
+        iconName: "configure"
+        text: catalog.i18nc("@action:inmenu", "Add more materials from Marketplace")
+    }
+
     Action
     {
         id: updateProfileAction;

+ 7 - 0
resources/qml/Menus/MaterialMenu.qml

@@ -157,4 +157,11 @@ Menu
     {
         action: Cura.Actions.manageMaterials
     }
+
+    MenuSeparator {}
+
+    MenuItem
+    {
+        action: Cura.Actions.marketplaceMaterials
+    }
 }