Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-12-05 15:56:21 +0300
committerDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-12-05 15:56:21 +0300
commit07d58c3aef20ed396e2d2c134ce70cc1979522a0 (patch)
tree83c82fa59662b4b7393876bd11b99c5a41a58d09
parent0e22f6b672a29c8b57309332a1f77355f151f870 (diff)
parent024bf409c9804eb83c3ee4c64fbc969e09dace8f (diff)
Merge branch 'ui_rework_4_0' into CURA-5941_restyle_setting_dropdown
-rwxr-xr-xcura/Settings/ExtruderManager.py4
-rw-r--r--cura/Settings/ExtruderStack.py4
-rw-r--r--cura/Settings/ExtrudersModel.py6
-rwxr-xr-xcura/Settings/MachineManager.py4
-rw-r--r--plugins/CuraEngineBackend/ProcessSlicedLayersJob.py2
-rw-r--r--plugins/MachineSettingsAction/MachineSettingsAction.qml4
-rw-r--r--plugins/ModelChecker/ModelChecker.qml1
-rw-r--r--plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml1
-rw-r--r--plugins/PostProcessingPlugin/PostProcessingPlugin.qml4
-rw-r--r--plugins/PrepareStage/PrepareMenu.qml3
-rw-r--r--plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml8
-rw-r--r--plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml2
-rw-r--r--plugins/Toolbox/resources/qml/ToolboxDetailPage.qml16
-rw-r--r--plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml3
-rw-r--r--plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml2
-rw-r--r--plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml2
-rw-r--r--plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml4
-rw-r--r--resources/qml/ActionButton.qml14
-rw-r--r--resources/qml/ActionPanel/OutputDevicesActionButton.qml2
-rw-r--r--resources/qml/ActionPanel/OutputProcessWidget.qml10
-rw-r--r--resources/qml/ActionPanel/PrintInformationWidget.qml3
-rw-r--r--resources/qml/ActionPanel/PrintJobInformation.qml8
-rw-r--r--resources/qml/ActionPanel/SliceProcessWidget.qml7
-rw-r--r--resources/qml/CustomConfigurationSelector.qml357
-rw-r--r--resources/qml/Dialogs/AboutDialog.qml2
-rw-r--r--resources/qml/Dialogs/AddMachineDialog.qml5
-rw-r--r--resources/qml/ExtruderIcon.qml7
-rw-r--r--resources/qml/IconLabel.qml3
-rw-r--r--resources/qml/IconWithText.qml2
-rw-r--r--resources/qml/JobSpecs.qml3
-rw-r--r--resources/qml/MainWindow/MainWindowHeader.qml3
-rw-r--r--resources/qml/Menus/ConfigurationMenu/AutoConfiguration.qml38
-rw-r--r--resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml196
-rw-r--r--resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml55
-rw-r--r--resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml181
-rw-r--r--resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml246
-rw-r--r--resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml95
-rw-r--r--resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml242
-rw-r--r--resources/qml/Menus/ConfigurationMenu/SyncButton.qml102
-rw-r--r--resources/qml/Menus/ProfileMenu.qml8
-rw-r--r--resources/qml/ObjectsList.qml3
-rw-r--r--resources/qml/Preferences/MachinesPage.qml8
-rw-r--r--resources/qml/Preferences/Materials/MaterialsBrandSection.qml5
-rw-r--r--resources/qml/Preferences/Materials/MaterialsList.qml8
-rw-r--r--resources/qml/Preferences/Materials/MaterialsSlot.qml2
-rw-r--r--resources/qml/Preferences/Materials/MaterialsTypeSection.qml2
-rw-r--r--resources/qml/Preferences/ProfilesPage.qml24
-rw-r--r--resources/qml/Preferences/SettingVisibilityPage.qml2
-rw-r--r--resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml2
-rw-r--r--resources/qml/PrinterOutput/ExtruderBox.qml2
-rw-r--r--resources/qml/PrinterOutput/HeatedBedBox.qml2
-rw-r--r--resources/qml/PrinterOutput/OutputDeviceHeader.qml4
-rw-r--r--resources/qml/PrinterSelector/MachineSelector.qml3
-rw-r--r--resources/qml/PrinterTypeLabel.qml (renamed from resources/qml/PrinterSelector/PrinterTypeLabel.qml)2
-rw-r--r--resources/qml/Settings/SettingCategory.qml1
-rw-r--r--resources/qml/Settings/SettingCheckBox.qml1
-rw-r--r--resources/qml/Settings/SettingOptionalExtruder.qml13
-rw-r--r--resources/qml/Settings/SettingView.qml2
-rw-r--r--resources/qml/Toolbar.qml2
-rw-r--r--resources/qml/ViewsSelector.qml2
-rw-r--r--resources/qml/qmldir1
-rw-r--r--resources/themes/cura-dark/theme.json10
-rwxr-xr-xresources/themes/cura-light/styles.qml7
-rw-r--r--resources/themes/cura-light/theme.json28
64 files changed, 720 insertions, 1075 deletions
diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py
index 9089ba96e9..b0bcf3b100 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._active_extruder_index)].getId()
+ return self._extruder_trains[self._application.getGlobalContainerStack().getId()][str(self.activeExtruderIndex)].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._active_extruder_index)
+ return self.getExtruderStack(self.activeExtruderIndex)
## 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 d7faedb71c..d626ef06da 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 "enabled" not in self._metadata:
- self.setMetaDataEntry("enabled", "True")
+ if self.getMetaDataEntry("enabled", True) == enabled: #No change.
+ return #Don't emit a signal then.
self.setMetaDataEntry("enabled", str(enabled))
self.enabledChanged.emit()
diff --git a/cura/Settings/ExtrudersModel.py b/cura/Settings/ExtrudersModel.py
index 14a8dadc69..5f10ac99d4 100644
--- a/cura/Settings/ExtrudersModel.py
+++ b/cura/Settings/ExtrudersModel.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Ultimaker B.V.
+# Copyright (c) 2018 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.rowCount() != 0:
+ if self.count != 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") # Get the position
+ position = extruder.getMetaDataEntry("position", default = "0")
try:
position = int(position)
except ValueError:
diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py
index 53390ca88d..a472cc7f09 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 594bf3a43e..71c96880e8 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")) # Get the position
+ position = int(extruder.getMetaDataEntry("position", default = "0"))
try:
default_color = ExtrudersModel.defaultColors[position]
except IndexError:
diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml
index 004b4e3cfc..c88a721a84 100644
--- a/plugins/MachineSettingsAction/MachineSettingsAction.qml
+++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml
@@ -1,4 +1,4 @@
-// Copyright (c) 2016 Ultimaker B.V.
+// Copyright (c) 2018 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.rowCount();
+ var extruderCount = base.extrudersModel.count;
base.extruderTabsCount = extruderCount;
}
}
diff --git a/plugins/ModelChecker/ModelChecker.qml b/plugins/ModelChecker/ModelChecker.qml
index 5e41591d6b..437df29516 100644
--- a/plugins/ModelChecker/ModelChecker.qml
+++ b/plugins/ModelChecker/ModelChecker.qml
@@ -33,7 +33,6 @@ 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 5d4e17a102..0e2bd88619 100644
--- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
+++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
@@ -265,7 +265,6 @@ 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 bd4d361d35..3fa10c23b9 100644
--- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml
+++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml
@@ -141,7 +141,6 @@ 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")
@@ -176,7 +175,6 @@ 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")
@@ -211,7 +209,6 @@ 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")
@@ -498,7 +495,6 @@ 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 0191396e7b..b7980bc30b 100644
--- a/plugins/PrepareStage/PrepareMenu.qml
+++ b/plugins/PrepareStage/PrepareMenu.qml
@@ -56,7 +56,7 @@ Item
color: UM.Theme.getColor("lining")
}
- Cura.QuickConfigurationSelector
+ Cura.ConfigurationMenu
{
Layout.fillHeight: true
Layout.fillWidth: true
@@ -102,7 +102,6 @@ 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/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml
index 4aaea20813..9c1df0c49e 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("very_small")
+ font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_medium")
}
Label
{
text: catalog.i18nc("@label", "Email") + ":"
- font: UM.Theme.getFont("very_small")
+ font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_medium")
}
}
@@ -118,7 +118,7 @@ Item
}
return ""
}
- font: UM.Theme.getFont("very_small")
+ font: UM.Theme.getFont("default")
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("very_small")
+ font: UM.Theme.getFont("default")
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 4a6268df42..d4c0ae14eb 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("very_small")
+ font: UM.Theme.getFont("default")
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 c5e9bb0a49..9e2e178b71 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("very_small")
+ font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_medium")
}
Label
{
text: catalog.i18nc("@label", "Last updated") + ":"
- font: UM.Theme.getFont("very_small")
+ font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_medium")
}
Label
{
text: catalog.i18nc("@label", "Author") + ":"
- font: UM.Theme.getFont("very_small")
+ font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_medium")
}
Label
{
text: catalog.i18nc("@label", "Downloads") + ":"
- font: UM.Theme.getFont("very_small")
+ font: UM.Theme.getFont("default")
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("very_small")
+ font: UM.Theme.getFont("default")
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("very_small")
+ font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
}
Label
@@ -149,7 +149,7 @@ Item
return "<a href=\"" + details.website + "\">" + details.author_name + "</a>"
}
}
- font: UM.Theme.getFont("very_small")
+ font: UM.Theme.getFont("default")
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("very_small")
+ font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
}
}
diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml
index 887140bbfa..61374f9d99 100644
--- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml
+++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml
@@ -52,7 +52,6 @@ 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")
@@ -81,7 +80,7 @@ Item
width: parent.width
wrapMode: Text.WordWrap
color: UM.Theme.getColor("text_medium")
- font: UM.Theme.getFont("very_small")
+ font: UM.Theme.getFont("default")
}
}
}
diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml
index 4fb70541d2..8a2fdc8bc8 100644
--- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml
+++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml
@@ -48,8 +48,6 @@ 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/MonitorBuildplateConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml
index 75cbf3b11d..44bd47f904 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("very_small") // 12pt, regular
+ font: UM.Theme.getFont("default") // 12pt, regular
text: ""
// FIXED-LINE-HEIGHT:
diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml
index afbd4c3641..1e53191d8c 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("very_small") // 12pt, regular
+ font: UM.Theme.getFont("default") // 12pt, regular
text: ""
// FIXED-LINE-HEIGHT:
@@ -66,7 +66,7 @@ Item
}
color: "#191919" // TODO: Theme!
elide: Text.ElideRight
- font: UM.Theme.getFont("small") // 12pt, bold
+ font: UM.Theme.getFont("default_bold") // 12pt, bold
text: ""
// FIXED-LINE-HEIGHT:
diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml
index 6fab25966f..177ba7c84f 100644
--- a/resources/qml/ActionButton.qml
+++ b/resources/qml/ActionButton.qml
@@ -11,7 +11,7 @@ Button
{
id: button
property alias iconSource: buttonIconLeft.source
- property var iconOnRightSide: false
+ property bool isIconOnRightSide: false
property alias textFont: buttonText.font
property alias cornerRadius: backgroundRect.radius
property alias tooltip: tooltip.text
@@ -32,9 +32,13 @@ 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
{
- //Icon if displayed on the left side.
+ //Left side icon. Only displayed if !isIconOnRightSide.
UM.RecolorImage
{
id: buttonIconLeft
@@ -44,7 +48,7 @@ Button
sourceSize.width: width
sourceSize.height: height
color: button.hovered ? button.textHoverColor : button.textColor
- visible: source != "" && !button.iconOnRightSide
+ visible: source != "" && !button.isIconOnRightSide
anchors.verticalCenter: parent.verticalCenter
}
@@ -62,7 +66,7 @@ Button
elide: Text.ElideRight
}
- //Icon if displayed on the right side.
+ //Right side icon. Only displayed if isIconOnRightSide.
UM.RecolorImage
{
id: buttonIconRight
@@ -72,7 +76,7 @@ Button
sourceSize.width: width
sourceSize.height: height
color: buttonIconLeft.color
- visible: source != "" && button.iconOnRightSide
+ visible: source != "" && button.isIconOnRightSide
anchors.verticalCenter: buttonIconLeft.verticalCenter
}
}
diff --git a/resources/qml/ActionPanel/OutputDevicesActionButton.qml b/resources/qml/ActionPanel/OutputDevicesActionButton.qml
index 2111038cfc..12e4ac42fd 100644
--- a/resources/qml/ActionPanel/OutputDevicesActionButton.qml
+++ b/resources/qml/ActionPanel/OutputDevicesActionButton.qml
@@ -51,6 +51,8 @@ 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 6ab8dc6fbb..d1790b3791 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("small")
+ font: UM.Theme.getFont("default_bold")
}
Cura.IconLabel
@@ -84,7 +84,7 @@ Column
return totalWeights + "g · " + totalLengths.toFixed(2) + "m"
}
source: UM.Theme.getIcon("spool")
- font: UM.Theme.getFont("very_small")
+ font: UM.Theme.getFont("default")
}
}
@@ -111,7 +111,7 @@ Column
{
id: previewStageShortcut
- height: UM.Theme.getSize("action_panel_button").height
+ height: UM.Theme.getSize("action_button").height
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Preview")
@@ -125,8 +125,8 @@ Column
Cura.OutputDevicesActionButton
{
- width: previewStageShortcut.visible ? UM.Theme.getSize("action_panel_button").width : parent.width
- height: UM.Theme.getSize("action_panel_button").height
+ width: previewStageShortcut.visible ? UM.Theme.getSize("action_button").width : parent.width
+ height: UM.Theme.getSize("action_button").height
}
}
} \ No newline at end of file
diff --git a/resources/qml/ActionPanel/PrintInformationWidget.qml b/resources/qml/ActionPanel/PrintInformationWidget.qml
index 25e380dea8..554273a818 100644
--- a/resources/qml/ActionPanel/PrintInformationWidget.qml
+++ b/resources/qml/ActionPanel/PrintInformationWidget.qml
@@ -15,9 +15,6 @@ 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 156111af4d..8bd5d5a0d3 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("small")
+ font: UM.Theme.getFont("default_bold")
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("very_small")
+ font: UM.Theme.getFont("default")
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("small")
+ font: UM.Theme.getFont("default_bold")
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("very_small")
+ font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
textFormat: Text.RichText
}
diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml
index 03d91db530..8f6608e15c 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("very_small")
+ font: UM.Theme.getFont("default")
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("very_small")
+ font: UM.Theme.getFont("default")
}
// Progress bar, only visible when the backend is in the process of slice the printjob
@@ -94,7 +94,6 @@ Column
}
}
-
Item
{
id: prepareButtons
@@ -103,7 +102,7 @@ Column
// Disable the slice process when
width: parent.width
- height: UM.Theme.getSize("action_panel_button").height
+ height: UM.Theme.getSize("action_button").height
visible: !autoSlice
Cura.PrimaryButton
{
diff --git a/resources/qml/CustomConfigurationSelector.qml b/resources/qml/CustomConfigurationSelector.qml
deleted file mode 100644
index c78ca700da..0000000000
--- a/resources/qml/CustomConfigurationSelector.qml
+++ /dev/null
@@ -1,357 +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 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: "<a href='%1'>" + catalog.i18nc("@label", "Check compatibility") + "</a>"
- 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 25c9bbf74b..94eca4e7c0 100644
--- a/resources/qml/Dialogs/AboutDialog.qml
+++ b/resources/qml/Dialogs/AboutDialog.qml
@@ -39,8 +39,6 @@ UM.Dialog
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 8e966c3df7..f00359869c 100644
--- a/resources/qml/Dialogs/AddMachineDialog.qml
+++ b/resources/qml/Dialogs/AddMachineDialog.qml
@@ -1,4 +1,4 @@
-// Copyright (c) 2017 Ultimaker B.V.
+// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
@@ -156,7 +156,6 @@ 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")
@@ -170,7 +169,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.rowCount(); i++)
+ for(var i = 0; i < machineList.model.count; i++)
{
var item = machineList.model.getItem(i);
if (item.section == section)
diff --git a/resources/qml/ExtruderIcon.qml b/resources/qml/ExtruderIcon.qml
index c1a202050b..49ad73a32e 100644
--- a/resources/qml/ExtruderIcon.qml
+++ b/resources/qml/ExtruderIcon.qml
@@ -22,8 +22,6 @@ Item
id: mainIcon
anchors.fill: parent
- sourceSize.width: parent.width
- sourceSize.height: parent.height
source: UM.Theme.getIcon("extruder_button")
color: extruderEnabled ? materialColor: "gray"
}
@@ -50,7 +48,9 @@ Item
id: extruderNumberText
anchors.centerIn: parent
text: index + 1
- font: UM.Theme.getFont("extruder_icon")
+ font: UM.Theme.getFont("very_small")
+ width: contentWidth
+ height: contentHeight
visible: extruderEnabled
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignHCenter
@@ -62,7 +62,6 @@ 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 ee4a1254ec..ed41fba499 100644
--- a/resources/qml/IconLabel.qml
+++ b/resources/qml/IconLabel.qml
@@ -30,9 +30,6 @@ Item
width: UM.Theme.getSize("section_icon").width
height: width
- sourceSize.width: width
- sourceSize.height: height
-
color: label.color
visible: source != ""
}
diff --git a/resources/qml/IconWithText.qml b/resources/qml/IconWithText.qml
index dcb3ef7851..22599b3aed 100644
--- a/resources/qml/IconWithText.qml
+++ b/resources/qml/IconWithText.qml
@@ -37,8 +37,6 @@ 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 45111992c1..935cb723de 100644
--- a/resources/qml/JobSpecs.qml
+++ b/resources/qml/JobSpecs.qml
@@ -60,7 +60,6 @@ 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");
@@ -124,7 +123,7 @@ Item {
}
height: UM.Theme.getSize("jobspecs_line").height
verticalAlignment: Text.AlignVCenter
- font: UM.Theme.getFont("small")
+ font: UM.Theme.getFont("default_bold")
color: UM.Theme.getColor("text_scene")
text: CuraApplication.getSceneBoundingBoxString
}
diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml
index 34936e9b5a..fa0594e2ae 100644
--- a/resources/qml/MainWindow/MainWindowHeader.qml
+++ b/resources/qml/MainWindow/MainWindowHeader.qml
@@ -54,9 +54,6 @@ Rectangle
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
new file mode 100644
index 0000000000..58b6bac089
--- /dev/null
+++ b/resources/qml/Menus/ConfigurationMenu/AutoConfiguration.qml
@@ -0,0 +1,38 @@
+// 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: visible ? childrenRect.height : 0
+
+ Label
+ {
+ id: header
+ text: catalog.i18nc("@header", "Configurations")
+ font: UM.Theme.getFont("large")
+ color: UM.Theme.getColor("text")
+ height: contentHeight
+
+ 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 7427b5ddff..af2712be44 100644
--- a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml
+++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml
@@ -7,143 +7,129 @@ import QtQuick.Controls 2.0
import UM 1.2 as UM
import Cura 1.0 as Cura
-Rectangle
+Button
{
id: configurationItem
property var configuration: null
- property var selected: false
- signal activateConfiguration()
+ hoverEnabled: true
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")
- function updateBorderColor()
+ background: Rectangle
{
- border.color = selected ? UM.Theme.getColor("configuration_item_border_active") : UM.Theme.getColor("configuration_item_border")
- }
-
- Column
- {
- id: contentColumn
- width: parent.width
- padding: UM.Theme.getSize("default_margin").width
- spacing: Math.round(UM.Theme.getSize("default_margin").height / 2)
+ 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
- Row
+ Column
{
- id: extruderRow
+ id: contentColumn
+ width: parent.width
+ padding: UM.Theme.getSize("wide_margin").width
+ spacing: Math.round(UM.Theme.getSize("default_margin").height / 2)
- width: parent.width - 2 * parent.padding
- height: childrenRect.height
-
- spacing: UM.Theme.getSize("default_margin").width
-
- Repeater
+ Row
{
- id: repeater
- height: childrenRect.height
- model: configuration.extruderConfigurations
- delegate: PrintCoreConfiguration
+ id: extruderRow
+
+ anchors
{
- width: Math.round(parent.width / 2)
- printCoreConfiguration: modelData
- mainColor: textColor
+ left: parent.left
+ leftMargin: parent.padding
+ right: parent.right
+ rightMargin: parent.padding
}
- }
- }
-
- //Buildplate row separator
- Rectangle
- {
- id: separator
+ height: childrenRect.height
- visible: buildplateInformation.visible
- width: parent.width - 2 * parent.padding
- height: visible ? Math.round(UM.Theme.getSize("thick_lining").height / 2) : 0
- color: textColor
- }
+ spacing: UM.Theme.getSize("default_margin").width
- Item
- {
- 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
+ Repeater
+ {
+ id: repeater
+ height: childrenRect.height
+ model: configuration.extruderConfigurations
+ delegate: PrintCoreConfiguration
+ {
+ width: Math.round(parent.width / 2)
+ printCoreConfiguration: modelData
+ }
+ }
}
- Label
+ //Buildplate row separator
+ Rectangle
{
- 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
+ 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")
}
- }
- }
- MouseArea
- {
- 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)
+ Item
{
- configurationItem.color = UM.Theme.getColor("wide_lining")
+ 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")
+ }
}
}
- onExited:
+
+ Connections
{
- updateBorderColor()
- if (configurationItem.selected == false)
+ target: Cura.MachineManager
+ onCurrentConfigurationChanged:
{
- configurationItem.color = UM.Theme.getColor("configuration_item")
+ configurationItem.checked = Cura.MachineManager.matchesConfiguration(configuration)
}
}
- }
- Connections
- {
- target: Cura.MachineManager
- onCurrentConfigurationChanged: {
- configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
- updateBorderColor()
+ Component.onCompleted:
+ {
+ configurationItem.checked = Cura.MachineManager.matchesConfiguration(configuration)
}
}
- Component.onCompleted:
+ onClicked:
{
- 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")
- }
+ Cura.MachineManager.applyRemoteConfiguration(configuration)
}
} \ No newline at end of file
diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml
index 210ff6057f..5a9f72260c 100644
--- a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml
+++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml
@@ -2,8 +2,7 @@
// 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 QtQuick.Controls 2.3
import UM 1.2 as UM
import Cura 1.0 as Cura
@@ -12,9 +11,7 @@ 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()
@@ -27,38 +24,16 @@ 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 - parent.padding
+ width: parent.width
height: Math.min(configurationList.contentHeight, 350 * screenScaleFactor)
- style: UM.Theme.styles.scrollview
- __wheelAreaScrollSpeed: 75 // Scroll three lines in one scroll event
+ ButtonGroup
+ {
+ buttons: configurationList.children
+ }
ListView
{
@@ -69,18 +44,22 @@ Column
section.property: "modelData.printerType"
section.criteria: ViewSection.FullString
- section.delegate: sectionHeading
+ section.delegate: Item
+ {
+ height: printerTypeLabel.height + UM.Theme.getSize("default_margin").height
+ Cura.PrinterTypeLabel
+ {
+ id: printerTypeLabel
+ text: Cura.MachineManager.getAbbreviatedMachineName(section)
+ }
+ }
model: (outputDevice != null) ? outputDevice.uniqueConfigurations : []
+
delegate: ConfigurationItem
{
- width: parent.width - UM.Theme.getSize("default_margin").width
+ width: parent.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
new file mode 100644
index 0000000000..0eee394743
--- /dev/null
+++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml
@@ -0,0 +1,181 @@
+// 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.ExpandablePopup
+{
+ id: base
+
+ Cura.ExtrudersModel
+ {
+ id: extrudersModel
+ }
+
+ UM.I18nCatalog
+ {
+ id: catalog
+ name: "cura"
+ }
+
+ enum ConfigurationMethod
+ {
+ AUTO,
+ CUSTOM
+ }
+
+ 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.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")
+
+ 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
+ }
+ }
+ }
+ }
+ }
+
+ contentItem: 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
+
+ width: parent.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
new file mode 100644
index 0000000000..18c2dabb0f
--- /dev/null
+++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
@@ -0,0 +1,246 @@
+// 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: visible ? childrenRect.height : 0
+
+ Label
+ {
+ id: header
+ text: catalog.i18nc("@header", "Custom")
+ font: UM.Theme.getFont("large")
+ color: UM.Theme.getColor("text")
+ height: contentHeight
+
+ 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
+ }
+
+ 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
+ }
+
+ 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
+ }
+
+ 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 73fc342d66..885f02d740 100644
--- a/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml
+++ b/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml
@@ -5,87 +5,50 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import UM 1.2 as UM
+import Cura 1.0 as Cura
-
-Column
+Row
{
id: extruderInfo
property var printCoreConfiguration
- property var mainColor: "black"
- spacing: Math.round(UM.Theme.getSize("default_margin").height / 2)
- height: childrenRect.height
+ height: information.height
+ spacing: UM.Theme.getSize("default_margin").width
- Item
+ //Extruder icon.
+ Cura.ExtruderIcon
{
- id: extruder
- width: parent.width
- height: childrenRect.height
+ materialColor: printCoreConfiguration.material.color
+ anchors.verticalCenter: parent.verticalCenter
+ extruderEnabled: printCoreConfiguration.material.name !== "" && printCoreConfiguration.hotendID !== ""
+ }
+ Column
+ {
+ id: information
Label
{
- id: extruderLabel
- text: catalog.i18nc("@label:extruder label", "Extruder")
+ text: printCoreConfiguration.material.brand ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct.
renderType: Text.NativeRendering
elide: Text.ElideRight
- anchors.left: parent.left
font: UM.Theme.getFont("default")
- color: mainColor
+ color: UM.Theme.getColor("text_inactive")
}
-
- // Rounded item to show the extruder number
- Item
+ Label
{
- 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
- }
+ 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")
}
- }
-
- Label
- {
- 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
deleted file mode 100644
index 138a1d6669..0000000000
--- a/resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml
+++ /dev/null
@@ -1,242 +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 QtQuick.Layouts 1.3
-
-import QtQuick.Controls 1.1 as OldControls
-
-import UM 1.2 as UM
-import Cura 1.0 as Cura
-
-
-Cura.ExpandablePopup
-{
- id: base
-
- Cura.ExtrudersModel
- {
- id: extrudersModel
- }
-
- UM.I18nCatalog
- {
- id: catalog
- name: "cura"
- }
-
- 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
- }
- }
- }
- }
- }
-
- contentItem: 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
deleted file mode 100644
index 558ae1e477..0000000000
--- a/resources/qml/Menus/ConfigurationMenu/SyncButton.qml
+++ /dev/null
@@ -1,102 +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 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 fd46d2ef72..bf950aa409 100644
--- a/resources/qml/Menus/ProfileMenu.qml
+++ b/resources/qml/Menus/ProfileMenu.qml
@@ -37,7 +37,7 @@ Menu
MenuSeparator
{
id: customSeparator
- visible: Cura.CustomQualityProfilesDropDownMenuModel.rowCount > 0
+ visible: Cura.CustomQualityProfilesDropDownMenuModel.count > 0
}
Instantiator
@@ -48,7 +48,7 @@ Menu
Connections
{
target: Cura.CustomQualityProfilesDropDownMenuModel
- onModelReset: customSeparator.visible = Cura.CustomQualityProfilesDropDownMenuModel.rowCount() > 0
+ onModelReset: customSeparator.visible = Cura.CustomQualityProfilesDropDownMenuModel.count > 0
}
MenuItem
@@ -62,12 +62,12 @@ Menu
onObjectAdded:
{
- customSeparator.visible = model.rowCount() > 0;
+ customSeparator.visible = model.count > 0;
menu.insertItem(index, object);
}
onObjectRemoved:
{
- customSeparator.visible = model.rowCount() > 0;
+ customSeparator.visible = model.count > 0;
menu.removeItem(object);
}
}
diff --git a/resources/qml/ObjectsList.qml b/resources/qml/ObjectsList.qml
index 8c8eaa16ae..8f45b3744f 100644
--- a/resources/qml/ObjectsList.qml
+++ b/resources/qml/ObjectsList.qml
@@ -1,4 +1,4 @@
-// Copyright (c) 2017 Ultimaker B.V.
+// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
@@ -55,7 +55,6 @@ 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 4dc5465dc6..bc75b9bc72 100644
--- a/resources/qml/Preferences/MachinesPage.qml
+++ b/resources/qml/Preferences/MachinesPage.qml
@@ -21,8 +21,10 @@ UM.ManagementPage
function activeMachineIndex()
{
- for(var i = 0; i < model.rowCount(); i++) {
- if (model.getItem(i).id == Cura.MachineManager.activeMachineId) {
+ for(var i = 0; i < model.count; i++)
+ {
+ if (model.getItem(i).id == Cura.MachineManager.activeMachineId)
+ {
return i;
}
}
@@ -47,7 +49,7 @@ UM.ManagementPage
{
text: catalog.i18nc("@action:button", "Remove");
iconName: "list-remove";
- enabled: base.currentItem != null && model.rowCount() > 1
+ enabled: base.currentItem != null && model.count > 1
onClicked: confirmDialog.open();
},
Button
diff --git a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml
index c8f391dfb0..a3a0e4708f 100644
--- a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml
+++ b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml
@@ -55,7 +55,8 @@ Rectangle
text: ""
implicitWidth: UM.Theme.getSize("favorites_button").width
implicitHeight: UM.Theme.getSize("favorites_button").height
- UM.RecolorImage {
+ UM.RecolorImage
+ {
anchors
{
verticalCenter: parent.verticalCenter
@@ -63,8 +64,6 @@ 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 00bead9650..61f92db84c 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.rowCount(); material_idx++)
+ for (var material_idx = 0; material_idx < genericMaterialsModel.count; 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.rowCount(); brand_idx++)
+ for (var brand_idx = 0; brand_idx < materialsModel.count; brand_idx++)
{
var brand = materialsModel.getItem(brand_idx)
var types_model = brand.material_types
- for (var type_idx = 0; type_idx < types_model.rowCount(); type_idx++)
+ for (var type_idx = 0; type_idx < types_model.count; type_idx++)
{
var type = types_model.getItem(type_idx)
var colors_model = type.colors
- for (var material_idx = 0; material_idx < colors_model.rowCount(); material_idx++)
+ for (var material_idx = 0; material_idx < colors_model.count; 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 a5af17f47a..a706aaf2b9 100644
--- a/resources/qml/Preferences/Materials/MaterialsSlot.qml
+++ b/resources/qml/Preferences/Materials/MaterialsSlot.qml
@@ -95,8 +95,6 @@ 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 f62fc4ee16..f98c19e0b3 100644
--- a/resources/qml/Preferences/Materials/MaterialsTypeSection.qml
+++ b/resources/qml/Preferences/Materials/MaterialsTypeSection.qml
@@ -74,8 +74,6 @@ 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 ba0c2848a5..d7ffbb3152 100644
--- a/resources/qml/Preferences/ProfilesPage.qml
+++ b/resources/qml/Preferences/ProfilesPage.qml
@@ -188,21 +188,27 @@ 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.rowCount(); ++idx) {
+ for (var idx = 0; idx < qualitiesModel.count; ++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);
}
@@ -382,9 +388,11 @@ Item
var selectedItemName = Cura.MachineManager.activeQualityOrQualityChangesName;
// Select the required quality name if given
- for (var idx = 0; idx < qualitiesModel.rowCount(); idx++) {
+ for (var idx = 0; idx < qualitiesModel.count; 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 2edbeee960..3f7571a170 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.rowCount(null))
+ else if(definitionsModel.visibleCount == definitionsModel.count)
{
return Qt.Checked
}
diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml
index 522b038423..47d25edd54 100644
--- a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml
+++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml
@@ -192,7 +192,7 @@ Item
rightPadding: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Custom")
iconSource: UM.Theme.getIcon("arrow_right")
- iconOnRightSide: true
+ isIconOnRightSide: true
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended
onClicked: currentModeIndex = PrintSetupSelectorContents.Mode.Custom
}
diff --git a/resources/qml/PrinterOutput/ExtruderBox.qml b/resources/qml/PrinterOutput/ExtruderBox.qml
index f5a1bd75c4..247bb3a27d 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("small")
+ font: UM.Theme.getFont("default_bold")
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 8c99814e02..33cf5cd1e2 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("small")
+ font: UM.Theme.getFont("default_bold")
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 e6328546ef..16280eab5f 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("small")
+ font: UM.Theme.getFont("default_bold")
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("very_small")
+ font: UM.Theme.getFont("default")
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 ef766b6030..f2df04d9d6 100644
--- a/resources/qml/PrinterSelector/MachineSelector.qml
+++ b/resources/qml/PrinterSelector/MachineSelector.qml
@@ -58,9 +58,6 @@ Cura.ExpandablePopup
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/PrinterTypeLabel.qml b/resources/qml/PrinterTypeLabel.qml
index cd9f3b9743..7feae32e16 100644
--- a/resources/qml/PrinterSelector/PrinterTypeLabel.qml
+++ b/resources/qml/PrinterTypeLabel.qml
@@ -28,7 +28,7 @@ Item
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
renderType: Text.NativeRendering
- font: UM.Theme.getFont("very_small")
+ font: UM.Theme.getFont("default")
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 be93f8ffab..5676bcedf9 100644
--- a/resources/qml/Settings/SettingCategory.qml
+++ b/resources/qml/Settings/SettingCategory.qml
@@ -105,7 +105,6 @@ 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:
{
diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml
index f53a696343..0c7321d08a 100644
--- a/resources/qml/Settings/SettingCheckBox.qml
+++ b/resources/qml/Settings/SettingCheckBox.qml
@@ -125,7 +125,6 @@ SettingItem
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 53044b0f82..200a3f64f1 100644
--- a/resources/qml/Settings/SettingOptionalExtruder.qml
+++ b/resources/qml/Settings/SettingOptionalExtruder.qml
@@ -1,5 +1,5 @@
-// Copyright (c) 2016 Ultimaker B.V.
-// Uranium is released under the terms of the LGPLv3 or higher.
+// 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
@@ -31,12 +31,15 @@ SettingItem
{
forceActiveFocus();
propertyProvider.setPropertyValue("value", model.getItem(index).index);
- } else
+ }
+ else
{
if (propertyProvider.properties.value == -1)
{
- control.currentIndex = model.rowCount() - 1; // we know the last item is "Not overriden"
- } else {
+ control.currentIndex = model.count - 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 867d662edc..3f84296307 100644
--- a/resources/qml/Settings/SettingView.qml
+++ b/resources/qml/Settings/SettingView.qml
@@ -1,5 +1,5 @@
// Copyright (c) 2018 Ultimaker B.V.
-// Uranium is released under the terms of the LGPLv3 or higher.
+// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 1.1
diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml
index 5fbddea9ac..1e335472d4 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.rowCount() - 1).id == model.id
+ isBottomElement: toolsModel.getItem(toolsModel.count - 1).id == model.id
toolItem: UM.RecolorImage
{
diff --git a/resources/qml/ViewsSelector.qml b/resources/qml/ViewsSelector.qml
index 18d1f66759..22a7cbf793 100644
--- a/resources/qml/ViewsSelector.qml
+++ b/resources/qml/ViewsSelector.qml
@@ -18,7 +18,7 @@ Cura.ExpandablePopup
property var activeView:
{
- for (var i = 0; i < viewModel.rowCount(); i++)
+ for (var i = 0; i < viewModel.count; i++)
{
if (viewModel.items[i].active)
{
diff --git a/resources/qml/qmldir b/resources/qml/qmldir
index 4dc9a34894..c19b982318 100644
--- a/resources/qml/qmldir
+++ b/resources/qml/qmldir
@@ -1,7 +1,6 @@
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 34b944b25b..d9ef74ebb9 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": [241, 242, 242, 255],
+ "secondary": [95, 95, 95, 255],
"main_window_header_button_text_inactive": [128, 128, 128, 255],
"main_window_header_button_text_hovered": [255, 255, 255, 255],
@@ -196,14 +196,6 @@
"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/styles.qml b/resources/themes/cura-light/styles.qml
index 7926f1703b..674dbfd26d 100755
--- a/resources/themes/cura-light/styles.qml
+++ b/resources/themes/cura-light/styles.qml
@@ -74,7 +74,6 @@ 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")
@@ -258,7 +257,6 @@ 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:
@@ -531,7 +529,7 @@ QtObject
implicitWidth: Theme.getSize("checkbox").width
implicitHeight: Theme.getSize("checkbox").height
- color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox")
+ color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : (control.enabled ? Theme.getColor("checkbox") : Theme.getColor("checkbox_disabled"))
Behavior on color { ColorAnimation { duration: 50; } }
radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : UM.Theme.getSize("checkbox_radius").width
@@ -545,7 +543,6 @@ 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")
@@ -588,7 +585,6 @@ 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:
@@ -840,7 +836,6 @@ 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 f383a570a2..3d5bf15c72 100644
--- a/resources/themes/cura-light/theme.json
+++ b/resources/themes/cura-light/theme.json
@@ -41,12 +41,12 @@
"family": "Noto Sans"
},
"small": {
- "size": 1.0,
- "weight": 63,
+ "size": 0.85,
+ "weight": 50,
"family": "Noto Sans"
},
"very_small": {
- "size": 1.0,
+ "size": 0.7,
"weight": 50,
"family": "Noto Sans"
},
@@ -64,12 +64,6 @@
"size": 1.15,
"weight": 50,
"family": "Noto Sans"
- },
- "extruder_icon":
- {
- "size": 0.7,
- "weight": 50,
- "family": "Noto Sans"
}
},
@@ -242,6 +236,7 @@
"checkbox_border": [199, 199, 199, 255],
"checkbox_border_hover": [50, 130, 255, 255],
"checkbox_mark": [50, 130, 255, 255],
+ "checkbox_disabled": [223, 223, 223, 255],
"checkbox_text": [35, 35, 35, 255],
"tooltip": [68, 192, 255, 255],
@@ -311,14 +306,6 @@
"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],
@@ -384,7 +371,6 @@
"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],
@@ -431,6 +417,9 @@
"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],
@@ -520,9 +509,6 @@
"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],