Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2022-01-11 13:43:01 +0300
committerJaime van Kessel <nallath@gmail.com>2022-01-11 13:43:01 +0300
commitf8906597e596f81e1dfcd0dbe03203f799fca8e9 (patch)
tree5877cd0849ab9d510fa9089743184ac00f004dd8
parentb30ad58f916cb57113a93f01810d812821813b98 (diff)
Update menu for PrinterType button
CURA-8683
-rw-r--r--resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml11
-rw-r--r--resources/qml/Menus/PrinterTypeMenu.qml9
2 files changed, 9 insertions, 11 deletions
diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
index 10bd5624d7..bacee0bc24 100644
--- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
+++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
@@ -35,7 +35,7 @@ Item
}
}
- //Printer type selector.
+ // Printer type selector.
Item
{
id: printerTypeSelectorRow
@@ -64,17 +64,18 @@ Item
anchors.left: parent.left
}
- OldControls.ToolButton
+ Button
{
id: printerTypeSelector
text: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.definition.name: ""
- tooltip: text
+
height: UM.Theme.getSize("print_setup_big_item").height
width: Math.round(parent.width * 0.7) + UM.Theme.getSize("default_margin").width
anchors.right: parent.right
- style: UM.Theme.styles.print_setup_header_button
+ onClicked: menu.open()
+ //style: UM.Theme.styles.print_setup_header_button
- menu: Cura.PrinterTypeMenu { }
+ Cura.PrinterTypeMenu { id: menu}
}
}
diff --git a/resources/qml/Menus/PrinterTypeMenu.qml b/resources/qml/Menus/PrinterTypeMenu.qml
index c2a09e0efd..9a6c066b4d 100644
--- a/resources/qml/Menus/PrinterTypeMenu.qml
+++ b/resources/qml/Menus/PrinterTypeMenu.qml
@@ -2,9 +2,9 @@
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
-import QtQuick.Controls 1.4
+import QtQuick.Controls 2.4
-import UM 1.3 as UM
+import UM 1.5 as UM
import Cura 1.0 as Cura
Menu
@@ -18,12 +18,11 @@ Menu
id: printerTypeInstantiator
model: outputDevice != null ? outputDevice.connectedPrintersTypeCount : []
- MenuItem
+ UM.MenuItem
{
text: modelData.machine_type
checkable: true
checked: Cura.MachineManager.activeMachine.definition.name == modelData.machine_type
- exclusiveGroup: group
onTriggered:
{
Cura.MachineManager.switchPrinterType(modelData.machine_type)
@@ -32,6 +31,4 @@ Menu
onObjectAdded: menu.insertItem(index, object)
onObjectRemoved: menu.removeItem(object)
}
-
- ExclusiveGroup { id: group }
}