mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 13:15:57 +08:00
Update material preferences page to QtControls 2
CURA-8684
This commit is contained in:
parent
b45707af54
commit
3e98282871
@ -2,7 +2,8 @@
|
|||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4 as OldControls
|
||||||
|
import QtQuick.Controls 2.1
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
@ -106,7 +107,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: activateMenuButton
|
id: activateMenuButton
|
||||||
text: catalog.i18nc("@action:button", "Activate")
|
text: catalog.i18nc("@action:button", "Activate")
|
||||||
iconName: "list-activate"
|
icon.name: "list-activate"
|
||||||
enabled: !isCurrentItemActivated && Cura.MachineManager.activeMachine.hasMaterials
|
enabled: !isCurrentItemActivated && Cura.MachineManager.activeMachine.hasMaterials
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
@ -124,7 +125,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: createMenuButton
|
id: createMenuButton
|
||||||
text: catalog.i18nc("@action:button", "Create")
|
text: catalog.i18nc("@action:button", "Create")
|
||||||
iconName: "list-add"
|
icon.name: "list-add"
|
||||||
enabled: Cura.MachineManager.activeMachine.hasMaterials
|
enabled: Cura.MachineManager.activeMachine.hasMaterials
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
@ -139,7 +140,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: duplicateMenuButton
|
id: duplicateMenuButton
|
||||||
text: catalog.i18nc("@action:button", "Duplicate");
|
text: catalog.i18nc("@action:button", "Duplicate");
|
||||||
iconName: "list-add"
|
icon.name: "list-add"
|
||||||
enabled: base.hasCurrentItem
|
enabled: base.hasCurrentItem
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
@ -154,7 +155,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: removeMenuButton
|
id: removeMenuButton
|
||||||
text: catalog.i18nc("@action:button", "Remove")
|
text: catalog.i18nc("@action:button", "Remove")
|
||||||
iconName: "list-remove"
|
icon.name: "list-remove"
|
||||||
enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated && base.materialManagementModel.canMaterialBeRemoved(base.currentItem.container_node)
|
enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated && base.materialManagementModel.canMaterialBeRemoved(base.currentItem.container_node)
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
@ -169,7 +170,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: importMenuButton
|
id: importMenuButton
|
||||||
text: catalog.i18nc("@action:button", "Import")
|
text: catalog.i18nc("@action:button", "Import")
|
||||||
iconName: "document-import"
|
icon.name: "document-import"
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
@ -183,7 +184,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: exportMenuButton
|
id: exportMenuButton
|
||||||
text: catalog.i18nc("@action:button", "Export")
|
text: catalog.i18nc("@action:button", "Export")
|
||||||
iconName: "document-export"
|
icon.name: "document-export"
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
@ -197,7 +198,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: syncMaterialsButton
|
id: syncMaterialsButton
|
||||||
text: catalog.i18nc("@action:button Sending materials to printers", "Sync with Printers")
|
text: catalog.i18nc("@action:button Sending materials to printers", "Sync with Printers")
|
||||||
iconName: "sync-synchronizing"
|
icon.name: "sync-synchronizing"
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
@ -261,7 +262,7 @@ Item
|
|||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView
|
OldControls.ScrollView
|
||||||
{
|
{
|
||||||
id: materialScrollView
|
id: materialScrollView
|
||||||
anchors
|
anchors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user