Small fixes in the CustomConfigurationSelector file

Contributes to CURA-5772.
This commit is contained in:
Diego Prado Gesto 2018-10-18 17:48:03 +02:00
parent bf6817ce7a
commit 176c7bfc22
2 changed files with 15 additions and 15 deletions

View File

@ -8,8 +8,6 @@ import QtQuick.Controls.Styles 1.1
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
import "Menus" // TODO: This needs to be fixed in the qmldir!
Rectangle Rectangle
{ {
implicitWidth: parent.width implicitWidth: parent.width
@ -77,16 +75,15 @@ Rectangle
extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled
if (extruder_enabled) if (extruder_enabled)
{ {
forceActiveFocus(); // Changing focus applies the currently-being-typed values so it can change the displayed setting values. forceActiveFocus() // Changing focus applies the currently-being-typed values so it can change the displayed setting values.
Cura.ExtruderManager.setActiveExtruderIndex(index); Cura.ExtruderManager.setActiveExtruderIndex(index)
} }
break; break
case Qt.RightButton: case Qt.RightButton:
extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled
extruderMenu.popup(); extruderMenu.popup()
break; break
} }
} }
} }
@ -122,8 +119,9 @@ Rectangle
{ {
if(control.checked || control.pressed) if(control.checked || control.pressed)
{ {
return UM.Theme.getColor("action_button_active_border"); return UM.Theme.getColor("action_button_active_border")
} else if (control.hovered) }
else if (control.hovered)
{ {
return UM.Theme.getColor("action_button_hovered_border") return UM.Theme.getColor("action_button_hovered_border")
} }
@ -252,7 +250,7 @@ Rectangle
anchors.right: parent.right anchors.right: parent.right
style: UM.Theme.styles.sidebar_header_button style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true; activeFocusOnPress: true;
menu: MaterialMenu menu: Cura.MaterialMenu
{ {
extruderIndex: Cura.ExtruderManager.activeExtruderIndex extruderIndex: Cura.ExtruderManager.activeExtruderIndex
} }
@ -300,7 +298,7 @@ Rectangle
style: UM.Theme.styles.sidebar_header_button style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true; activeFocusOnPress: true;
menu: NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex } menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex }
} }
} }
@ -348,12 +346,12 @@ Rectangle
{ {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked:
{
// open the material URL with web browser // open the material URL with web browser
Qt.openUrlExternally("https://ultimaker.com/incoming-links/cura/material-compatibilty"); Qt.openUrlExternally("https://ultimaker.com/incoming-links/cura/material-compatibilty");
} }
} }
} }
} }
} }

View File

@ -5,3 +5,5 @@ QuickConfigurationSelector 1.0 QuickConfigurationSelector.qml
CustomConfigurationSelector 1.0 CustomConfigurationSelector.qml CustomConfigurationSelector 1.0 CustomConfigurationSelector.qml
PrintSetupSelector 1.0 PrintSetupSelector.qml PrintSetupSelector 1.0 PrintSetupSelector.qml
ActionButton 1.0 ActionButton.qml ActionButton 1.0 ActionButton.qml
MaterialMenu 1.0 MaterialMenu.qml
NozzleMenu 1.0 NozzleMenu.qml