Cura/resources/qml/ExtruderButton.qml
Joey de l'Arago 396057a56f Correct typo in name
CURA-9793
2022-12-07 16:14:17 +01:00

32 lines
727 B
QML

// Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 2.0
import UM 1.5 as UM
import Cura 1.0 as Cura
UM.ToolbarButton
{
id: base
property var extruder
property var extruderNumberFont: UM.Theme.getFont("small_emphasis")
toolItem: ExtruderIcon
{
materialColor: extruder.color
extruderEnabled: extruder.stack.isEnabled
iconVariant: "default"
font: extruderNumberFont
property int index: extruder.index
}
onClicked:
{
forceActiveFocus() //First grab focus, so all the text fields are updated
CuraActions.setExtruderForSelection(extruder.id)
}
}