diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index b0bcf3b100..9089ba96e9 100755 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -63,7 +63,7 @@ class ExtruderManager(QObject): if not self._application.getGlobalContainerStack(): return None # No active machine, so no active extruder. try: - return self._extruder_trains[self._application.getGlobalContainerStack().getId()][str(self.activeExtruderIndex)].getId() + return self._extruder_trains[self._application.getGlobalContainerStack().getId()][str(self._active_extruder_index)].getId() except KeyError: # Extruder index could be -1 if the global tab is selected, or the entry doesn't exist if the machine definition is wrong. return None @@ -144,7 +144,7 @@ class ExtruderManager(QObject): @pyqtSlot(result = QObject) def getActiveExtruderStack(self) -> Optional["ExtruderStack"]: - return self.getExtruderStack(self.activeExtruderIndex) + return self.getExtruderStack(self._active_extruder_index) ## Get an extruder stack by index def getExtruderStack(self, index) -> Optional["ExtruderStack"]: diff --git a/cura/Settings/ExtruderStack.py b/cura/Settings/ExtruderStack.py index d626ef06da..d7faedb71c 100644 --- a/cura/Settings/ExtruderStack.py +++ b/cura/Settings/ExtruderStack.py @@ -52,8 +52,8 @@ class ExtruderStack(CuraContainerStack): return super().getNextStack() def setEnabled(self, enabled: bool) -> None: - if self.getMetaDataEntry("enabled", True) == enabled: #No change. - return #Don't emit a signal then. + if "enabled" not in self._metadata: + self.setMetaDataEntry("enabled", "True") self.setMetaDataEntry("enabled", str(enabled)) self.enabledChanged.emit() diff --git a/cura/Settings/ExtrudersModel.py b/cura/Settings/ExtrudersModel.py index 5f10ac99d4..14a8dadc69 100644 --- a/cura/Settings/ExtrudersModel.py +++ b/cura/Settings/ExtrudersModel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 Ultimaker B.V. +# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot, pyqtProperty, QTimer @@ -165,7 +165,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): def __updateExtruders(self): extruders_changed = False - if self.count != 0: + if self.rowCount() != 0: extruders_changed = True items = [] @@ -177,7 +177,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): machine_extruder_count = global_container_stack.getProperty("machine_extruder_count", "value") for extruder in Application.getInstance().getExtruderManager().getActiveExtruderStacks(): - position = extruder.getMetaDataEntry("position", default = "0") + position = extruder.getMetaDataEntry("position", default = "0") # Get the position try: position = int(position) except ValueError: diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index a472cc7f09..53390ca88d 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -874,7 +874,7 @@ class MachineManager(QObject): caution_message = Message(catalog.i18nc( "@info:generic", "Settings have been changed to match the current availability of extruders: [%s]" % ", ".join(add_user_changes)), - lifetime = 0, + lifetime=0, title = catalog.i18nc("@info:title", "Settings updated")) caution_message.show() @@ -1553,7 +1553,7 @@ class MachineManager(QObject): elif word.isdigit(): abbr_machine += word else: - stripped_word = "".join(char for char in unicodedata.normalize("NFD", word.upper()) if unicodedata.category(char) != "Mn") + stripped_word = ''.join(char for char in unicodedata.normalize('NFD', word.upper()) if unicodedata.category(char) != 'Mn') # - use only the first character if the word is too long (> 3 characters) # - use the whole word if it's not too long (<= 3 characters) if len(stripped_word) > 3: diff --git a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py index 71c96880e8..594bf3a43e 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py @@ -195,7 +195,7 @@ class ProcessSlicedLayersJob(Job): if extruders: material_color_map = numpy.zeros((len(extruders), 4), dtype=numpy.float32) for extruder in extruders: - position = int(extruder.getMetaDataEntry("position", default = "0")) + position = int(extruder.getMetaDataEntry("position", default="0")) # Get the position try: default_color = ExtrudersModel.defaultColors[position] except IndexError: diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index c88a721a84..004b4e3cfc 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2016 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 @@ -23,7 +23,7 @@ Cura.MachineAction target: base.extrudersModel onModelChanged: { - var extruderCount = base.extrudersModel.count; + var extruderCount = base.extrudersModel.rowCount(); base.extruderTabsCount = extruderCount; } } diff --git a/plugins/ModelChecker/ModelChecker.qml b/plugins/ModelChecker/ModelChecker.qml index 437df29516..5e41591d6b 100644 --- a/plugins/ModelChecker/ModelChecker.qml +++ b/plugins/ModelChecker/ModelChecker.qml @@ -33,6 +33,7 @@ Button { width: UM.Theme.getSize("save_button_specs_icons").width; height: UM.Theme.getSize("save_button_specs_icons").height; + sourceSize.width: width; sourceSize.height: width; color: control.hovered ? UM.Theme.getColor("text_scene_hover") : UM.Theme.getColor("text_scene"); source: "model_checker.svg" diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 0e2bd88619..5d4e17a102 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -265,6 +265,7 @@ Item { anchors.verticalCenter: parent.verticalCenter width: parent.width height: width + sourceSize.width: width sourceSize.height: width color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button") source: UM.Theme.getIcon("minus") diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index 3fa10c23b9..bd4d361d35 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -141,6 +141,7 @@ UM.Dialog anchors.horizontalCenter: parent.horizontalCenter width: Math.round(control.width / 2.7) height: Math.round(control.height / 2.7) + sourceSize.width: width sourceSize.height: width color: palette.text source: UM.Theme.getIcon("cross1") @@ -175,6 +176,7 @@ UM.Dialog anchors.horizontalCenter: parent.horizontalCenter width: Math.round(control.width / 2.5) height: Math.round(control.height / 2.5) + sourceSize.width: width sourceSize.height: width color: control.enabled ? palette.text : disabledPalette.text source: UM.Theme.getIcon("arrow_bottom") @@ -209,6 +211,7 @@ UM.Dialog anchors.horizontalCenter: parent.horizontalCenter width: Math.round(control.width / 2.5) height: Math.round(control.height / 2.5) + sourceSize.width: width sourceSize.height: width color: control.enabled ? palette.text : disabledPalette.text source: UM.Theme.getIcon("arrow_top") @@ -495,6 +498,7 @@ UM.Dialog anchors.horizontalCenter: parent.horizontalCenter width: Math.round(parent.width / 2) height: Math.round(parent.height / 2) + sourceSize.width: width sourceSize.height: height color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") : control.pressed ? UM.Theme.getColor("action_button_active_text") : diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index fa94bc88b2..10b4262f01 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -61,7 +61,7 @@ Item color: UM.Theme.getColor("lining") } - Cura.ConfigurationMenu + Cura.QuickConfigurationSelector { Layout.fillHeight: true Layout.fillWidth: true @@ -107,6 +107,7 @@ Item height: UM.Theme.getSize("button_icon").height color: UM.Theme.getColor("toolbar_button_text") + sourceSize.width: width sourceSize.height: height } } diff --git a/plugins/SimulationView/SimulationViewMainComponent.qml b/plugins/SimulationView/SimulationViewMainComponent.qml index 16b049c921..16b9aeaae6 100644 --- a/plugins/SimulationView/SimulationViewMainComponent.qml +++ b/plugins/SimulationView/SimulationViewMainComponent.qml @@ -61,9 +61,10 @@ Item iconSource: !is_simulation_playing ? "./resources/simulation_resume.svg": "./resources/simulation_pause.svg" width: UM.Theme.getSize("small_button").width height: UM.Theme.getSize("small_button").height - hoverColor: UM.Theme.getColor("slider_handle_active") - color: UM.Theme.getColor("slider_handle") - iconMargin: UM.Theme.getSize("thick_lining").width + hoverBackgroundColor: UM.Theme.getColor("small_button_hover") + hoverColor: UM.Theme.getColor("small_button_text_hover") + color: UM.Theme.getColor("small_button_text") + iconMargin: 0.5 * UM.Theme.getSize("wide_lining").width visible: !UM.SimulationView.compatibilityMode Connections diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index 9c1df0c49e..4aaea20813 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -86,13 +86,13 @@ Item Label { text: catalog.i18nc("@label", "Website") + ":" - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text_medium") } Label { text: catalog.i18nc("@label", "Email") + ":" - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text_medium") } } @@ -118,7 +118,7 @@ Item } return "" } - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") linkColor: UM.Theme.getColor("text_link") onLinkActivated: Qt.openUrlExternally(link) @@ -134,7 +134,7 @@ Item } return "" } - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") linkColor: UM.Theme.getColor("text_link") onLinkActivated: Qt.openUrlExternally(link) diff --git a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml index d4c0ae14eb..4a6268df42 100644 --- a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml +++ b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml @@ -228,7 +228,7 @@ Item return result } - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") linkColor: UM.Theme.getColor("text_link") onLinkActivated: Qt.openUrlExternally(link) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index 9e2e178b71..c5e9bb0a49 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -82,25 +82,25 @@ Item Label { text: catalog.i18nc("@label", "Version") + ":" - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text_medium") } Label { text: catalog.i18nc("@label", "Last updated") + ":" - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text_medium") } Label { text: catalog.i18nc("@label", "Author") + ":" - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text_medium") } Label { text: catalog.i18nc("@label", "Downloads") + ":" - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text_medium") } } @@ -119,7 +119,7 @@ Item Label { text: details === null ? "" : (details.version || catalog.i18nc("@label", "Unknown")) - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") } Label @@ -133,7 +133,7 @@ Item var date = new Date(details.last_updated) return date.toLocaleString(UM.Preferences.getValue("general/language")) } - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") } Label @@ -149,7 +149,7 @@ Item return "" + details.author_name + "" } } - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") linkColor: UM.Theme.getColor("text_link") onLinkActivated: Qt.openUrlExternally(link) @@ -157,7 +157,7 @@ Item Label { text: details === null ? "" : (details.download_count || catalog.i18nc("@label", "Unknown")) - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") } } diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index 61374f9d99..887140bbfa 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -52,6 +52,7 @@ Item bottom: parent.bottom right: parent.right } + sourceSize.width: width sourceSize.height: height visible: installedPackages != 0 color: (installedPackages == packageCount) ? UM.Theme.getColor("primary") : UM.Theme.getColor("border") @@ -80,7 +81,7 @@ Item width: parent.width wrapMode: Text.WordWrap color: UM.Theme.getColor("text_medium") - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") } } } diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml index 8a2fdc8bc8..4fb70541d2 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml @@ -48,6 +48,8 @@ Rectangle right: parent.right bottomMargin: UM.Theme.getSize("default_lining").width } + sourceSize.width: width + sourceSize.height: height visible: installedPackages != 0 color: (installedPackages == packageCount) ? UM.Theme.getColor("primary") : UM.Theme.getColor("border") source: "../images/installed_check.svg" diff --git a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml index bb710127fc..967adfc029 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml @@ -64,7 +64,6 @@ Cura.MachineAction width: parent.width text: catalog.i18nc("@title:window", "Connect to Networked Printer") wrapMode: Text.WordWrap - renderType: Text.NativeRendering font.pointSize: 18 } @@ -73,7 +72,6 @@ Cura.MachineAction id: pageDescription width: parent.width wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: catalog.i18nc("@label", "To print directly to your printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your printer, you can still use a USB drive to transfer g-code files to your printer.\n\nSelect your printer from the list below:") } @@ -184,7 +182,6 @@ Cura.MachineAction text: listview.model[index].name color: parent.ListView.isCurrentItem ? palette.highlightedText : palette.text elide: Text.ElideRight - renderType: Text.NativeRendering } MouseArea @@ -207,7 +204,6 @@ Cura.MachineAction anchors.left: parent.left anchors.right: parent.right wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: catalog.i18nc("@label", "If your printer is not listed, read the network printing troubleshooting guide").arg("https://ultimaker.com/en/troubleshooting"); onLinkActivated: Qt.openUrlExternally(link) } @@ -225,7 +221,6 @@ Cura.MachineAction text: base.selectedDevice ? base.selectedDevice.name : "" font: UM.Theme.getFont("large") elide: Text.ElideRight - renderType: Text.NativeRendering } Grid { @@ -236,14 +231,12 @@ Cura.MachineAction { width: Math.round(parent.width * 0.5) wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: catalog.i18nc("@label", "Type") } Label { width: Math.round(parent.width * 0.5) wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: { if(base.selectedDevice) @@ -275,28 +268,24 @@ Cura.MachineAction { width: Math.round(parent.width * 0.5) wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: catalog.i18nc("@label", "Firmware version") } Label { width: Math.round(parent.width * 0.5) wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: base.selectedDevice ? base.selectedDevice.firmwareVersion : "" } Label { width: Math.round(parent.width * 0.5) wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: catalog.i18nc("@label", "Address") } Label { width: Math.round(parent.width * 0.5) wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: base.selectedDevice ? base.selectedDevice.ipAddress : "" } } @@ -305,7 +294,6 @@ Cura.MachineAction { width: parent.width wrapMode: Text.WordWrap - renderType: Text.NativeRendering text:{ // The property cluster size does not exist for older UM3 devices. if(!base.selectedDevice || base.selectedDevice.clusterSize == null || base.selectedDevice.clusterSize == 1) @@ -327,7 +315,6 @@ Cura.MachineAction { width: parent.width wrapMode: Text.WordWrap - renderType: Text.NativeRendering visible: base.selectedDevice != null && !base.completeProperties text: catalog.i18nc("@label", "The printer at this address has not yet responded." ) } @@ -371,10 +358,9 @@ Cura.MachineAction Label { - text: catalog.i18nc("@alabel", "Enter the IP address or hostname of your printer on the network.") + text: catalog.i18nc("@alabel","Enter the IP address or hostname of your printer on the network.") width: parent.width wrapMode: Text.WordWrap - renderType: Text.NativeRendering } TextField diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml index 7edeb81a96..9ffb1eabb4 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml @@ -52,7 +52,7 @@ Item id: buildplateLabel color: "#191919" // TODO: Theme! elide: Text.ElideRight - font: UM.Theme.getFont("default") // 12pt, regular + font: UM.Theme.getFont("very_small") // 12pt, regular text: "" // FIXED-LINE-HEIGHT: diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml index 1e53191d8c..afbd4c3641 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml @@ -49,7 +49,7 @@ Item } color: "#191919" // TODO: Theme! elide: Text.ElideRight - font: UM.Theme.getFont("default") // 12pt, regular + font: UM.Theme.getFont("very_small") // 12pt, regular text: "" // FIXED-LINE-HEIGHT: @@ -66,7 +66,7 @@ Item } color: "#191919" // TODO: Theme! elide: Text.ElideRight - font: UM.Theme.getFont("default_bold") // 12pt, bold + font: UM.Theme.getFont("small") // 12pt, bold text: "" // FIXED-LINE-HEIGHT: diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index 567fff8489..8659037cb8 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -179,15 +179,13 @@ Item color: "#414054" // TODO: Theme! font: UM.Theme.getFont("large") // 16pt, bold text: { - if (printer && printer.state == "disabled") - { + if (printer && printer.state == "disabled"){ return catalog.i18nc("@label:status", "Unavailable") } - if (printer && printer.state == "unreachable") - { - return catalog.i18nc("@label:status", "Unreachable") + if (printer && printer.state == "unreachable"){ + return catalog.i18nc("@label:status", "Unavailable") } - if (printer && printer.state == "idle") + if (printer && !printer.activePrintJob) { return catalog.i18nc("@label:status", "Idle") } diff --git a/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py index a5ee3bc650..cc5b128479 100644 --- a/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py @@ -572,17 +572,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): def _createMaterialOutputModel(self, material_data: Dict[str, Any]) -> "MaterialOutputModel": material_manager = CuraApplication.getInstance().getMaterialManager() - material_group_list = material_manager.getMaterialGroupListByGUID(material_data["guid"]) - # This can happen if the connected machine has no material in one or more extruders (if GUID is empty), or the - # material is unknown to Cura, so we should return an "empty" or "unknown" material model. - if material_group_list is None: - material_name = "Empty" if len(material_data["guid"]) == 0 else "Unknown" - return MaterialOutputModel(guid = material_data["guid"], - type = material_data.get("type", ""), - color = material_data.get("color", ""), - brand = material_data.get("brand", ""), - name = material_data.get("name", material_name) - ) + material_group_list = material_manager.getMaterialGroupListByGUID(material_data["guid"]) or [] # Sort the material groups by "is_read_only = True" first, and then the name alphabetically. read_only_material_group_list = list(filter(lambda x: x.is_read_only, material_group_list)) diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index fc4a1c05f4..b9a04f3b46 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -7,17 +7,14 @@ import QtQuick.Controls 2.1 import QtGraphicalEffects 1.0 // For the dropshadow import UM 1.1 as UM -import Cura 1.0 as Cura Button { id: button - property alias iconSource: buttonIconLeft.source - property bool isIconOnRightSide: false + property alias iconSource: buttonIcon.source property alias textFont: buttonText.font property alias cornerRadius: backgroundRect.radius property alias tooltip: tooltip.text - property alias cornerSide: backgroundRect.cornerSide property color color: UM.Theme.getColor("primary") property color hoverColor: UM.Theme.getColor("primary_hover") @@ -39,21 +36,18 @@ Button // we elide the text to the right so the text will be cut off with the three dots at the end. property var fixedWidthMode: false - leftPadding: UM.Theme.getSize("default_margin").width - rightPadding: UM.Theme.getSize("default_margin").width - height: UM.Theme.getSize("action_button").height - contentItem: Row { - //Left side icon. Only displayed if !isIconOnRightSide. UM.RecolorImage { - id: buttonIconLeft + id: buttonIcon source: "" - height: buttonText.height - width: visible ? height : 0 + height: Math.round(0.6 * parent.height) + width: height + sourceSize.width: width + sourceSize.height: height color: button.hovered ? button.textHoverColor : button.textColor - visible: source != "" && !button.isIconOnRightSide + visible: source != "" anchors.verticalCenter: parent.verticalCenter } @@ -70,24 +64,11 @@ Button horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight } - - //Right side icon. Only displayed if isIconOnRightSide. - UM.RecolorImage - { - id: buttonIconRight - source: buttonIconLeft.source - height: buttonText.height - width: visible ? height : 0 - color: buttonIconLeft.color - visible: source != "" && button.isIconOnRightSide - anchors.verticalCenter: buttonIconLeft.verticalCenter - } } - background: Cura.RoundedRectangle + background: Rectangle { id: backgroundRect - cornerSide: Cura.RoundedRectangle.Direction.All color: button.enabled ? (button.hovered ? button.hoverColor : button.color) : button.disabledColor radius: UM.Theme.getSize("action_button_radius").width border.width: UM.Theme.getSize("default_lining").width diff --git a/resources/qml/ActionPanel/OutputDevicesActionButton.qml b/resources/qml/ActionPanel/OutputDevicesActionButton.qml index 95750e6d11..2111038cfc 100644 --- a/resources/qml/ActionPanel/OutputDevicesActionButton.qml +++ b/resources/qml/ActionPanel/OutputDevicesActionButton.qml @@ -17,7 +17,6 @@ Item id: saveToButton height: parent.height fixedWidthMode: true - cornerSide: deviceSelectionMenu.visible ? Cura.RoundedRectangle.Direction.Left : Cura.RoundedRectangle.Direction.All anchors { @@ -45,7 +44,6 @@ Item shadowEnabled: true shadowColor: UM.Theme.getColor("primary_shadow") - cornerSide: Cura.RoundedRectangle.Direction.Right anchors { @@ -53,8 +51,6 @@ Item right: parent.right } - leftPadding: UM.Theme.getSize("narrow_margin").width //Need more space than usual here for wide text. - rightPadding: UM.Theme.getSize("narrow_margin").width tooltip: catalog.i18nc("@info:tooltip", "Select the active output device") iconSource: popup.opened ? UM.Theme.getIcon("arrow_top") : UM.Theme.getIcon("arrow_bottom") color: UM.Theme.getColor("action_panel_secondary") diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml index 1d1a1e44e1..6ab8dc6fbb 100644 --- a/resources/qml/ActionPanel/OutputProcessWidget.qml +++ b/resources/qml/ActionPanel/OutputProcessWidget.qml @@ -51,7 +51,7 @@ Column text: preSlicedData ? catalog.i18nc("@label", "No time estimation available") : PrintInformation.currentPrintTime.getDisplayString(UM.DurationFormat.Long) source: UM.Theme.getIcon("clock") - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("small") } Cura.IconLabel @@ -84,7 +84,7 @@ Column return totalWeights + "g ยท " + totalLengths.toFixed(2) + "m" } source: UM.Theme.getIcon("spool") - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") } } @@ -101,25 +101,17 @@ Column } } - Item + Row { id: buttonRow - anchors.right: parent.right - anchors.left: parent.left - height: UM.Theme.getSize("action_button").height + spacing: UM.Theme.getSize("default_margin").width + width: parent.width Cura.SecondaryButton { id: previewStageShortcut - anchors - { - left: parent.left - right: outputDevicesButton.left - rightMargin: UM.Theme.getSize("default_margin").width - } - - height: UM.Theme.getSize("action_button").height + height: UM.Theme.getSize("action_panel_button").height leftPadding: UM.Theme.getSize("default_margin").width rightPadding: UM.Theme.getSize("default_margin").width text: catalog.i18nc("@button", "Preview") @@ -133,11 +125,8 @@ Column Cura.OutputDevicesActionButton { - id: outputDevicesButton - - anchors.right: parent.right - width: previewStageShortcut.visible ? UM.Theme.getSize("action_button").width : parent.width - height: UM.Theme.getSize("action_button").height + width: previewStageShortcut.visible ? UM.Theme.getSize("action_panel_button").width : parent.width + height: UM.Theme.getSize("action_panel_button").height } } } \ No newline at end of file diff --git a/resources/qml/ActionPanel/PrintInformationWidget.qml b/resources/qml/ActionPanel/PrintInformationWidget.qml index 554273a818..25e380dea8 100644 --- a/resources/qml/ActionPanel/PrintInformationWidget.qml +++ b/resources/qml/ActionPanel/PrintInformationWidget.qml @@ -15,6 +15,9 @@ UM.RecolorImage width: UM.Theme.getSize("section_icon").width height: UM.Theme.getSize("section_icon").height + sourceSize.width: width + sourceSize.height: height + color: popup.opened ? UM.Theme.getColor("primary") : UM.Theme.getColor("text_medium") MouseArea diff --git a/resources/qml/ActionPanel/PrintJobInformation.qml b/resources/qml/ActionPanel/PrintJobInformation.qml index 8bd5d5a0d3..156111af4d 100644 --- a/resources/qml/ActionPanel/PrintJobInformation.qml +++ b/resources/qml/ActionPanel/PrintJobInformation.qml @@ -30,7 +30,7 @@ Column { text: catalog.i18nc("@label", "Time specification").toUpperCase() color: UM.Theme.getColor("primary") - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("small") renderType: Text.NativeRendering } @@ -61,7 +61,7 @@ Column } width: parent.width - 2 * UM.Theme.getSize("default_margin").width color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") renderType: Text.NativeRendering textFormat: Text.RichText } @@ -79,7 +79,7 @@ Column { text: catalog.i18nc("@label", "Material specification").toUpperCase() color: UM.Theme.getColor("primary") - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("small") renderType: Text.NativeRendering } @@ -151,7 +151,7 @@ Column } width: parent.width - 2 * UM.Theme.getSize("default_margin").width color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") renderType: Text.NativeRendering textFormat: Text.RichText } diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml index 8f6608e15c..03d91db530 100644 --- a/resources/qml/ActionPanel/SliceProcessWidget.qml +++ b/resources/qml/ActionPanel/SliceProcessWidget.qml @@ -48,7 +48,7 @@ Column text: catalog.i18nc("@label:PrintjobStatus", "Auto slicing...") color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") renderType: Text.NativeRendering } @@ -61,7 +61,7 @@ Column text: catalog.i18nc("@label:PrintjobStatus", "Unable to Slice") source: UM.Theme.getIcon("warning") color: UM.Theme.getColor("warning") - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") } // Progress bar, only visible when the backend is in the process of slice the printjob @@ -94,6 +94,7 @@ Column } } + Item { id: prepareButtons @@ -102,7 +103,7 @@ Column // Disable the slice process when width: parent.width - height: UM.Theme.getSize("action_button").height + height: UM.Theme.getSize("action_panel_button").height visible: !autoSlice Cura.PrimaryButton { diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 4e8e9ce788..3578888886 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -88,54 +88,6 @@ UM.MainWindow window: base } - Rectangle - { - id: headerBackground - anchors - { - top: applicationMenu.bottom - left: parent.left - right: parent.right - } - height: stageMenu.source != "" ? Math.round(mainWindowHeader.height + stageMenu.height / 2) : mainWindowHeader.height - - LinearGradient - { - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(parent.width, 0) - gradient: Gradient - { - GradientStop - { - position: 0.0 - color: UM.Theme.getColor("main_window_header_background") - } - GradientStop - { - position: 0.5 - color: UM.Theme.getColor("main_window_header_background_gradient") - } - GradientStop - { - position: 1.0 - color: UM.Theme.getColor("main_window_header_background") - } - } - } - - // This is the new fancy pattern - Image - { - id: backgroundPattern - anchors.fill: parent - fillMode: Image.Tile - source: UM.Theme.getImage("header_pattern") - horizontalAlignment: Image.AlignLeft - verticalAlignment: Image.AlignTop - } - } - MainWindowHeader { id: mainWindowHeader @@ -192,6 +144,44 @@ UM.MainWindow } } + Rectangle + { + id: stageMenuBackground + anchors + { + left: parent.left + right: parent.right + top: parent.top + } + visible: stageMenu.source != "" + height: visible ? Math.round(UM.Theme.getSize("stage_menu").height / 2) : 0 + + LinearGradient + { + anchors.fill: parent + start: Qt.point(0, 0) + end: Qt.point(parent.width, 0) + gradient: Gradient + { + GradientStop + { + position: 0.0 + color: UM.Theme.getColor("main_window_header_background") + } + GradientStop + { + position: 0.5 + color: UM.Theme.getColor("main_window_header_background_gradient") + } + GradientStop + { + position: 1.0 + color: UM.Theme.getColor("main_window_header_background") + } + } + } + } + Connections { target: stageMenu.item @@ -267,8 +257,7 @@ UM.MainWindow anchors { - // Align to the top of the stageMenu since the stageMenu may not exist - top: parent.top + top: stageMenuBackground.bottom left: parent.left right: parent.right bottom: parent.bottom diff --git a/resources/qml/CustomConfigurationSelector.qml b/resources/qml/CustomConfigurationSelector.qml new file mode 100644 index 0000000000..c78ca700da --- /dev/null +++ b/resources/qml/CustomConfigurationSelector.qml @@ -0,0 +1,357 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.7 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 + +import UM 1.2 as UM +import Cura 1.0 as Cura + +Rectangle +{ + implicitWidth: parent.width + implicitHeight: parent.height + + id: base + color: UM.Theme.getColor("main_background") + + // Height has an extra 2x margin for the top & bottom margin. + height: childrenRect.height + 2 * UM.Theme.getSize("default_margin").width + + Cura.ExtrudersModel { id: extrudersModel } + + ListView + { + // Horizontal list that shows the extruders + id: extrudersList + visible: extrudersModel.items.length > 1 + property var index: 0 + + height: UM.Theme.getSize("configuration_selector_mode_tabs").height + boundsBehavior: Flickable.StopAtBounds + + anchors + { + left: parent.left + right: parent.right + top: parent.top + margins: UM.Theme.getSize("thick_margin").width + } + + ExclusiveGroup { id: extruderMenuGroup } + + orientation: ListView.Horizontal + + model: extrudersModel + + Connections + { + target: Cura.MachineManager + onGlobalContainerChanged: forceActiveFocus() // Changing focus applies the currently-being-typed values so it can change the displayed setting values. + } + + delegate: Button + { + height: parent.height + width: Math.round(ListView.view.width / extrudersModel.rowCount()) + + text: model.name + tooltip: model.name + exclusiveGroup: extruderMenuGroup + checked: Cura.ExtruderManager.activeExtruderIndex == index + + property bool extruder_enabled: true + + MouseArea // TODO; This really should be fixed. It makes absolutely no sense to have a button AND a mouse area. + { + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: + { + switch (mouse.button) + { + case Qt.LeftButton: + extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled + if (extruder_enabled) + { + forceActiveFocus() // Changing focus applies the currently-being-typed values so it can change the displayed setting values. + Cura.ExtruderManager.setActiveExtruderIndex(index) + } + break + case Qt.RightButton: + extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled + extruderMenu.popup() + break + } + } + } + + Menu + { + id: extruderMenu + + MenuItem + { + text: catalog.i18nc("@action:inmenu", "Enable Extruder") + onTriggered: Cura.MachineManager.setExtruderEnabled(model.index, true) + visible: !extruder_enabled // using an intermediate variable prevents an empty popup that occured now and then + } + + MenuItem + { + text: catalog.i18nc("@action:inmenu", "Disable Extruder") + onTriggered: Cura.MachineManager.setExtruderEnabled(model.index, false) + visible: extruder_enabled + enabled: Cura.MachineManager.numberExtrudersEnabled > 1 + } + } + + style: ButtonStyle + { + background: Rectangle + { + anchors.fill: parent + border.width: control.checked ? UM.Theme.getSize("default_lining").width * 2 : UM.Theme.getSize("default_lining").width + border.color: + { + if (Cura.MachineManager.getExtruder(index).isEnabled) + { + if(control.checked || control.pressed) + { + return UM.Theme.getColor("action_button_active_border") + } + else if (control.hovered) + { + return UM.Theme.getColor("action_button_hovered_border") + } + return UM.Theme.getColor("action_button_border") + } + return UM.Theme.getColor("action_button_disabled_border") + } + color: + { + if (Cura.MachineManager.getExtruder(index).isEnabled) + { + if(control.checked || control.pressed) + { + return UM.Theme.getColor("action_button_active"); + } + else if (control.hovered) + { + return UM.Theme.getColor("action_button_hovered") + } + return UM.Theme.getColor("action_button") + } + return UM.Theme.getColor("action_button_disabled") + } + Behavior on color { ColorAnimation { duration: 50; } } + + Item + { + id: extruderButtonFace + anchors.centerIn: parent + width: childrenRect.width + + Label + { + // Static text that holds the "Extruder" label + id: extruderStaticText + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + + color: + { + if (Cura.MachineManager.getExtruder(index).isEnabled) + { + if(control.checked || control.pressed) + { + return UM.Theme.getColor("action_button_active_text"); + } + else if (control.hovered) + { + return UM.Theme.getColor("action_button_hovered_text") + } + return UM.Theme.getColor("action_button_text") + } + return UM.Theme.getColor("action_button_disabled_text") + } + + font: UM.Theme.getFont("large_nonbold") + text: catalog.i18nc("@label", "Extruder") + visible: width < (control.width - extruderIcon.width - UM.Theme.getSize("default_margin").width) + elide: Text.ElideRight + } + + ExtruderIcon + { + // Round icon with the extruder number and material color indicator. + id: extruderIcon + + anchors.verticalCenter: parent.verticalCenter + anchors.left: extruderStaticText.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width + width: control.height - Math.round(UM.Theme.getSize("default_margin").width / 2) + height: width + + checked: control.checked + materialColor: model.color + textColor: extruderStaticText.color + } + } + } + + label: Item {} + } + } + } + + Item + { + id: materialRow + height: UM.Theme.getSize("print_setup_item").height + visible: Cura.MachineManager.hasMaterials + + anchors + { + left: parent.left + right: parent.right + top: extrudersList.bottom + margins: UM.Theme.getSize("thick_margin").width + } + + Label + { + id: materialLabel + text: catalog.i18nc("@label", "Material"); + width: Math.round(parent.width * 0.45 - UM.Theme.getSize("default_margin").width) + height: parent.height + verticalAlignment: Text.AlignVCenter + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + } + + ToolButton + { + id: materialSelection + + property var activeExtruder: Cura.MachineManager.activeStack + property var hasActiveExtruder: activeExtruder != null + property var currentRootMaterialName: hasActiveExtruder ? activeExtruder.material.name : "" + + text: currentRootMaterialName + tooltip: currentRootMaterialName + visible: Cura.MachineManager.hasMaterials + + enabled: !extrudersList.visible || Cura.ExtruderManager.activeExtruderIndex > -1 + + height: UM.Theme.getSize("setting_control").height + width: Math.round(parent.width * 0.7) + UM.Theme.getSize("thick_margin").width + anchors.right: parent.right + style: UM.Theme.styles.sidebar_header_button + activeFocusOnPress: true; + menu: Cura.MaterialMenu + { + extruderIndex: Cura.ExtruderManager.activeExtruderIndex + } + + property var valueError: hasActiveExtruder ? Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible", "") != "True" : true + property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported + } + } + + Item + { + id: variantRow + height: UM.Theme.getSize("print_setup_item").height + visible: Cura.MachineManager.hasVariants + + anchors + { + left: parent.left + right: parent.right + top: materialRow.bottom + margins: UM.Theme.getSize("thick_margin").width + } + + Label + { + id: variantLabel + text: Cura.MachineManager.activeDefinitionVariantsName; + width: Math.round(parent.width * 0.45 - UM.Theme.getSize("default_margin").width) + height: parent.height + verticalAlignment: Text.AlignVCenter + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + } + + ToolButton + { + id: variantSelection + text: Cura.MachineManager.activeVariantName + tooltip: Cura.MachineManager.activeVariantName; + visible: Cura.MachineManager.hasVariants + + height: UM.Theme.getSize("setting_control").height + width: Math.round(parent.width * 0.7 + UM.Theme.getSize("thick_margin").width) + anchors.right: parent.right + style: UM.Theme.styles.sidebar_header_button + activeFocusOnPress: true; + + menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex } + } + } + + Item + { + id: materialCompatibilityLink + height: UM.Theme.getSize("print_setup_item").height + + anchors.right: parent.right + anchors.top: variantRow.bottom + anchors.margins: UM.Theme.getSize("thick_margin").width + UM.RecolorImage + { + id: warningImage + + anchors.right: materialInfoLabel.left + anchors.rightMargin: UM.Theme.getSize("default_margin").width + + source: UM.Theme.getIcon("warning") + width: UM.Theme.getSize("section_icon").width + height: UM.Theme.getSize("section_icon").height + + sourceSize.width: width + sourceSize.height: height + + color: UM.Theme.getColor("material_compatibility_warning") + + visible: !Cura.MachineManager.isCurrentSetupSupported + } + + Label + { + id: materialInfoLabel + wrapMode: Text.WordWrap + text: "" + catalog.i18nc("@label", "Check compatibility") + "" + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + linkColor: UM.Theme.getColor("text_link") + + verticalAlignment: Text.AlignTop + + anchors.right: parent.right + + MouseArea + { + anchors.fill: parent + + onClicked: + { + // open the material URL with web browser + Qt.openUrlExternally("https://ultimaker.com/incoming-links/cura/material-compatibilty"); + } + } + } + } +} diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index add84614e0..25c9bbf74b 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -35,10 +35,12 @@ UM.Dialog { id: logo width: (base.minimumWidth * 0.85) | 0 - height: (width * (UM.Theme.getSize("logo").height / UM.Theme.getSize("logo").width)) | 0 + height: (width * (1/4.25)) | 0 - source: UM.Theme.getImage("logo_about") + source: UM.Theme.getImage("logo") + sourceSize.width: width + sourceSize.height: height anchors.top: parent.top anchors.topMargin: ((base.minimumWidth - width) / 2) | 0 anchors.horizontalCenter: parent.horizontalCenter diff --git a/resources/qml/Dialogs/AddMachineDialog.qml b/resources/qml/Dialogs/AddMachineDialog.qml index f00359869c..8e966c3df7 100644 --- a/resources/qml/Dialogs/AddMachineDialog.qml +++ b/resources/qml/Dialogs/AddMachineDialog.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 @@ -156,6 +156,7 @@ UM.Dialog anchors.rightMargin: UM.Theme.getSize("default_margin").width width: UM.Theme.getSize("standard_arrow").width height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width sourceSize.height: width color: palette.windowText source: base.activeCategory == section ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_right") @@ -169,7 +170,7 @@ UM.Dialog if (machineList.model.getItem(machineList.currentIndex).section != section) { // Find the first machine from this section - for(var i = 0; i < machineList.model.count; i++) + for(var i = 0; i < machineList.model.rowCount(); i++) { var item = machineList.model.getItem(i); if (item.section == section) diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index e42aa7e4a1..b438f0398c 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -32,8 +32,6 @@ Item property color headerBackgroundColor: UM.Theme.getColor("action_button") property color headerHoverColor: UM.Theme.getColor("action_button_hovered") - property alias enabled: mouseArea.enabled - // Defines the alignment of the popup with respect of the headerItem, by default to the right property int popupAlignment: ExpandableComponent.PopupAlignment.AlignRight @@ -141,7 +139,9 @@ Item verticalCenter: parent.verticalCenter margins: background.padding } - visible: source != "" && base.enabled + sourceSize.width: width + sourceSize.height: height + visible: source != "" width: height height: Math.round(0.2 * base.height) color: UM.Theme.getColor("text") diff --git a/resources/qml/ExtruderIcon.qml b/resources/qml/ExtruderIcon.qml index 49ad73a32e..c1a202050b 100644 --- a/resources/qml/ExtruderIcon.qml +++ b/resources/qml/ExtruderIcon.qml @@ -22,6 +22,8 @@ Item id: mainIcon anchors.fill: parent + sourceSize.width: parent.width + sourceSize.height: parent.height source: UM.Theme.getIcon("extruder_button") color: extruderEnabled ? materialColor: "gray" } @@ -48,9 +50,7 @@ Item id: extruderNumberText anchors.centerIn: parent text: index + 1 - font: UM.Theme.getFont("very_small") - width: contentWidth - height: contentHeight + font: UM.Theme.getFont("extruder_icon") visible: extruderEnabled renderType: Text.NativeRendering horizontalAlignment: Text.AlignHCenter @@ -62,6 +62,7 @@ Item id: disabledIcon anchors.fill: parent anchors.margins: UM.Theme.getSize("thick_lining").width + sourceSize.width: width sourceSize.height: width source: UM.Theme.getIcon("cross1") visible: !extruderEnabled diff --git a/resources/qml/IconLabel.qml b/resources/qml/IconLabel.qml index f925b6eab5..0941254e7b 100644 --- a/resources/qml/IconLabel.qml +++ b/resources/qml/IconLabel.qml @@ -31,6 +31,9 @@ Item width: UM.Theme.getSize("section_icon").width height: width + sourceSize.width: width + sourceSize.height: height + color: label.color visible: source != "" } @@ -45,7 +48,7 @@ Item text: "Empty label" elide: Text.ElideRight color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") renderType: Text.NativeRendering } } \ No newline at end of file diff --git a/resources/qml/IconWithText.qml b/resources/qml/IconWithText.qml index 22599b3aed..dcb3ef7851 100644 --- a/resources/qml/IconWithText.qml +++ b/resources/qml/IconWithText.qml @@ -37,6 +37,8 @@ Item width: UM.Theme.getSize("section_icon").width height: UM.Theme.getSize("section_icon").height + sourceSize.width: width + sourceSize.height: height color: "black" anchors diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 935cb723de..45111992c1 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -60,6 +60,7 @@ Item { { width: UM.Theme.getSize("save_button_specs_icons").width; height: UM.Theme.getSize("save_button_specs_icons").height; + sourceSize.width: width; sourceSize.height: width; color: control.hovered ? UM.Theme.getColor("text_scene_hover") : UM.Theme.getColor("text_scene"); source: UM.Theme.getIcon("pencil"); @@ -123,7 +124,7 @@ Item { } height: UM.Theme.getSize("jobspecs_line").height verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("small") color: UM.Theme.getColor("text_scene") text: CuraApplication.getSceneBoundingBoxString } diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index ae1c13d9c3..34936e9b5a 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -12,13 +12,38 @@ import QtGraphicalEffects 1.0 import "../Account" -Item +Rectangle { id: base implicitHeight: UM.Theme.getSize("main_window_header").height implicitWidth: UM.Theme.getSize("main_window_header").width + LinearGradient + { + anchors.fill: parent + start: Qt.point(0, 0) + end: Qt.point(parent.width, 0) + gradient: Gradient + { + GradientStop + { + position: 0.0 + color: UM.Theme.getColor("main_window_header_background") + } + GradientStop + { + position: 0.5 + color: UM.Theme.getColor("main_window_header_background_gradient") + } + GradientStop + { + position: 1.0 + color: UM.Theme.getColor("main_window_header_background") + } + } + } + Image { id: logo @@ -29,6 +54,9 @@ Item source: UM.Theme.getImage("logo") width: UM.Theme.getSize("logo").width height: UM.Theme.getSize("logo").height + + sourceSize.width: width + sourceSize.height: height } Row diff --git a/resources/qml/Menus/ConfigurationMenu/AutoConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/AutoConfiguration.qml deleted file mode 100644 index 68c56c7c4b..0000000000 --- a/resources/qml/Menus/ConfigurationMenu/AutoConfiguration.qml +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.7 -import QtQuick.Controls 2.0 - -import UM 1.3 as UM -import Cura 1.0 as Cura - -Item -{ - width: parent.width - height: childrenRect.height - - Label - { - id: header - text: catalog.i18nc("@header", "Configurations") - font: UM.Theme.getFont("large") - color: UM.Theme.getColor("text") - height: contentHeight - renderType: Text.NativeRendering - - anchors - { - left: parent.left - right: parent.right - } - } - - ConfigurationListView - { - anchors.top: header.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").width - width: parent.width - - outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null - } -} \ No newline at end of file diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml index 6ac1e6a2ad..7427b5ddff 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml @@ -7,129 +7,143 @@ import QtQuick.Controls 2.0 import UM 1.2 as UM import Cura 1.0 as Cura -Button +Rectangle { id: configurationItem property var configuration: null - hoverEnabled: true + property var selected: false + signal activateConfiguration() - height: background.height + height: childrenRect.height + border.width: UM.Theme.getSize("default_lining").width + border.color: updateBorderColor() + color: selected ? UM.Theme.getColor("configuration_item_active") : UM.Theme.getColor("configuration_item") + property var textColor: selected ? UM.Theme.getColor("configuration_item_text_active") : UM.Theme.getColor("configuration_item_text") - background: Rectangle + function updateBorderColor() { - height: childrenRect.height - color: parent.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") - border.color: (parent.checked || parent.hovered) ? UM.Theme.getColor("primary") : UM.Theme.getColor("lining") - border.width: parent.checked ? UM.Theme.getSize("thick_lining").width : UM.Theme.getSize("default_lining").width - radius: UM.Theme.getSize("default_radius").width + border.color = selected ? UM.Theme.getColor("configuration_item_border_active") : UM.Theme.getColor("configuration_item_border") + } - Column + Column + { + id: contentColumn + width: parent.width + padding: UM.Theme.getSize("default_margin").width + spacing: Math.round(UM.Theme.getSize("default_margin").height / 2) + + Row { - id: contentColumn - width: parent.width - padding: UM.Theme.getSize("wide_margin").width - spacing: Math.round(UM.Theme.getSize("default_margin").height / 2) + id: extruderRow - Row + width: parent.width - 2 * parent.padding + height: childrenRect.height + + spacing: UM.Theme.getSize("default_margin").width + + Repeater { - id: extruderRow - - anchors - { - left: parent.left - leftMargin: parent.padding - right: parent.right - rightMargin: parent.padding - } + id: repeater height: childrenRect.height - - spacing: UM.Theme.getSize("default_margin").width - - Repeater + model: configuration.extruderConfigurations + delegate: PrintCoreConfiguration { - id: repeater - height: childrenRect.height - model: configuration.extruderConfigurations - delegate: PrintCoreConfiguration - { - width: Math.round(parent.width / 2) - printCoreConfiguration: modelData - } - } - } - - //Buildplate row separator - Rectangle - { - id: separator - - visible: buildplateInformation.visible - anchors - { - left: parent.left - leftMargin: parent.padding - right: parent.right - rightMargin: parent.padding - } - height: visible ? Math.round(UM.Theme.getSize("thick_lining").height / 2) : 0 - color: UM.Theme.getColor("text") - } - - Item - { - id: buildplateInformation - - anchors - { - left: parent.left - leftMargin: parent.padding - right: parent.right - rightMargin: parent.padding - } - height: childrenRect.height - visible: configuration.buildplateConfiguration != "" - - UM.RecolorImage - { - id: buildplateIcon - anchors.left: parent.left - width: UM.Theme.getSize("main_window_header_button_icon").width - height: UM.Theme.getSize("main_window_header_button_icon").height - source: UM.Theme.getIcon("buildplate") - color: UM.Theme.getColor("text") - } - - Label - { - id: buildplateLabel - anchors.left: buildplateIcon.right - anchors.verticalCenter: buildplateIcon.verticalCenter - anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").height / 2) - text: configuration.buildplateConfiguration - renderType: Text.NativeRendering - color: UM.Theme.getColor("text") + width: Math.round(parent.width / 2) + printCoreConfiguration: modelData + mainColor: textColor } } } - Connections + //Buildplate row separator + Rectangle { - target: Cura.MachineManager - onCurrentConfigurationChanged: - { - configurationItem.checked = Cura.MachineManager.matchesConfiguration(configuration) - } + id: separator + + visible: buildplateInformation.visible + width: parent.width - 2 * parent.padding + height: visible ? Math.round(UM.Theme.getSize("thick_lining").height / 2) : 0 + color: textColor } - Component.onCompleted: + Item { - configurationItem.checked = Cura.MachineManager.matchesConfiguration(configuration) + id: buildplateInformation + width: parent.width - 2 * parent.padding + height: childrenRect.height + visible: configuration.buildplateConfiguration != "" + + UM.RecolorImage { + id: buildplateIcon + anchors.left: parent.left + width: UM.Theme.getSize("main_window_header_button_icon").width + height: UM.Theme.getSize("main_window_header_button_icon").height + sourceSize.width: width + sourceSize.height: height + source: UM.Theme.getIcon("buildplate") + color: textColor + } + + Label + { + id: buildplateLabel + anchors.left: buildplateIcon.right + anchors.verticalCenter: buildplateIcon.verticalCenter + anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").height / 2) + text: configuration.buildplateConfiguration + renderType: Text.NativeRendering + color: textColor + } } } - onClicked: + MouseArea { - Cura.MachineManager.applyRemoteConfiguration(configuration) + id: mouse + anchors.fill: parent + onClicked: activateConfiguration() + cursorShape: Qt.PointingHandCursor + hoverEnabled: true + onEntered: + { + parent.border.color = UM.Theme.getColor("configuration_item_border_hover") + if (configurationItem.selected == false) + { + configurationItem.color = UM.Theme.getColor("wide_lining") + } + } + onExited: + { + updateBorderColor() + if (configurationItem.selected == false) + { + configurationItem.color = UM.Theme.getColor("configuration_item") + } + } + } + + Connections + { + target: Cura.MachineManager + onCurrentConfigurationChanged: { + configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration) + updateBorderColor() + } + } + + Component.onCompleted: + { + configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration) + updateBorderColor() + } + + onVisibleChanged: + { + if(visible) + { + // I cannot trigger function updateBorderColor() after visibility change + color = selected ? UM.Theme.getColor("configuration_item_active") : UM.Theme.getColor("configuration_item") + } } } \ No newline at end of file diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml index e7936b69d2..210ff6057f 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml @@ -2,7 +2,8 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 2.3 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 import UM 1.2 as UM import Cura 1.0 as Cura @@ -11,7 +12,9 @@ Column { id: base property var outputDevice: null + property var computedHeight: container.height + configurationListHeading.height + 3 * padding height: childrenRect.height + 2 * padding + padding: UM.Theme.getSize("default_margin").width spacing: Math.round(UM.Theme.getSize("default_margin").height / 2) function forceModelUpdate() @@ -24,60 +27,60 @@ Column } } + Label + { + id: configurationListHeading + text: catalog.i18nc("@label:header configurations", "Available configurations") + font: UM.Theme.getFont("large") + width: parent.width - 2 * parent.padding + color: UM.Theme.getColor("configuration_item_text") + } + + Component + { + id: sectionHeading + Rectangle + { + height: childrenRect.height + UM.Theme.getSize("default_margin").height + Label + { + text: section + font: UM.Theme.getFont("default_bold") + color: UM.Theme.getColor("configuration_item_text") + } + } + } + ScrollView { id: container - width: parent.width - readonly property int maximumHeight: 350 * screenScaleFactor - height: Math.round(Math.min(configurationList.height, maximumHeight)) - contentHeight: configurationList.height - clip: true + width: parent.width - parent.padding + height: Math.min(configurationList.contentHeight, 350 * screenScaleFactor) - ScrollBar.vertical.policy: (configurationList.height > maximumHeight) ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff //The AsNeeded policy also hides it when the cursor is away, and we don't want that. - ScrollBar.vertical.background: Rectangle - { - implicitWidth: UM.Theme.getSize("scrollbar").width - radius: width / 2 - color: UM.Theme.getColor("scrollbar_background") - } - ScrollBar.vertical.contentItem: Rectangle - { - implicitWidth: UM.Theme.getSize("scrollbar").width - radius: width / 2 - color: UM.Theme.getColor(parent.pressed ? "scrollbar_handle_down" : parent.hovered ? "scrollbar_handle_hover" : "scrollbar_handle") - } - - ButtonGroup - { - buttons: configurationList.children - } + style: UM.Theme.styles.scrollview + __wheelAreaScrollSpeed: 75 // Scroll three lines in one scroll event ListView { id: configurationList spacing: Math.round(UM.Theme.getSize("default_margin").height / 2) - width: container.width - ((height > container.maximumHeight) ? container.ScrollBar.vertical.background.width : 0) //Make room for scroll bar if there is any. + width: container.width contentHeight: childrenRect.height - height: childrenRect.height section.property: "modelData.printerType" section.criteria: ViewSection.FullString - section.delegate: Item - { - height: printerTypeLabel.height + UM.Theme.getSize("default_margin").height - Cura.PrinterTypeLabel - { - id: printerTypeLabel - text: Cura.MachineManager.getAbbreviatedMachineName(section) - } - } + section.delegate: sectionHeading model: (outputDevice != null) ? outputDevice.uniqueConfigurations : [] - delegate: ConfigurationItem { - width: parent.width + width: parent.width - UM.Theme.getSize("default_margin").width configuration: modelData + onActivateConfiguration: + { + switchPopupState() + Cura.MachineManager.applyRemoteConfiguration(configuration) + } } } } diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml deleted file mode 100644 index 1d086acc67..0000000000 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.7 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Styles 1.4 - -import UM 1.2 as UM -import Cura 1.0 as Cura - - -/** - * Menu that allows you to select the configuration of the current printer, such - * as the nozzle sizes and materials in each extruder. - */ -Cura.ExpandableComponent -{ - id: base - - Cura.ExtrudersModel - { - id: extrudersModel - } - - UM.I18nCatalog - { - id: catalog - name: "cura" - } - - enum ConfigurationMethod - { - AUTO, - CUSTOM - } - - iconSource: expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left") - headerItem: Item - { - // Horizontal list that shows the extruders - ListView - { - id: extrudersList - - orientation: ListView.Horizontal - anchors.fill: parent - model: extrudersModel - visible: base.enabled - - delegate: Item - { - height: parent.height - width: Math.round(ListView.view.width / extrudersModel.count) - - // Extruder icon. Shows extruder index and has the same color as the active material. - Cura.ExtruderIcon - { - id: extruderIcon - materialColor: model.color - extruderEnabled: model.enabled - height: parent.height - width: height - } - - // Label for the brand of the material - Label - { - id: brandNameLabel - - text: model.material_brand - elide: Text.ElideRight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text_inactive") - renderType: Text.NativeRendering - - anchors - { - left: extruderIcon.right - leftMargin: UM.Theme.getSize("default_margin").width - right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width - } - } - - // Label that shows the name of the material - Label - { - text: model.material - elide: Text.ElideRight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering - - anchors - { - left: extruderIcon.right - leftMargin: UM.Theme.getSize("default_margin").width - right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width - top: brandNameLabel.bottom - } - } - } - } - } - - //Disable the menu if there are no materials, variants or build plates to change. - function updateEnabled() - { - var active_definition_id = Cura.MachineManager.activeMachine.definition.id; - var has_materials = Cura.ContainerManager.getContainerMetaDataEntry(active_definition_id, "has_materials"); - var has_variants = Cura.ContainerManager.getContainerMetaDataEntry(active_definition_id, "has_variants"); - var has_buildplates = Cura.ContainerManager.getContainerMetaDataEntry(active_definition_id, "has_variant_buildplates"); - base.enabled = has_materials || has_variants || has_buildplates; //Only let it drop down if there is any configuration that you could change. - } - - Connections - { - target: Cura.MachineManager - onGlobalContainerChanged: base.updateEnabled(); - } - Component.onCompleted: updateEnabled(); - - popupItem: Column - { - id: popupItem - width: base.width - 2 * UM.Theme.getSize("default_margin").width - height: implicitHeight //Required because ExpandableComponent will try to use this to determine the size of the background of the pop-up. - spacing: UM.Theme.getSize("default_margin").height - - property bool is_connected: false //If current machine is connected to a printer. Only evaluated upon making popup visible. - onVisibleChanged: - { - is_connected = Cura.MachineManager.activeMachineNetworkKey !== "" && Cura.MachineManager.printerConnected //Re-evaluate. - } - - property int configuration_method: is_connected ? ConfigurationMenu.ConfigurationMethod.AUTO : ConfigurationMenu.ConfigurationMethod.CUSTOM //Auto if connected to a printer at start-up, or Custom if not. - - Item - { - width: parent.width - height: childrenRect.height - AutoConfiguration - { - id: autoConfiguration - visible: popupItem.configuration_method == ConfigurationMenu.ConfigurationMethod.AUTO - } - - CustomConfiguration - { - id: customConfiguration - visible: popupItem.configuration_method == ConfigurationMenu.ConfigurationMethod.CUSTOM - } - } - - Rectangle - { - id: separator - visible: buttonBar.visible - x: -popupPadding - - width: base.width - height: UM.Theme.getSize("default_lining").height - - color: UM.Theme.getColor("lining") - } - - //Allow switching between custom and auto. - Item - { - id: buttonBar - visible: popupItem.is_connected //Switching only makes sense if the "auto" part is possible. - - width: parent.width - height: childrenRect.height - - Cura.SecondaryButton - { - id: goToCustom - visible: popupItem.configuration_method == ConfigurationMenu.ConfigurationMethod.AUTO - text: catalog.i18nc("@label", "Custom") - - anchors.right: parent.right - - iconSource: UM.Theme.getIcon("arrow_right") - isIconOnRightSide: true - - onClicked: popupItem.configuration_method = ConfigurationMenu.ConfigurationMethod.CUSTOM - } - - Cura.SecondaryButton - { - id: goToAuto - visible: popupItem.configuration_method == ConfigurationMenu.ConfigurationMethod.CUSTOM - text: catalog.i18nc("@label", "Configurations") - - iconSource: UM.Theme.getIcon("arrow_left") - - onClicked: popupItem.configuration_method = ConfigurationMenu.ConfigurationMethod.AUTO - } - } - } -} diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml deleted file mode 100644 index 8d8f84155a..0000000000 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.6 -import QtQuick.Controls 2.0 -import QtQuick.Controls 1.1 as OldControls - -import Cura 1.0 as Cura -import UM 1.3 as UM - -Item -{ - UM.I18nCatalog - { - id: catalog - name: "cura" - } - - width: parent.width - height: childrenRect.height - - Label - { - id: header - text: catalog.i18nc("@header", "Custom") - font: UM.Theme.getFont("large") - color: UM.Theme.getColor("text") - height: contentHeight - renderType: Text.NativeRendering - - anchors - { - top: parent.top - left: parent.left - right: parent.right - } - } - - UM.TabRow - { - id: tabBar - anchors.top: header.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - visible: extrudersModel.count > 1 - - Repeater - { - id: repeater - model: extrudersModel - delegate: UM.TabRowButton - { - contentItem: Item - { - Cura.ExtruderIcon - { - anchors.horizontalCenter: parent.horizontalCenter - materialColor: model.color - extruderEnabled: model.enabled - width: parent.height - height: parent.height - } - } - onClicked: - { - Cura.ExtruderManager.setActiveExtruderIndex(tabBar.currentIndex) - } - } - } - - //When active extruder changes for some other reason, switch tabs. - //Don't directly link currentIndex to Cura.ExtruderManager.activeExtruderIndex! - //This causes a segfault in Qt 5.11. Something with VisualItemModel removing index -1. We have to use setCurrentIndex instead. - Connections - { - target: Cura.ExtruderManager - onActiveExtruderChanged: - { - tabBar.setCurrentIndex(Cura.ExtruderManager.activeExtruderIndex); - } - } - - //When the model of the extruders is rebuilt, the list of extruders is briefly emptied and rebuilt. - //This causes the currentIndex of the tab to be in an invalid position which resets it to 0. - //Therefore we need to change it back to what it was: The active extruder index. - Connections - { - target: repeater.model - onModelChanged: - { - tabBar.setCurrentIndex(Cura.ExtruderManager.activeExtruderIndex) - } - } - } - - Rectangle - { - width: parent.width - height: childrenRect.height - anchors.top: tabBar.bottom - - radius: tabBar.visible ? UM.Theme.getSize("default_radius").width : 0 - border.width: tabBar.visible ? UM.Theme.getSize("default_lining").width : 0 - border.color: UM.Theme.getColor("lining") - color: UM.Theme.getColor("main_background") - - //Remove rounding and lining at the top. - Rectangle - { - width: parent.width - height: parent.radius - anchors.top: parent.top - color: UM.Theme.getColor("lining") - visible: tabBar.visible - Rectangle - { - anchors - { - left: parent.left - leftMargin: parent.parent.border.width - right: parent.right - rightMargin: parent.parent.border.width - top: parent.top - } - height: parent.parent.radius - color: parent.parent.color - } - } - - Column - { - id: selectors - padding: UM.Theme.getSize("default_margin").width - spacing: UM.Theme.getSize("default_margin").height - - property var model: extrudersModel.items[tabBar.currentIndex] - - readonly property real paddedWidth: parent.width - padding * 2 - property real textWidth: Math.round(paddedWidth * 0.3) - property real controlWidth: paddedWidth - textWidth - - Row - { - height: UM.Theme.getSize("print_setup_item").height - - Label - { - text: catalog.i18nc("@label", "Enabled") - verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - height: parent.height - width: selectors.textWidth - visible: extrudersModel.count > 1 - renderType: Text.NativeRendering - } - - OldControls.CheckBox - { - checked: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.isEnabled : false - enabled: !checked || Cura.MachineManager.numberExtrudersEnabled > 1 //Disable if it's the last enabled extruder. - height: UM.Theme.getSize("setting_control").height - style: UM.Theme.styles.checkbox - visible: extrudersModel.count > 1 - - /* Use a MouseArea to process the click on this checkbox. - This is necessary because actually clicking the checkbox - causes the "checked" property to be overwritten. After - it's been overwritten, the original link that made it - depend on the active extruder stack is broken. */ - MouseArea - { - anchors.fill: parent - onClicked: Cura.MachineManager.setExtruderEnabled(Cura.ExtruderManager.activeExtruderIndex, !parent.checked) - enabled: parent.enabled - } - } - } - - Row - { - height: UM.Theme.getSize("print_setup_item").height - Label - { - text: catalog.i18nc("@label", "Material") - verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - height: parent.height - width: selectors.textWidth - visible: materialSelection.visible - renderType: Text.NativeRendering - } - - OldControls.ToolButton - { - id: materialSelection - - property bool valueError: Cura.MachineManager.activeStack != null ? Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeStack.material.id, "compatible", "") != "True" : true - property bool valueWarning: !Cura.MachineManager.isActiveQualitySupported - - text: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.material.name : "" - tooltip: text - visible: Cura.MachineManager.hasMaterials - - height: UM.Theme.getSize("setting_control").height - width: selectors.controlWidth - - style: UM.Theme.styles.sidebar_header_button - activeFocusOnPress: true - menu: Cura.MaterialMenu - { - extruderIndex: Cura.ExtruderManager.activeExtruderIndex - } - } - } - - Row - { - height: UM.Theme.getSize("print_setup_item").height - - Label - { - text: Cura.MachineManager.activeDefinitionVariantsName - verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - height: parent.height - width: selectors.textWidth - visible: variantSelection.visible - renderType: Text.NativeRendering - } - - OldControls.ToolButton - { - id: variantSelection - text: Cura.MachineManager.activeVariantName - tooltip: Cura.MachineManager.activeVariantName; - visible: Cura.MachineManager.hasVariants - - height: UM.Theme.getSize("setting_control").height - width: selectors.controlWidth - style: UM.Theme.styles.sidebar_header_button - activeFocusOnPress: true; - - menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex } - } - } - } - } -} diff --git a/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml index 885f02d740..73fc342d66 100644 --- a/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml @@ -5,50 +5,87 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import UM 1.2 as UM -import Cura 1.0 as Cura -Row + +Column { id: extruderInfo property var printCoreConfiguration + property var mainColor: "black" + spacing: Math.round(UM.Theme.getSize("default_margin").height / 2) - height: information.height - spacing: UM.Theme.getSize("default_margin").width + height: childrenRect.height - //Extruder icon. - Cura.ExtruderIcon + Item { - materialColor: printCoreConfiguration.material.color - anchors.verticalCenter: parent.verticalCenter - extruderEnabled: printCoreConfiguration.material.name !== "" && printCoreConfiguration.hotendID !== "" + id: extruder + width: parent.width + height: childrenRect.height + + Label + { + id: extruderLabel + text: catalog.i18nc("@label:extruder label", "Extruder") + renderType: Text.NativeRendering + elide: Text.ElideRight + anchors.left: parent.left + font: UM.Theme.getFont("default") + color: mainColor + } + + // Rounded item to show the extruder number + Item + { + id: extruderIconItem + anchors.verticalCenter: extruderLabel.verticalCenter + anchors.left: extruderLabel.right + anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2) + + width: UM.Theme.getSize("section_icon").width + height: UM.Theme.getSize("section_icon").height + + UM.RecolorImage { + id: mainCircle + anchors.fill: parent + + anchors.centerIn: parent + sourceSize.width: parent.width + sourceSize.height: parent.height + source: UM.Theme.getIcon("extruder_button") + color: mainColor + } + + Label + { + id: extruderNumberText + anchors.centerIn: parent + text: printCoreConfiguration.position + 1 + renderType: Text.NativeRendering + font: UM.Theme.getFont("default") + color: mainColor + } + } } - Column + Label { - id: information - Label - { - text: printCoreConfiguration.material.brand ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct. - renderType: Text.NativeRendering - elide: Text.ElideRight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text_inactive") - } - Label - { - text: printCoreConfiguration.material.name ? printCoreConfiguration.material.name : " " //Use space so that the height is still correct. - renderType: Text.NativeRendering - elide: Text.ElideRight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - } - Label - { - text: printCoreConfiguration.hotendID ? printCoreConfiguration.hotendID : " " //Use space so that the height is still correct. - renderType: Text.NativeRendering - elide: Text.ElideRight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text_inactive") - } + id: materialLabel + text: printCoreConfiguration.material == null ? "" : printCoreConfiguration.material.name + renderType: Text.NativeRendering + elide: Text.ElideRight + width: parent.width + font: UM.Theme.getFont("default_bold") + color: mainColor + } + + Label + { + id: printCoreTypeLabel + text: printCoreConfiguration.hotendID + renderType: Text.NativeRendering + elide: Text.ElideRight + width: parent.width + font: UM.Theme.getFont("default") + color: mainColor } } diff --git a/resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml b/resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml new file mode 100644 index 0000000000..eb6800cb36 --- /dev/null +++ b/resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml @@ -0,0 +1,243 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.7 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Styles 1.4 +import QtQuick.Layouts 1.3 + +import QtQuick.Controls 1.1 as OldControls + +import UM 1.2 as UM +import Cura 1.0 as Cura + + +Cura.ExpandableComponent +{ + id: base + + Cura.ExtrudersModel + { + id: extrudersModel + } + + UM.I18nCatalog + { + id: catalog + name: "cura" + } + + iconSource: expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left") + headerItem: Item + { + // Horizontal list that shows the extruders + ListView + { + id: extrudersList + + orientation: ListView.Horizontal + anchors.fill: parent + model: extrudersModel + + delegate: Item + { + height: parent.height + width: Math.round(ListView.view.width / extrudersModel.rowCount()) + + // Extruder icon. Shows extruder index and has the same color as the active material. + Cura.ExtruderIcon + { + id: extruderIcon + materialColor: model.color + extruderEnabled: model.enabled + anchors.verticalCenter: parent.verticalCenter + } + + // Label for the brand of the material + Label + { + id: brandNameLabel + + text: model.material_brand + elide: Text.ElideRight + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + + anchors + { + left: extruderIcon.right + leftMargin: UM.Theme.getSize("default_margin").width + right: parent.right + rightMargin: UM.Theme.getSize("default_margin").width + } + } + + // Label that shows the name of the material + Label + { + text: model.material + elide: Text.ElideRight + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + + anchors + { + left: extruderIcon.right + leftMargin: UM.Theme.getSize("default_margin").width + right: parent.right + rightMargin: UM.Theme.getSize("default_margin").width + top: brandNameLabel.bottom + } + } + } + } + } + + popupItem: Item + { + width: base.width - 2 * UM.Theme.getSize("default_margin").width + height: 200 + + TabBar + { + id: tabBar + onCurrentIndexChanged: Cura.ExtruderManager.setActiveExtruderIndex(currentIndex) + width: parent.width + height: 50 + Repeater + { + model: extrudersModel + + delegate: TabButton + { + width: ListView.view != null ? Math.round(ListView.view.width / extrudersModel.rowCount()): 0 + height: parent.height + contentItem: Item + { + Cura.ExtruderIcon + { + anchors.horizontalCenter: parent.horizontalCenter + materialColor: model.color + extruderEnabled: model.enabled + width: parent.height + height: parent.height + } + } + } + } + } + + Item + { + id: tabControl + width: parent.width + anchors.top: tabBar.bottom + anchors.bottom: parent.bottom + property var model: extrudersModel.items[tabBar.currentIndex] + property real textWidth: Math.round(width * 0.3) + property real controlWidth: width - textWidth + Column + { + spacing: UM.Theme.getSize("default_margin").height + Row + { + height: UM.Theme.getSize("print_setup_item").height + + Label + { + text: catalog.i18nc("@label", "Enabled") + verticalAlignment: Text.AlignVCenter + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + height: parent.height + width: tabControl.textWidth + renderType: Text.NativeRendering + } + + OldControls.CheckBox + { + checked: tabControl.model != null ? Cura.MachineManager.getExtruder(tabControl.model.index).isEnabled: false + onClicked: Cura.MachineManager.setExtruderEnabled(tabControl.model.index, checked) + height: UM.Theme.getSize("setting_control").height + style: UM.Theme.styles.checkbox + } + } + + Row + { + height: UM.Theme.getSize("print_setup_item").height + Label + { + text: catalog.i18nc("@label", "Material") + verticalAlignment: Text.AlignVCenter + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + height: parent.height + width: tabControl.textWidth + renderType: Text.NativeRendering + } + + OldControls.ToolButton + { + id: materialSelection + + property var activeExtruder: Cura.MachineManager.activeStack + property var hasActiveExtruder: activeExtruder != null + property var currentRootMaterialName: hasActiveExtruder ? activeExtruder.material.name : "" + property var valueError: hasActiveExtruder ? Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible", "") != "True" : true + property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported + + text: currentRootMaterialName + tooltip: currentRootMaterialName + visible: Cura.MachineManager.hasMaterials + + enabled: Cura.ExtruderManager.activeExtruderIndex > -1 + + height: UM.Theme.getSize("setting_control").height + width: tabControl.controlWidth + + style: UM.Theme.styles.sidebar_header_button + activeFocusOnPress: true + menu: Cura.MaterialMenu + { + extruderIndex: Cura.ExtruderManager.activeExtruderIndex + } + + } + } + + Row + { + height: UM.Theme.getSize("print_setup_item").height + + Label + { + text: Cura.MachineManager.activeDefinitionVariantsName + verticalAlignment: Text.AlignVCenter + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + height: parent.height + width: tabControl.textWidth + renderType: Text.NativeRendering + } + + OldControls.ToolButton + { + id: variantSelection + text: Cura.MachineManager.activeVariantName + tooltip: Cura.MachineManager.activeVariantName; + visible: Cura.MachineManager.hasVariants + + height: UM.Theme.getSize("setting_control").height + width: tabControl.controlWidth + style: UM.Theme.styles.sidebar_header_button + activeFocusOnPress: true; + + menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex } + } + } + } + + } + } +} diff --git a/resources/qml/Menus/ConfigurationMenu/SyncButton.qml b/resources/qml/Menus/ConfigurationMenu/SyncButton.qml new file mode 100644 index 0000000000..558ae1e477 --- /dev/null +++ b/resources/qml/Menus/ConfigurationMenu/SyncButton.qml @@ -0,0 +1,102 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.7 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + +import UM 1.2 as UM +import Cura 1.0 as Cura + +Button +{ + id: base + property var outputDevice: null + property var matched: updateOnSync() + text: matched == true ? catalog.i18nc("@label:extruder label", "Yes") : catalog.i18nc("@label:extruder label", "No") + width: parent.width + height: parent.height + + function updateOnSync() + { + if (outputDevice != undefined) + { + for (var index in outputDevice.uniqueConfigurations) + { + var configuration = outputDevice.uniqueConfigurations[index] + if (Cura.MachineManager.matchesConfiguration(configuration)) + { + base.matched = true; + return; + } + } + } + base.matched = false; + } + + style: ButtonStyle + { + background: Rectangle + { + color: + { + if(control.pressed) + { + return UM.Theme.getColor("machine_selector_active"); + } + else if(control.hovered) + { + return UM.Theme.getColor("machine_selector_hover"); + } + else + { + return UM.Theme.getColor("machine_selector_bar"); + } + } + Behavior on color { ColorAnimation { duration: 50; } } + + UM.RecolorImage + { + id: downArrow + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("default_margin").width + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height + color: UM.Theme.getColor("text_emphasis") + source: UM.Theme.getIcon("arrow_bottom") + } + UM.RecolorImage + { + id: sidebarComboBoxLabel + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.verticalCenter: parent.verticalCenter; + + width: UM.Theme.getSize("printer_sync_icon").width + height: UM.Theme.getSize("printer_sync_icon").height + + color: control.matched ? UM.Theme.getColor("printer_config_matched") : UM.Theme.getColor("printer_config_mismatch") + source: UM.Theme.getIcon("tab_status_connected") + sourceSize.width: width + sourceSize.height: height + } + } + label: Label {} + } + + Connections + { + target: outputDevice + onUniqueConfigurationsChanged: updateOnSync() + } + + Connections + { + target: Cura.MachineManager + onCurrentConfigurationChanged: updateOnSync() + onOutputDevicesChanged: updateOnSync() + } +} \ No newline at end of file diff --git a/resources/qml/Menus/ProfileMenu.qml b/resources/qml/Menus/ProfileMenu.qml index bf950aa409..fd46d2ef72 100644 --- a/resources/qml/Menus/ProfileMenu.qml +++ b/resources/qml/Menus/ProfileMenu.qml @@ -37,7 +37,7 @@ Menu MenuSeparator { id: customSeparator - visible: Cura.CustomQualityProfilesDropDownMenuModel.count > 0 + visible: Cura.CustomQualityProfilesDropDownMenuModel.rowCount > 0 } Instantiator @@ -48,7 +48,7 @@ Menu Connections { target: Cura.CustomQualityProfilesDropDownMenuModel - onModelReset: customSeparator.visible = Cura.CustomQualityProfilesDropDownMenuModel.count > 0 + onModelReset: customSeparator.visible = Cura.CustomQualityProfilesDropDownMenuModel.rowCount() > 0 } MenuItem @@ -62,12 +62,12 @@ Menu onObjectAdded: { - customSeparator.visible = model.count > 0; + customSeparator.visible = model.rowCount() > 0; menu.insertItem(index, object); } onObjectRemoved: { - customSeparator.visible = model.count > 0; + customSeparator.visible = model.rowCount() > 0; menu.removeItem(object); } } diff --git a/resources/qml/ObjectsList.qml b/resources/qml/ObjectsList.qml index 8f45b3744f..8c8eaa16ae 100644 --- a/resources/qml/ObjectsList.qml +++ b/resources/qml/ObjectsList.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 @@ -55,6 +55,7 @@ Rectangle { width: control.width height: control.height + sourceSize.width: width sourceSize.height: width color: UM.Theme.getColor("setting_control_text") source: collapsed ? UM.Theme.getIcon("arrow_left") : UM.Theme.getIcon("arrow_bottom") diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index bc75b9bc72..4dc5465dc6 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -21,10 +21,8 @@ UM.ManagementPage function activeMachineIndex() { - for(var i = 0; i < model.count; i++) - { - if (model.getItem(i).id == Cura.MachineManager.activeMachineId) - { + for(var i = 0; i < model.rowCount(); i++) { + if (model.getItem(i).id == Cura.MachineManager.activeMachineId) { return i; } } @@ -49,7 +47,7 @@ UM.ManagementPage { text: catalog.i18nc("@action:button", "Remove"); iconName: "list-remove"; - enabled: base.currentItem != null && model.count > 1 + enabled: base.currentItem != null && model.rowCount() > 1 onClicked: confirmDialog.open(); }, Button diff --git a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml index a3a0e4708f..c8f391dfb0 100644 --- a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml +++ b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml @@ -55,8 +55,7 @@ Rectangle text: "" implicitWidth: UM.Theme.getSize("favorites_button").width implicitHeight: UM.Theme.getSize("favorites_button").height - UM.RecolorImage - { + UM.RecolorImage { anchors { verticalCenter: parent.verticalCenter @@ -64,6 +63,8 @@ Rectangle } width: UM.Theme.getSize("standard_arrow").width height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height color: "black" source: brand_section.expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left") } diff --git a/resources/qml/Preferences/Materials/MaterialsList.qml b/resources/qml/Preferences/Materials/MaterialsList.qml index 61f92db84c..00bead9650 100644 --- a/resources/qml/Preferences/Materials/MaterialsList.qml +++ b/resources/qml/Preferences/Materials/MaterialsList.qml @@ -57,7 +57,7 @@ Item var currentItemId = base.currentItem == null ? "" : base.currentItem.root_material_id search_root_id = currentItemId } - for (var material_idx = 0; material_idx < genericMaterialsModel.count; material_idx++) + for (var material_idx = 0; material_idx < genericMaterialsModel.rowCount(); material_idx++) { var material = genericMaterialsModel.getItem(material_idx) if (material.root_material_id == search_root_id) @@ -72,15 +72,15 @@ Item return true } } - for (var brand_idx = 0; brand_idx < materialsModel.count; brand_idx++) + for (var brand_idx = 0; brand_idx < materialsModel.rowCount(); brand_idx++) { var brand = materialsModel.getItem(brand_idx) var types_model = brand.material_types - for (var type_idx = 0; type_idx < types_model.count; type_idx++) + for (var type_idx = 0; type_idx < types_model.rowCount(); type_idx++) { var type = types_model.getItem(type_idx) var colors_model = type.colors - for (var material_idx = 0; material_idx < colors_model.count; material_idx++) + for (var material_idx = 0; material_idx < colors_model.rowCount(); material_idx++) { var material = colors_model.getItem(material_idx) if (material.root_material_id == search_root_id) diff --git a/resources/qml/Preferences/Materials/MaterialsSlot.qml b/resources/qml/Preferences/Materials/MaterialsSlot.qml index a706aaf2b9..a5af17f47a 100644 --- a/resources/qml/Preferences/Materials/MaterialsSlot.qml +++ b/resources/qml/Preferences/Materials/MaterialsSlot.qml @@ -95,6 +95,8 @@ Rectangle } width: UM.Theme.getSize("favorites_button_icon").width height: UM.Theme.getSize("favorites_button_icon").height + sourceSize.width: width + sourceSize.height: height color: { if (favorite_button.hovered) diff --git a/resources/qml/Preferences/Materials/MaterialsTypeSection.qml b/resources/qml/Preferences/Materials/MaterialsTypeSection.qml index f98c19e0b3..f62fc4ee16 100644 --- a/resources/qml/Preferences/Materials/MaterialsTypeSection.qml +++ b/resources/qml/Preferences/Materials/MaterialsTypeSection.qml @@ -74,6 +74,8 @@ Rectangle } width: UM.Theme.getSize("standard_arrow").width height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height color: "black" source: material_type_section.expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left") } diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index d7ffbb3152..ba0c2848a5 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -188,27 +188,21 @@ Item Connections { target: qualitiesModel - onItemsChanged: - { + onItemsChanged: { var toSelectItemName = base.currentItem == null ? "" : base.currentItem.name; - if (newQualityNameToSelect != "") - { + if (newQualityNameToSelect != "") { toSelectItemName = newQualityNameToSelect; } var newIdx = -1; // Default to nothing if nothing can be found - if (toSelectItemName != "") - { + if (toSelectItemName != "") { // Select the required quality name if given - for (var idx = 0; idx < qualitiesModel.count; ++idx) - { + for (var idx = 0; idx < qualitiesModel.rowCount(); ++idx) { var item = qualitiesModel.getItem(idx); - if (item.name == toSelectItemName) - { + if (item.name == toSelectItemName) { // Switch to the newly created profile if needed newIdx = idx; - if (base.toActivateNewQuality) - { + if (base.toActivateNewQuality) { // Activate this custom quality if required Cura.MachineManager.setQualityChangesGroup(item.quality_changes_group); } @@ -388,11 +382,9 @@ Item var selectedItemName = Cura.MachineManager.activeQualityOrQualityChangesName; // Select the required quality name if given - for (var idx = 0; idx < qualitiesModel.count; idx++) - { + for (var idx = 0; idx < qualitiesModel.rowCount(); idx++) { var item = qualitiesModel.getItem(idx); - if (item.name == selectedItemName) - { + if (item.name == selectedItemName) { currentIndex = idx; break; } diff --git a/resources/qml/Preferences/SettingVisibilityPage.qml b/resources/qml/Preferences/SettingVisibilityPage.qml index 3f7571a170..2edbeee960 100644 --- a/resources/qml/Preferences/SettingVisibilityPage.qml +++ b/resources/qml/Preferences/SettingVisibilityPage.qml @@ -50,7 +50,7 @@ UM.PreferencesPage { return Qt.Unchecked } - else if(definitionsModel.visibleCount == definitionsModel.count) + else if(definitionsModel.visibleCount == definitionsModel.rowCount(null)) { return Qt.Checked } diff --git a/resources/qml/PrinterOutput/ExtruderBox.qml b/resources/qml/PrinterOutput/ExtruderBox.qml index 247bb3a27d..f5a1bd75c4 100644 --- a/resources/qml/PrinterOutput/ExtruderBox.qml +++ b/resources/qml/PrinterOutput/ExtruderBox.qml @@ -47,7 +47,7 @@ Item { id: extruderTargetTemperature text: Math.round(extruderModel.targetHotendTemperature) + "ยฐC" - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("small") color: UM.Theme.getColor("text_inactive") anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width diff --git a/resources/qml/PrinterOutput/HeatedBedBox.qml b/resources/qml/PrinterOutput/HeatedBedBox.qml index 33cf5cd1e2..8c99814e02 100644 --- a/resources/qml/PrinterOutput/HeatedBedBox.qml +++ b/resources/qml/PrinterOutput/HeatedBedBox.qml @@ -35,7 +35,7 @@ Item { id: bedTargetTemperature text: printerModel != null ? printerModel.targetBedTemperature + "ยฐC" : "" - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("small") color: UM.Theme.getColor("text_inactive") anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width diff --git a/resources/qml/PrinterOutput/OutputDeviceHeader.qml b/resources/qml/PrinterOutput/OutputDeviceHeader.qml index 16280eab5f..e6328546ef 100644 --- a/resources/qml/PrinterOutput/OutputDeviceHeader.qml +++ b/resources/qml/PrinterOutput/OutputDeviceHeader.qml @@ -43,7 +43,7 @@ Item { id: outputDeviceAddressLabel text: (outputDevice != null && outputDevice.address != null) ? outputDevice.address : "" - font: UM.Theme.getFont("default_bold") + font: UM.Theme.getFont("small") color: UM.Theme.getColor("text_inactive") anchors.top: outputDeviceNameLabel.bottom anchors.left: parent.left @@ -54,7 +54,7 @@ Item { text: outputDevice != null ? "" : catalog.i18nc("@info:status", "The printer is not connected.") color: outputDevice != null && outputDevice.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") wrapMode: Text.WordWrap anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 95abfd6644..15cd773c90 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -25,52 +25,29 @@ Cura.ExpandableComponent name: "cura" } - headerItem: Item + headerItem: Cura.IconLabel { - implicitHeight: icon.height + text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName + source: + { + if (isNetworkPrinter) + { + if (machineSelector.outputDevice != null && machineSelector.outputDevice.clusterSize > 1) + { + return UM.Theme.getIcon("printer_group") + } + return UM.Theme.getIcon("printer_single") + } + return "" + } + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + iconSize: UM.Theme.getSize("machine_selector_icon").width UM.RecolorImage { id: icon - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - - source: - { - if (isNetworkPrinter) - { - if (machineSelector.outputDevice != null && machineSelector.outputDevice.clusterSize > 1) - { - return UM.Theme.getIcon("printer_group") - } - return UM.Theme.getIcon("printer_single") - } - return "" - } - width: UM.Theme.getSize("machine_selector_icon").width - height: width - - color: UM.Theme.getColor("machine_selector_printer_icon") - visible: source != "" - } - - Label - { - id: label - anchors.left: icon.visible ? icon.right : parent.left - anchors.right: parent.right - anchors.leftMargin: UM.Theme.getSize("thin_margin").width - anchors.verticalCenter: icon.verticalCenter - text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName - elide: Text.ElideRight - color: UM.Theme.getColor("text") - font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering - } - - UM.RecolorImage - { anchors { bottom: parent.bottom @@ -82,6 +59,9 @@ Cura.ExpandableComponent width: UM.Theme.getSize("printer_status_icon").width height: UM.Theme.getSize("printer_status_icon").height + sourceSize.width: width + sourceSize.height: height + color: UM.Theme.getColor("primary") visible: isNetworkPrinter && isPrinterConnected diff --git a/resources/qml/PrinterSelector/MachineSelectorList.qml b/resources/qml/PrinterSelector/MachineSelectorList.qml index d831f4eb5c..445940ab50 100644 --- a/resources/qml/PrinterSelector/MachineSelectorList.qml +++ b/resources/qml/PrinterSelector/MachineSelectorList.qml @@ -13,7 +13,7 @@ Column Label { - text: catalog.i18nc("@label", "Connected printers") + text: catalog.i18nc("@label", "Network connected printers") visible: networkedPrintersModel.items.length > 0 leftPadding: UM.Theme.getSize("default_margin").width height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0 diff --git a/resources/qml/PrinterTypeLabel.qml b/resources/qml/PrinterSelector/PrinterTypeLabel.qml similarity index 95% rename from resources/qml/PrinterTypeLabel.qml rename to resources/qml/PrinterSelector/PrinterTypeLabel.qml index 7feae32e16..cd9f3b9743 100644 --- a/resources/qml/PrinterTypeLabel.qml +++ b/resources/qml/PrinterSelector/PrinterTypeLabel.qml @@ -28,7 +28,7 @@ Item anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter renderType: Text.NativeRendering - font: UM.Theme.getFont("default") + font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") } } \ No newline at end of file diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml index 196b2d6b97..aafe36c546 100644 --- a/resources/qml/Settings/SettingCategory.qml +++ b/resources/qml/Settings/SettingCategory.qml @@ -129,26 +129,23 @@ Button anchors.rightMargin: UM.Theme.getSize("default_margin").width width: UM.Theme.getSize("standard_arrow").width height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width sourceSize.height: width color: { if (!base.enabled) { return UM.Theme.getColor("setting_category_disabled_text") - } - else if ((base.hovered || base.activeFocus) && base.checkable && base.checked) + } else if ((base.hovered || base.activeFocus) && base.checkable && base.checked) { return UM.Theme.getColor("setting_category_active_hover_text") - } - else if (base.pressed || (base.checkable && base.checked)) + } else if (base.pressed || (base.checkable && base.checked)) { return UM.Theme.getColor("setting_category_active_text") - } - else if (base.hovered || base.activeFocus) + } else if (base.hovered || base.activeFocus) { return UM.Theme.getColor("setting_category_hover_text") - } - else + } else { return UM.Theme.getColor("setting_category_text") } diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index fb2d5a2f4d..d37754d27c 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -115,12 +115,12 @@ SettingItem return UM.Theme.getColor("setting_control_border") } - UM.RecolorImage - { + UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter width: Math.round(parent.width / 2.5) height: Math.round(parent.height / 2.5) + sourceSize.width: width sourceSize.height: width color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text"); source: UM.Theme.getIcon("check") diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index 5f0d8327f8..a3c1422b30 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -1,5 +1,5 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +// Copyright (c) 2016 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 2.0 @@ -31,15 +31,12 @@ SettingItem { forceActiveFocus(); propertyProvider.setPropertyValue("value", model.getItem(index).index); - } - else + } else { if (propertyProvider.properties.value == -1) { - control.currentIndex = model.count - 1; // we know the last item is "Not overriden" - } - else - { + control.currentIndex = model.rowCount() - 1; // we know the last item is "Not overriden" + } else { control.currentIndex = propertyProvider.properties.value; // revert to the old value } } diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index bb624bcbde..ef1f123953 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -1,5 +1,5 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +// Copyright (c) 2017 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 1.1 @@ -129,14 +129,13 @@ Item } style: ButtonStyle { - background: Item - { - UM.RecolorImage - { + background: Item { + UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter width: UM.Theme.getSize("standard_arrow").width height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width sourceSize.height: width color: control.enabled ? UM.Theme.getColor("setting_category_text") : UM.Theme.getColor("setting_category_disabled_text") source: UM.Theme.getIcon("menu") diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index fb4d52979d..5e723a3d70 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -106,7 +106,7 @@ Item var availableMin = -1 var availableMax = -1 - for (var i = 0; i < Cura.QualityProfilesDropDownMenuModel.count; i++) + for (var i = 0; i < Cura.QualityProfilesDropDownMenuModel.rowCount(); i++) { var qualityItem = Cura.QualityProfilesDropDownMenuModel.getItem(i) @@ -183,7 +183,7 @@ Item qualityModel.existingQualityProfile = 0 // check, the ticks count cannot be less than zero - qualityModel.totalTicks = Math.max(0, Cura.QualityProfilesDropDownMenuModel.count - 1) + qualityModel.totalTicks = Math.max(0, Cura.QualityProfilesDropDownMenuModel.rowCount() - 1) } } @@ -731,6 +731,7 @@ Item { anchors.fill: parent anchors.margins: 2 * screenScaleFactor + sourceSize.width: width sourceSize.height: width source: UM.Theme.getIcon(model.icon) color: UM.Theme.getColor("quality_slider_unavailable") @@ -1155,7 +1156,7 @@ Item function populateExtruderModel() { extruderModel.clear(); - for(var extruderNumber = 0; extruderNumber < extruders.count; extruderNumber++) + for(var extruderNumber = 0; extruderNumber < extruders.rowCount() ; extruderNumber++) { extruderModel.append({ text: extruders.getItem(extruderNumber).name, diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index 1e335472d4..5fbddea9ac 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -62,7 +62,7 @@ Item enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled isTopElement: toolsModel.getItem(0).id == model.id - isBottomElement: toolsModel.getItem(toolsModel.count - 1).id == model.id + isBottomElement: toolsModel.getItem(toolsModel.rowCount() - 1).id == model.id toolItem: UM.RecolorImage { diff --git a/resources/qml/ViewsSelector.qml b/resources/qml/ViewsSelector.qml index 1e42a0b3ba..e9fdd57177 100644 --- a/resources/qml/ViewsSelector.qml +++ b/resources/qml/ViewsSelector.qml @@ -19,7 +19,7 @@ Cura.ExpandableComponent property var activeView: { - for (var i = 0; i < viewModel.count; i++) + for (var i = 0; i < viewModel.rowCount(); i++) { if (viewModel.items[i].active) { @@ -74,8 +74,6 @@ Cura.ExpandableComponent { id: viewSelectorPopup width: viewSelector.width - 2 * viewSelector.popupPadding - leftPadding: UM.Theme.getSize("default_lining").width - rightPadding: UM.Theme.getSize("default_lining").width // For some reason the height/width of the column gets set to 0 if this is not set... Component.onCompleted: @@ -93,7 +91,7 @@ Cura.ExpandableComponent { id: viewsSelectorButton text: model.name - width: parent.width - viewSelectorPopup.leftPadding - viewSelectorPopup.rightPadding + width: parent.width height: UM.Theme.getSize("action_button").height leftPadding: UM.Theme.getSize("default_margin").width rightPadding: UM.Theme.getSize("default_margin").width diff --git a/resources/qml/qmldir b/resources/qml/qmldir index 7e57119bc6..2475f398f8 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -1,6 +1,7 @@ module Cura MachineSelector 1.0 MachineSelector.qml +QuickConfigurationSelector 1.0 QuickConfigurationSelector.qml CustomConfigurationSelector 1.0 CustomConfigurationSelector.qml PrintSetupSelector 1.0 PrintSetupSelector.qml ActionButton 1.0 ActionButton.qml diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index d9ef74ebb9..34b944b25b 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -15,7 +15,7 @@ "primary_hover": [48, 182, 231, 255], "primary_text": [255, 255, 255, 204], "border": [127, 127, 127, 255], - "secondary": [95, 95, 95, 255], + "secondary": [241, 242, 242, 255], "main_window_header_button_text_inactive": [128, 128, 128, 255], "main_window_header_button_text_hovered": [255, 255, 255, 255], @@ -196,6 +196,14 @@ "layerview_support_interface": [64, 192, 255, 255], "layerview_nozzle": [181, 166, 66, 120], + "configuration_item": [0, 0, 0, 0], + "configuration_item_active": [12, 169, 227, 179], + "configuration_item_text": [255, 255, 255, 255], + "configuration_item_text_active": [255, 255, 255, 255], + "configuration_item_border": [255, 255, 255, 255], + "configuration_item_border_active": [12, 169, 227, 179], + "configuration_item_border_hover": [12, 169, 227, 179], + "material_compatibility_warning": [255, 255, 255, 255], "quality_slider_unavailable": [179, 179, 179, 255], diff --git a/resources/themes/cura-light/images/header_pattern.svg b/resources/themes/cura-light/images/header_pattern.svg index eff5f01cfa..2a9de2f3e9 100644 --- a/resources/themes/cura-light/images/header_pattern.svg +++ b/resources/themes/cura-light/images/header_pattern.svg @@ -1,1901 +1 @@ - - - - Desktop HD - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file +Pattern \ No newline at end of file diff --git a/resources/themes/cura-light/images/logo_about.svg b/resources/themes/cura-light/images/logo_about.svg deleted file mode 100644 index 34301fd6c9..0000000000 --- a/resources/themes/cura-light/images/logo_about.svg +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 30cf42859a..f2ad2b6f4a 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -73,6 +73,7 @@ QtObject anchors.rightMargin: Theme.getSize("default_margin").width width: Theme.getSize("standard_arrow").width height: Theme.getSize("standard_arrow").height + sourceSize.width: width sourceSize.height: width color: control.enabled ? Theme.getColor("setting_category_text") : Theme.getColor("setting_category_disabled_text") source: Theme.getIcon("arrow_bottom") @@ -145,7 +146,7 @@ QtObject text: control.text anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - font: UM.Theme.getFont("medium") + font: UM.Theme.getFont("medium_bold") color: { if (control.checked) @@ -256,6 +257,7 @@ QtObject anchors.bottomMargin: Theme.getSize("button").height - Math.round(Theme.getSize("button_icon").height / 4) width: Theme.getSize("standard_arrow").width height: Theme.getSize("standard_arrow").height + sourceSize.width: width sourceSize.height: width visible: control.menu != null; color: @@ -527,7 +529,7 @@ QtObject implicitWidth: Theme.getSize("checkbox").width implicitHeight: Theme.getSize("checkbox").height - color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : (control.enabled ? Theme.getColor("checkbox") : Theme.getColor("checkbox_disabled")) + color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox") Behavior on color { ColorAnimation { duration: 50; } } radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : 0 @@ -541,6 +543,7 @@ QtObject anchors.horizontalCenter: parent.horizontalCenter width: Math.round(parent.width / 2.5) height: Math.round(parent.height / 2.5) + sourceSize.width: width sourceSize.height: width color: Theme.getColor("checkbox_mark") source: control.exclusiveGroup ? Theme.getIcon("dot") : Theme.getIcon("check") @@ -582,6 +585,7 @@ QtObject anchors.horizontalCenter: parent.horizontalCenter width: Math.round(parent.width / 2.5) height: Math.round(parent.height / 2.5) + sourceSize.width: width sourceSize.height: width color: Theme.getColor("checkbox_mark") source: @@ -832,6 +836,7 @@ QtObject anchors.horizontalCenter: parent.horizontalCenter width: Math.floor(control.width / 2) height: Math.floor(control.height / 2) + sourceSize.width: width sourceSize.height: width color: { diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 2d7e92be4d..dfad5cfd17 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -41,12 +41,12 @@ "family": "Noto Sans" }, "small": { - "size": 0.85, - "weight": 50, + "size": 1.0, + "weight": 63, "family": "Noto Sans" }, "very_small": { - "size": 0.7, + "size": 1.0, "weight": 50, "family": "Noto Sans" }, @@ -64,6 +64,12 @@ "size": 1.15, "weight": 50, "family": "Noto Sans" + }, + "extruder_icon": + { + "size": 0.7, + "weight": 50, + "family": "Noto Sans" } }, @@ -93,14 +99,14 @@ "secondary_button_hover": [228, 228, 228, 255], "secondary_button_text": [30, 102, 215, 255], - "main_window_header_background": [8, 7, 63, 255], + "main_window_header_background": [10, 8, 80, 255], "main_window_header_background_gradient": [25, 23, 91, 255], - "main_window_header_button_text_active": [8, 7, 63, 255], + "main_window_header_button_text_active": [10, 8, 80, 255], "main_window_header_button_text_inactive": [255, 255, 255, 255], "main_window_header_button_text_hovered": [255, 255, 255, 255], "main_window_header_button_background_active": [255, 255, 255, 255], "main_window_header_button_background_inactive": [255, 255, 255, 0], - "main_window_header_button_background_hovered": [117, 114, 159, 255], + "main_window_header_button_background_hovered": [255, 255, 255, 102], "account_widget_outline_active": [70, 66, 126, 255], @@ -108,13 +114,12 @@ "machine_selector_active": [68, 72, 75, 255], "machine_selector_hover": [68, 72, 75, 255], "machine_selector_text_active": [255, 255, 255, 255], - "machine_selector_printer_icon": [8, 7, 63, 255], "action_panel_secondary": [27, 95, 202, 255], "toolbar_background": [255, 255, 255, 255], - "printer_type_label_background": [228, 228, 242, 255], + "printer_type_label_background": [171, 171, 191, 255], "text": [0, 0, 0, 255], "text_detail": [174, 174, 174, 128], @@ -128,9 +133,9 @@ "text_scene_hover": [70, 84, 113, 255], "error": [255, 140, 0, 255], - "warning": [245, 166, 35, 255], + "warning": [255, 190, 35, 255], - "toolbar_button_text": [8, 7, 63, 255], + "toolbar_button_text": [10, 8, 80, 255], "toolbar_button_hover": [232, 242, 252, 255], "toolbar_button_active": [232, 242, 252, 255], "toolbar_button_active_hover": [232, 242, 252, 255], @@ -145,9 +150,9 @@ "button_text_active_hover": [255, 255, 255, 255], "small_button": [0, 0, 0, 0], - "small_button_hover": [8, 7, 63, 255], - "small_button_active": [8, 7, 63, 255], - "small_button_active_hover": [8, 7, 63, 255], + "small_button_hover": [10, 8, 80, 255], + "small_button_active": [10, 8, 80, 255], + "small_button_active_hover": [10, 8, 80, 255], "small_button_text": [171, 171, 191, 255], "small_button_text_hover": [255, 255, 255, 255], "small_button_text_active": [255, 255, 255, 255], @@ -223,8 +228,8 @@ "progressbar_control": [50, 130, 255, 255], "slider_groove": [223, 223, 223, 255], - "slider_groove_fill": [8, 7, 63, 255], - "slider_handle": [8, 7, 63, 255], + "slider_groove_fill": [10, 8, 80, 255], + "slider_handle": [10, 8, 80, 255], "slider_handle_active": [50, 130, 255, 255], "slider_text_background": [255, 255, 255, 255], @@ -236,7 +241,6 @@ "checkbox_border": [64, 69, 72, 255], "checkbox_border_hover": [50, 130, 255, 255], "checkbox_mark": [119, 122, 124, 255], - "checkbox_disabled": [223, 223, 223, 255], "checkbox_text": [27, 27, 27, 255], "tooltip": [68, 192, 255, 255], @@ -306,6 +310,14 @@ "layerview_support_interface": [64, 192, 255, 255], "layerview_nozzle": [181, 166, 66, 50], + "configuration_item": [255, 255, 255, 0], + "configuration_item_active": [12, 169, 227, 32], + "configuration_item_text": [0, 0, 0, 255], + "configuration_item_text_active": [0, 0, 0, 255], + "configuration_item_border": [127, 127, 127, 255], + "configuration_item_border_active": [12, 169, 227, 32], + "configuration_item_border_hover": [50, 130, 255, 255], + "tab_status_connected": [50, 130, 255, 255], "tab_status_disconnected": [200, 200, 200, 255], @@ -365,6 +377,7 @@ "action_panel_widget": [25.0, 0.0], "action_panel_information_widget": [20.0, 0.0], + "action_panel_button": [15.0, 3.0], "machine_selector_widget": [20.0, 4.0], "machine_selector_widget_content": [25.0, 32.0], @@ -410,9 +423,6 @@ "button_icon": [2.5, 2.5], "button_lining": [0, 0], - "action_button": [15.0, 3.0], - "action_button_radius": [0.15, 0.15], - "small_button": [2, 2], "small_button_icon": [1.5, 1.5], @@ -501,6 +511,9 @@ "avatar_image": [6.8, 6.8], + "action_button": [15.0, 3.0], + "action_button_radius": [0.15, 0.15], + "monitor_config_override_box": [1.0, 14.0], "monitor_extruder_circle": [2.75, 2.75], "monitor_text_line": [1.16, 1.16],