mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Use Cura.MenuItem instead of UM.MenuItem
I didn't realise that Cura already had a menu item. To prevent Confusion, i've changed Cura.MenuItem to use UM.MenuItem and let all other menus use Cura.MenuItem
This commit is contained in:
parent
bab9311284
commit
3130ea0f74
17 changed files with 96 additions and 128 deletions
|
@ -18,29 +18,27 @@ Menu
|
||||||
property var multiBuildPlateModel: CuraApplication.getMultiBuildPlateModel()
|
property var multiBuildPlateModel: CuraApplication.getMultiBuildPlateModel()
|
||||||
|
|
||||||
// Selection-related actions.
|
// Selection-related actions.
|
||||||
UM.MenuItem { action: Cura.Actions.centerSelection; }
|
Cura.MenuItem { action: Cura.Actions.centerSelection; }
|
||||||
UM.MenuItem { action: Cura.Actions.deleteSelection; }
|
Cura.MenuItem { action: Cura.Actions.deleteSelection; }
|
||||||
UM.MenuItem { action: Cura.Actions.multiplySelection; }
|
Cura.MenuItem { action: Cura.Actions.multiplySelection; }
|
||||||
|
|
||||||
// Extruder selection - only visible if there is more than 1 extruder
|
// Extruder selection - only visible if there is more than 1 extruder
|
||||||
MenuSeparator { visible: base.shouldShowExtruders }
|
Cura.MenuSeparator { visible: base.shouldShowExtruders }
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
id: extruderHeader
|
id: extruderHeader
|
||||||
text: catalog.i18ncp("@label", "Print Selected Model With:", "Print Selected Models With:", UM.Selection.selectionCount)
|
text: catalog.i18ncp("@label", "Print Selected Model With:", "Print Selected Models With:", UM.Selection.selectionCount)
|
||||||
enabled: false
|
enabled: false
|
||||||
visible: base.shouldShowExtruders
|
visible: base.shouldShowExtruders
|
||||||
height: visible ? implicitHeight: 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
model: CuraApplication.getExtrudersModel()
|
model: CuraApplication.getExtrudersModel()
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: "%1: %2 - %3".arg(model.name).arg(model.material).arg(model.variant)
|
text: "%1: %2 - %3".arg(model.name).arg(model.material).arg(model.variant)
|
||||||
visible: base.shouldShowExtruders
|
visible: base.shouldShowExtruders
|
||||||
height: visible ? implicitHeight: 0
|
|
||||||
enabled: UM.Selection.hasSelection && model.enabled
|
enabled: UM.Selection.hasSelection && model.enabled
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: Cura.ExtruderManager.selectedObjectExtruders.indexOf(model.id) != -1
|
checked: Cura.ExtruderManager.selectedObjectExtruders.indexOf(model.id) != -1
|
||||||
|
@ -53,19 +51,19 @@ Menu
|
||||||
}
|
}
|
||||||
|
|
||||||
// Global actions
|
// Global actions
|
||||||
MenuSeparator {}
|
Cura.MenuSeparator {}
|
||||||
UM.MenuItem { action: Cura.Actions.selectAll }
|
Cura.MenuItem { action: Cura.Actions.selectAll }
|
||||||
UM.MenuItem { action: Cura.Actions.arrangeAll }
|
Cura.MenuItem { action: Cura.Actions.arrangeAll }
|
||||||
UM.MenuItem { action: Cura.Actions.deleteAll }
|
Cura.MenuItem { action: Cura.Actions.deleteAll }
|
||||||
UM.MenuItem { action: Cura.Actions.reloadAll }
|
Cura.MenuItem { action: Cura.Actions.reloadAll }
|
||||||
UM.MenuItem { action: Cura.Actions.resetAllTranslation }
|
Cura.MenuItem { action: Cura.Actions.resetAllTranslation }
|
||||||
UM.MenuItem { action: Cura.Actions.resetAll }
|
Cura.MenuItem { action: Cura.Actions.resetAll }
|
||||||
|
|
||||||
// Group actions
|
// Group actions
|
||||||
MenuSeparator {}
|
Cura.MenuSeparator {}
|
||||||
UM.MenuItem { action: Cura.Actions.groupObjects }
|
Cura.MenuItem { action: Cura.Actions.groupObjects }
|
||||||
UM.MenuItem { action: Cura.Actions.mergeObjects }
|
Cura.MenuItem { action: Cura.Actions.mergeObjects }
|
||||||
UM.MenuItem { action: Cura.Actions.unGroupObjects }
|
Cura.MenuItem { action: Cura.Actions.unGroupObjects }
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,18 +11,18 @@ Menu
|
||||||
{
|
{
|
||||||
title: catalog.i18nc("@title:menu menubar:toplevel", "&Edit")
|
title: catalog.i18nc("@title:menu menubar:toplevel", "&Edit")
|
||||||
|
|
||||||
UM.MenuItem { action: Cura.Actions.undo }
|
Cura.MenuItem { action: Cura.Actions.undo }
|
||||||
UM.MenuItem { action: Cura.Actions.redo }
|
Cura.MenuItem { action: Cura.Actions.redo }
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
UM.MenuItem { action: Cura.Actions.selectAll }
|
Cura.MenuItem { action: Cura.Actions.selectAll }
|
||||||
UM.MenuItem { action: Cura.Actions.arrangeAll }
|
Cura.MenuItem { action: Cura.Actions.arrangeAll }
|
||||||
UM.MenuItem { action: Cura.Actions.multiplySelection }
|
Cura.MenuItem { action: Cura.Actions.multiplySelection }
|
||||||
UM.MenuItem { action: Cura.Actions.deleteSelection }
|
Cura.MenuItem { action: Cura.Actions.deleteSelection }
|
||||||
UM.MenuItem { action: Cura.Actions.deleteAll }
|
Cura.MenuItem { action: Cura.Actions.deleteAll }
|
||||||
UM.MenuItem { action: Cura.Actions.resetAllTranslation }
|
Cura.MenuItem { action: Cura.Actions.resetAllTranslation }
|
||||||
UM.MenuItem { action: Cura.Actions.resetAll }
|
Cura.MenuItem { action: Cura.Actions.resetAll }
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
UM.MenuItem { action: Cura.Actions.groupObjects }
|
Cura.MenuItem { action: Cura.Actions.groupObjects }
|
||||||
UM.MenuItem { action: Cura.Actions.mergeObjects }
|
Cura.MenuItem { action: Cura.Actions.mergeObjects }
|
||||||
UM.MenuItem { action: Cura.Actions.unGroupObjects }
|
Cura.MenuItem { action: Cura.Actions.unGroupObjects }
|
||||||
}
|
}
|
|
@ -16,7 +16,7 @@ Menu
|
||||||
{
|
{
|
||||||
id: extensionsMenuItem
|
id: extensionsMenuItem
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: modelText
|
text: modelText
|
||||||
onTriggered: extensionsModel.subMenuTriggered(extensionName, modelText)
|
onTriggered: extensionsModel.subMenuTriggered(extensionName, modelText)
|
||||||
|
|
|
@ -14,18 +14,17 @@ Menu
|
||||||
property var fileProviderModel: CuraApplication.getFileProviderModel()
|
property var fileProviderModel: CuraApplication.getFileProviderModel()
|
||||||
|
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
id: newProjectMenu
|
id: newProjectMenu
|
||||||
action: Cura.Actions.newProject
|
action: Cura.Actions.newProject
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
id: openMenu
|
id: openMenu
|
||||||
action: Cura.Actions.open
|
action: Cura.Actions.open
|
||||||
visible: base.fileProviderModel.count == 1
|
visible: base.fileProviderModel.count == 1
|
||||||
height: visible ? implicitHeight: 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenFilesMenu
|
OpenFilesMenu
|
||||||
|
@ -37,13 +36,12 @@ Menu
|
||||||
|
|
||||||
RecentFilesMenu { }
|
RecentFilesMenu { }
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
id: saveWorkspaceMenu
|
id: saveWorkspaceMenu
|
||||||
shortcut: StandardKey.Save
|
shortcut: StandardKey.Save
|
||||||
text: catalog.i18nc("@title:menu menubar:file", "&Save Project...")
|
text: catalog.i18nc("@title:menu menubar:file", "&Save Project...")
|
||||||
visible: saveProjectMenu.model.count == 1
|
visible: saveProjectMenu.model.count == 1
|
||||||
height: visible ? implicitHeight : 0
|
|
||||||
enabled: UM.WorkspaceFileHandler.enabled
|
enabled: UM.WorkspaceFileHandler.enabled
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
|
@ -72,7 +70,7 @@ Menu
|
||||||
|
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
id: saveAsMenu
|
id: saveAsMenu
|
||||||
text: catalog.i18nc("@title:menu menubar:file", "&Export...")
|
text: catalog.i18nc("@title:menu menubar:file", "&Export...")
|
||||||
|
@ -83,7 +81,7 @@ Menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
id: exportSelectionMenu
|
id: exportSelectionMenu
|
||||||
text: catalog.i18nc("@action:inmenu menubar:file", "Export Selection...")
|
text: catalog.i18nc("@action:inmenu menubar:file", "Export Selection...")
|
||||||
|
@ -94,7 +92,7 @@ Menu
|
||||||
|
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
id: reloadAllMenu
|
id: reloadAllMenu
|
||||||
action: Cura.Actions.reloadAll
|
action: Cura.Actions.reloadAll
|
||||||
|
@ -102,5 +100,5 @@ Menu
|
||||||
|
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
|
|
||||||
UM.MenuItem { action: Cura.Actions.quit }
|
Cura.MenuItem { action: Cura.Actions.quit }
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,11 @@ Menu
|
||||||
id: helpMenu
|
id: helpMenu
|
||||||
title: catalog.i18nc("@title:menu menubar:toplevel", "&Help")
|
title: catalog.i18nc("@title:menu menubar:toplevel", "&Help")
|
||||||
|
|
||||||
UM.MenuItem { action: Cura.Actions.showProfileFolder }
|
Cura.MenuItem { action: Cura.Actions.showProfileFolder }
|
||||||
UM.MenuItem { action: Cura.Actions.showTroubleshooting}
|
Cura.MenuItem { action: Cura.Actions.showTroubleshooting}
|
||||||
UM.MenuItem { action: Cura.Actions.documentation }
|
Cura.MenuItem { action: Cura.Actions.documentation }
|
||||||
UM.MenuItem { action: Cura.Actions.reportBug }
|
Cura.MenuItem { action: Cura.Actions.reportBug }
|
||||||
MenuSeparator { }
|
Cura.MenuSeparator { }
|
||||||
UM.MenuItem { action: Cura.Actions.whatsNew }
|
Cura.MenuItem { action: Cura.Actions.whatsNew }
|
||||||
UM.MenuItem { action: Cura.Actions.about }
|
Cura.MenuItem { action: Cura.Actions.about }
|
||||||
}
|
}
|
|
@ -48,18 +48,17 @@ UM.Menu
|
||||||
enabled: updateModels
|
enabled: updateModels
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label:category menu label", "Favorites")
|
text: catalog.i18nc("@label:category menu label", "Favorites")
|
||||||
enabled: false
|
enabled: false
|
||||||
visible: favoriteMaterialsModel.items.length > 0
|
visible: favoriteMaterialsModel.items.length > 0
|
||||||
height: visible ? implicitHeight: 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
model: favoriteMaterialsModel
|
model: favoriteMaterialsModel
|
||||||
delegate: UM.MenuItem
|
delegate: Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: model.brand + " " + model.name
|
text: model.brand + " " + model.name
|
||||||
checkable: true
|
checkable: true
|
||||||
|
@ -81,7 +80,7 @@ UM.Menu
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
model: genericMaterialsModel
|
model: genericMaterialsModel
|
||||||
delegate: UM.MenuItem
|
delegate: Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: model.name
|
text: model.name
|
||||||
checkable: true
|
checkable: true
|
||||||
|
@ -94,12 +93,12 @@ UM.Menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {}
|
Cura.MenuSeparator {}
|
||||||
|
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
model: brandModel
|
model: brandModel
|
||||||
UM.Menu
|
Cura.Menu
|
||||||
{
|
{
|
||||||
id: brandMenu
|
id: brandMenu
|
||||||
title: brandName
|
title: brandName
|
||||||
|
@ -119,7 +118,7 @@ UM.Menu
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
model: brandMaterialColors
|
model: brandMaterialColors
|
||||||
delegate: UM.MenuItem
|
delegate: Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: model.name
|
text: model.name
|
||||||
checkable: true
|
checkable: true
|
||||||
|
@ -140,16 +139,16 @@ UM.Menu
|
||||||
onObjectRemoved: materialMenu.removeMenu(object)
|
onObjectRemoved: materialMenu.removeMenu(object)
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {}
|
Cura.MenuSeparator {}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
action: Cura.Actions.manageMaterials
|
action: Cura.Actions.manageMaterials
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {}
|
Cura.MenuSeparator {}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
action: Cura.Actions.marketplaceMaterials
|
action: Cura.Actions.marketplaceMaterials
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ UM.Menu
|
||||||
{
|
{
|
||||||
model: nozzleModel
|
model: nozzleModel
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: model.hotend_name
|
text: model.hotend_name
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|
|
@ -18,7 +18,7 @@ UM.Menu
|
||||||
{
|
{
|
||||||
id: fileProviders
|
id: fileProviders
|
||||||
model: CuraApplication.getFileProviderModel()
|
model: CuraApplication.getFileProviderModel()
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,6 @@ Menu
|
||||||
//- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar
|
//- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar
|
||||||
title: (Qt.platform.os == "osx") ? "&Preferences" : catalog.i18nc("@title:menu menubar:toplevel", "P&references")
|
title: (Qt.platform.os == "osx") ? "&Preferences" : catalog.i18nc("@title:menu menubar:toplevel", "P&references")
|
||||||
|
|
||||||
UM.MenuItem { action: Cura.Actions.preferences }
|
Cura.MenuItem { action: Cura.Actions.preferences }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Menu
|
||||||
{
|
{
|
||||||
id: menu
|
id: menu
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
id: networkEnabledPrinterItem
|
id: networkEnabledPrinterItem
|
||||||
text: catalog.i18nc("@label:category menu label", "Network enabled printers")
|
text: catalog.i18nc("@label:category menu label", "Network enabled printers")
|
||||||
|
@ -22,8 +22,8 @@ Menu
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
id: networKPrinterInstantiator
|
id: networKPrinterInstantiator
|
||||||
model: Cura.GlobalStacksModel {filterOnlineOnly: true}
|
model: Cura.GlobalStacksModel {filterOnlineOnly: true }
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
property string connectGroupName:
|
property string connectGroupName:
|
||||||
{
|
{
|
||||||
|
@ -42,12 +42,9 @@ Menu
|
||||||
onObjectRemoved: menu.removeItem(object)
|
onObjectRemoved: menu.removeItem(object)
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator
|
Cura.MenuSeparator { visible: networKPrinterInstantiator.count > 0 }
|
||||||
{
|
|
||||||
visible: networKPrinterInstantiator.count > 0
|
|
||||||
}
|
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
id: localPrinterMenu
|
id: localPrinterMenu
|
||||||
text: catalog.i18nc("@label:category menu label", "Local printers")
|
text: catalog.i18nc("@label:category menu label", "Local printers")
|
||||||
|
@ -60,13 +57,12 @@ Menu
|
||||||
id: localPrinterInstantiator
|
id: localPrinterInstantiator
|
||||||
model: Cura.GlobalStacksModel {}
|
model: Cura.GlobalStacksModel {}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: model.name
|
text: model.name
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id == model.id: false
|
checked: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id == model.id: false
|
||||||
visible: !model.hasRemoteConnection
|
visible: !model.hasRemoteConnection
|
||||||
height: visible ? implicitHeight: 0
|
|
||||||
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
||||||
}
|
}
|
||||||
// A bit hackish, but we have 2 items at the end, put them before that
|
// A bit hackish, but we have 2 items at the end, put them before that
|
||||||
|
@ -74,11 +70,8 @@ Menu
|
||||||
onObjectRemoved: menu.removeItem(object)
|
onObjectRemoved: menu.removeItem(object)
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator
|
Cura.MenuSeparator { visible: localPrinterInstantiator.count > 0 }
|
||||||
{
|
|
||||||
visible: localPrinterInstantiator.count > 0
|
|
||||||
}
|
|
||||||
|
|
||||||
UM.MenuItem { action: Cura.Actions.addMachine }
|
Cura.MenuItem { action: Cura.Actions.addMachine }
|
||||||
UM.MenuItem { action: Cura.Actions.configureMachines }
|
Cura.MenuItem { action: Cura.Actions.configureMachines }
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ Menu
|
||||||
id: printerTypeInstantiator
|
id: printerTypeInstantiator
|
||||||
model: outputDevice != null ? outputDevice.connectedPrintersTypeCount : []
|
model: outputDevice != null ? outputDevice.connectedPrintersTypeCount : []
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: modelData.machine_type
|
text: modelData.machine_type
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Controls 2.1
|
import QtQuick.Controls 2.1
|
||||||
|
|
||||||
import UM 1.6 as UM
|
import UM 1.5 as UM
|
||||||
import Cura 1.1 as Cura
|
import Cura 1.1 as Cura
|
||||||
|
|
||||||
import "../Dialogs"
|
import "../Dialogs"
|
||||||
|
@ -18,7 +18,7 @@ UM.Menu
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
id: projectOutputDevices
|
id: projectOutputDevices
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: model.name
|
text: model.name
|
||||||
onTriggered:
|
onTriggered:
|
||||||
|
|
|
@ -44,13 +44,13 @@ Menu
|
||||||
visible: Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasMaterials
|
visible: Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasMaterials
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:inmenu", "Set as Active Extruder")
|
text: catalog.i18nc("@action:inmenu", "Set as Active Extruder")
|
||||||
onTriggered: Cura.ExtruderManager.setActiveExtruderIndex(model.index)
|
onTriggered: Cura.ExtruderManager.setActiveExtruderIndex(model.index)
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:inmenu", "Enable Extruder")
|
text: catalog.i18nc("@action:inmenu", "Enable Extruder")
|
||||||
onTriggered: Cura.MachineManager.setExtruderEnabled(model.index, true)
|
onTriggered: Cura.MachineManager.setExtruderEnabled(model.index, true)
|
||||||
|
@ -58,7 +58,7 @@ Menu
|
||||||
height: visible ? implicitHeight: 0
|
height: visible ? implicitHeight: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:inmenu", "Disable Extruder")
|
text: catalog.i18nc("@action:inmenu", "Disable Extruder")
|
||||||
onTriggered: Cura.MachineManager.setExtruderEnabled(index, false)
|
onTriggered: Cura.MachineManager.setExtruderEnabled(index, false)
|
||||||
|
@ -71,7 +71,7 @@ Menu
|
||||||
onObjectRemoved: base.removeMenu(object)
|
onObjectRemoved: base.removeMenu(object)
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator { }
|
Cura.MenuSeparator { }
|
||||||
|
|
||||||
UM.MenuItem { action: Cura.Actions.configureSettingVisibility }
|
Cura.MenuItem { action: Cura.Actions.configureSettingVisibility }
|
||||||
}
|
}
|
|
@ -15,12 +15,12 @@ Menu
|
||||||
Menu
|
Menu
|
||||||
{
|
{
|
||||||
title: catalog.i18nc("@action:inmenu menubar:view", "&Camera position")
|
title: catalog.i18nc("@action:inmenu menubar:view", "&Camera position")
|
||||||
UM.MenuItem { action: Cura.Actions.view3DCamera }
|
Cura.MenuItem { action: Cura.Actions.view3DCamera }
|
||||||
UM.MenuItem { action: Cura.Actions.viewFrontCamera }
|
Cura.MenuItem { action: Cura.Actions.viewFrontCamera }
|
||||||
UM.MenuItem { action: Cura.Actions.viewTopCamera }
|
Cura.MenuItem { action: Cura.Actions.viewTopCamera }
|
||||||
UM.MenuItem { action: Cura.Actions.viewBottomCamera }
|
Cura.MenuItem { action: Cura.Actions.viewBottomCamera }
|
||||||
UM.MenuItem { action: Cura.Actions.viewLeftSideCamera }
|
Cura.MenuItem { action: Cura.Actions.viewLeftSideCamera }
|
||||||
UM.MenuItem { action: Cura.Actions.viewRightSideCamera }
|
Cura.MenuItem { action: Cura.Actions.viewRightSideCamera }
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu
|
Menu
|
||||||
|
@ -43,7 +43,7 @@ Menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:inmenu menubar:view", "Perspective")
|
text: catalog.i18nc("@action:inmenu menubar:view", "Perspective")
|
||||||
checkable: true
|
checkable: true
|
||||||
|
@ -54,7 +54,7 @@ Menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:inmenu menubar:view", "Orthographic")
|
text: catalog.i18nc("@action:inmenu menubar:view", "Orthographic")
|
||||||
checkable: true
|
checkable: true
|
||||||
|
@ -66,9 +66,9 @@ Menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {}
|
Cura.MenuSeparator {}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
action: Cura.Actions.toggleFullScreen
|
action: Cura.Actions.toggleFullScreen
|
||||||
}
|
}
|
||||||
|
|
|
@ -416,37 +416,34 @@ Item
|
||||||
property var provider
|
property var provider
|
||||||
property bool settingVisible
|
property bool settingVisible
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
//: Settings context menu action
|
//: Settings context menu action
|
||||||
text: catalog.i18nc("@action:menu", "Copy value to all extruders")
|
text: catalog.i18nc("@action:menu", "Copy value to all extruders")
|
||||||
visible: machineExtruderCount.properties.value > 1
|
visible: machineExtruderCount.properties.value > 1
|
||||||
height: visible ? implicitHeight : 0
|
|
||||||
enabled: contextMenu.provider !== undefined && contextMenu.provider.properties.settable_per_extruder !== "False"
|
enabled: contextMenu.provider !== undefined && contextMenu.provider.properties.settable_per_extruder !== "False"
|
||||||
onTriggered: Cura.MachineManager.copyValueToExtruders(contextMenu.key)
|
onTriggered: Cura.MachineManager.copyValueToExtruders(contextMenu.key)
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
//: Settings context menu action
|
//: Settings context menu action
|
||||||
text: catalog.i18nc("@action:menu", "Copy all changed values to all extruders")
|
text: catalog.i18nc("@action:menu", "Copy all changed values to all extruders")
|
||||||
visible: machineExtruderCount.properties.value > 1
|
visible: machineExtruderCount.properties.value > 1
|
||||||
height: visible ? implicitHeight : 0
|
|
||||||
enabled: contextMenu.provider !== undefined
|
enabled: contextMenu.provider !== undefined
|
||||||
onTriggered: Cura.MachineManager.copyAllValuesToExtruders()
|
onTriggered: Cura.MachineManager.copyAllValuesToExtruders()
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator
|
Cura.MenuSeparator
|
||||||
{
|
{
|
||||||
visible: machineExtruderCount.properties.value > 1
|
visible: machineExtruderCount.properties.value > 1
|
||||||
height: visible ? implicitHeight : 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
id: customMenuItems
|
id: customMenuItems
|
||||||
model: Cura.SidebarCustomMenuItemsModel { }
|
model: Cura.SidebarCustomMenuItemsModel { }
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
text: model.name
|
text: model.name
|
||||||
onTriggered:
|
onTriggered:
|
||||||
|
@ -458,24 +455,22 @@ Item
|
||||||
onObjectRemoved: contextMenu.removeItem(object)
|
onObjectRemoved: contextMenu.removeItem(object)
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator
|
Cura.MenuSeparator
|
||||||
{
|
{
|
||||||
visible: customMenuItems.count > 0
|
visible: customMenuItems.count > 0
|
||||||
height: visible ? implicitHeight : 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
//: Settings context menu action
|
//: Settings context menu action
|
||||||
visible: !findingSettings
|
visible: !findingSettings
|
||||||
text: catalog.i18nc("@action:menu", "Hide this setting")
|
text: catalog.i18nc("@action:menu", "Hide this setting")
|
||||||
height: visible ? implicitHeight : 0
|
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
definitionsModel.hide(contextMenu.key)
|
definitionsModel.hide(contextMenu.key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
//: Settings context menu action
|
//: Settings context menu action
|
||||||
text:
|
text:
|
||||||
|
@ -490,7 +485,6 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
visible: findingSettings
|
visible: findingSettings
|
||||||
height: visible ? implicitHeight : 0
|
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
if (contextMenu.settingVisible)
|
if (contextMenu.settingVisible)
|
||||||
|
@ -503,7 +497,7 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UM.MenuItem
|
Cura.MenuItem
|
||||||
{
|
{
|
||||||
//: Settings context menu action
|
//: Settings context menu action
|
||||||
text: catalog.i18nc("@action:menu", "Configure setting visibility...")
|
text: catalog.i18nc("@action:menu", "Configure setting visibility...")
|
||||||
|
|
|
@ -4,18 +4,17 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import UM 1.1 as UM
|
import UM 1.5 as UM
|
||||||
|
|
||||||
//
|
//
|
||||||
// MenuItem with Cura styling.
|
// MenuItem with Cura styling.
|
||||||
//
|
//
|
||||||
MenuItem
|
UM.MenuItem
|
||||||
{
|
{
|
||||||
id: menuItem
|
id: menuItem
|
||||||
|
|
||||||
implicitHeight: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("narrow_margin").height
|
implicitHeight: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("narrow_margin").height
|
||||||
opacity: enabled ? 1.0 : 0.5
|
opacity: enabled ? 1.0 : 0.5
|
||||||
height: visible ? implicitHeight : 0
|
|
||||||
|
|
||||||
arrow: UM.RecolorImage
|
arrow: UM.RecolorImage
|
||||||
{
|
{
|
||||||
|
@ -42,20 +41,8 @@ MenuItem
|
||||||
color: UM.Theme.getColor("setting_control_text")
|
color: UM.Theme.getColor("setting_control_text")
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
background: Rectangle
|
||||||
leftPadding: menuItem.checkable ? menuItem.indicator.width + UM.Theme.getSize("default_margin").width : UM.Theme.getSize("thin_margin").width
|
{
|
||||||
rightPadding: menuItem.subMenu ? menuItem.arrow.width + UM.Theme.getSize("default_margin").width : UM.Theme.getSize("thin_margin").width
|
|
||||||
text: menuItem.text
|
|
||||||
|
|
||||||
textFormat: Text.PlainText
|
|
||||||
renderType: Text.NativeRendering
|
|
||||||
color: UM.Theme.getColor("setting_control_text")
|
|
||||||
font: UM.Theme.getFont("default")
|
|
||||||
elide: Text.ElideRight
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
background: Rectangle {
|
|
||||||
x: UM.Theme.getSize("default_lining").width
|
x: UM.Theme.getSize("default_lining").width
|
||||||
y: UM.Theme.getSize("default_lining").width
|
y: UM.Theme.getSize("default_lining").width
|
||||||
width: menuItem.width - 2 * UM.Theme.getSize("default_lining").width
|
width: menuItem.width - 2 * UM.Theme.getSize("default_lining").width
|
||||||
|
|
|
@ -12,7 +12,6 @@ import UM 1.1 as UM
|
||||||
MenuSeparator
|
MenuSeparator
|
||||||
{
|
{
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
||||||
contentItem: Rectangle {
|
contentItem: Rectangle {
|
||||||
implicitHeight: UM.Theme.getSize("default_lining").height
|
implicitHeight: UM.Theme.getSize("default_lining").height
|
||||||
color: UM.Theme.getColor("setting_control_border")
|
color: UM.Theme.getColor("setting_control_border")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue