mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 10:59:01 +08:00
Fix code style in materialspage
This commit is contained in:
parent
caca5e5021
commit
eb5ce04229
@ -55,7 +55,8 @@ Item
|
|||||||
Row // Button Row
|
Row // Button Row
|
||||||
{
|
{
|
||||||
id: buttonRow
|
id: buttonRow
|
||||||
anchors {
|
anchors
|
||||||
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
top: titleLabel.bottom
|
top: titleLabel.bottom
|
||||||
@ -63,11 +64,13 @@ Item
|
|||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
// Activate button
|
// Activate button
|
||||||
Button {
|
Button
|
||||||
|
{
|
||||||
text: catalog.i18nc("@action:button", "Activate")
|
text: catalog.i18nc("@action:button", "Activate")
|
||||||
iconName: "list-activate"
|
iconName: "list-activate"
|
||||||
enabled: !isCurrentItemActivated
|
enabled: !isCurrentItemActivated
|
||||||
onClicked: {
|
onClicked:
|
||||||
|
{
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
|
|
||||||
const extruder_position = Cura.ExtruderManager.activeExtruderIndex;
|
const extruder_position = Cura.ExtruderManager.activeExtruderIndex;
|
||||||
@ -76,10 +79,12 @@ Item
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create button
|
// Create button
|
||||||
Button {
|
Button
|
||||||
|
{
|
||||||
text: catalog.i18nc("@action:button", "Create")
|
text: catalog.i18nc("@action:button", "Create")
|
||||||
iconName: "list-add"
|
iconName: "list-add"
|
||||||
onClicked: {
|
onClicked:
|
||||||
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
base.newRootMaterialIdToSwitchTo = base.materialManager.createMaterial();
|
base.newRootMaterialIdToSwitchTo = base.materialManager.createMaterial();
|
||||||
base.toActivateNewMaterial = true;
|
base.toActivateNewMaterial = true;
|
||||||
@ -87,11 +92,13 @@ Item
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Duplicate button
|
// Duplicate button
|
||||||
Button {
|
Button
|
||||||
|
{
|
||||||
text: catalog.i18nc("@action:button", "Duplicate");
|
text: catalog.i18nc("@action:button", "Duplicate");
|
||||||
iconName: "list-add"
|
iconName: "list-add"
|
||||||
enabled: base.hasCurrentItem
|
enabled: base.hasCurrentItem
|
||||||
onClicked: {
|
onClicked:
|
||||||
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
base.newRootMaterialIdToSwitchTo = base.materialManager.duplicateMaterial(base.currentItem.container_node);
|
base.newRootMaterialIdToSwitchTo = base.materialManager.duplicateMaterial(base.currentItem.container_node);
|
||||||
base.toActivateNewMaterial = true;
|
base.toActivateNewMaterial = true;
|
||||||
@ -99,21 +106,25 @@ Item
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove button
|
// Remove button
|
||||||
Button {
|
Button
|
||||||
|
{
|
||||||
text: catalog.i18nc("@action:button", "Remove")
|
text: catalog.i18nc("@action:button", "Remove")
|
||||||
iconName: "list-remove"
|
iconName: "list-remove"
|
||||||
enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated
|
enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated
|
||||||
onClicked: {
|
onClicked:
|
||||||
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
confirmRemoveMaterialDialog.open();
|
confirmRemoveMaterialDialog.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Import button
|
// Import button
|
||||||
Button {
|
Button
|
||||||
|
{
|
||||||
text: catalog.i18nc("@action:button", "Import")
|
text: catalog.i18nc("@action:button", "Import")
|
||||||
iconName: "document-import"
|
iconName: "document-import"
|
||||||
onClicked: {
|
onClicked:
|
||||||
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
importMaterialDialog.open();
|
importMaterialDialog.open();
|
||||||
}
|
}
|
||||||
@ -121,10 +132,12 @@ Item
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Export button
|
// Export button
|
||||||
Button {
|
Button
|
||||||
|
{
|
||||||
text: catalog.i18nc("@action:button", "Export")
|
text: catalog.i18nc("@action:button", "Export")
|
||||||
iconName: "document-export"
|
iconName: "document-export"
|
||||||
onClicked: {
|
onClicked:
|
||||||
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
exportMaterialDialog.open();
|
exportMaterialDialog.open();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user