From 176c7bfc22ea4972ce194c07301b9e75ca28331f Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 18 Oct 2018 17:48:03 +0200 Subject: [PATCH] Small fixes in the CustomConfigurationSelector file Contributes to CURA-5772. --- resources/qml/CustomConfigurationSelector.qml | 26 +++++++++---------- resources/qml/qmldir | 4 ++- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/resources/qml/CustomConfigurationSelector.qml b/resources/qml/CustomConfigurationSelector.qml index 7dfc3737c0..9a3f91e6a3 100644 --- a/resources/qml/CustomConfigurationSelector.qml +++ b/resources/qml/CustomConfigurationSelector.qml @@ -8,8 +8,6 @@ import QtQuick.Controls.Styles 1.1 import UM 1.2 as UM import Cura 1.0 as Cura -import "Menus" // TODO: This needs to be fixed in the qmldir! - Rectangle { implicitWidth: parent.width @@ -77,16 +75,15 @@ Rectangle extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled if (extruder_enabled) { - forceActiveFocus(); // Changing focus applies the currently-being-typed values so it can change the displayed setting values. - Cura.ExtruderManager.setActiveExtruderIndex(index); + forceActiveFocus() // Changing focus applies the currently-being-typed values so it can change the displayed setting values. + Cura.ExtruderManager.setActiveExtruderIndex(index) } - break; + break case Qt.RightButton: extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled - extruderMenu.popup(); - break; + extruderMenu.popup() + break } - } } @@ -122,8 +119,9 @@ Rectangle { if(control.checked || control.pressed) { - return UM.Theme.getColor("action_button_active_border"); - } else if (control.hovered) + return UM.Theme.getColor("action_button_active_border") + } + else if (control.hovered) { return UM.Theme.getColor("action_button_hovered_border") } @@ -252,7 +250,7 @@ Rectangle anchors.right: parent.right style: UM.Theme.styles.sidebar_header_button activeFocusOnPress: true; - menu: MaterialMenu + menu: Cura.MaterialMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex } @@ -300,7 +298,7 @@ Rectangle style: UM.Theme.styles.sidebar_header_button activeFocusOnPress: true; - menu: NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex } + menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex } } } @@ -348,12 +346,12 @@ Rectangle { anchors.fill: parent - onClicked: { + onClicked: + { // open the material URL with web browser Qt.openUrlExternally("https://ultimaker.com/incoming-links/cura/material-compatibilty"); } } } } - } diff --git a/resources/qml/qmldir b/resources/qml/qmldir index 10e103d9ef..2681da00e1 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -4,4 +4,6 @@ MachineSelector 1.0 MachineSelector.qml QuickConfigurationSelector 1.0 QuickConfigurationSelector.qml CustomConfigurationSelector 1.0 CustomConfigurationSelector.qml PrintSetupSelector 1.0 PrintSetupSelector.qml -ActionButton 1.0 ActionButton.qml \ No newline at end of file +ActionButton 1.0 ActionButton.qml +MaterialMenu 1.0 MaterialMenu.qml +NozzleMenu 1.0 NozzleMenu.qml \ No newline at end of file