diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py
index 75b6594c93..399898c641 100644
--- a/cura/CuraApplication.py
+++ b/cura/CuraApplication.py
@@ -10,6 +10,7 @@ from UM.Scene.Platform import Platform
from UM.Math.Vector import Vector
from UM.Math.Matrix import Matrix
from UM.Math.Quaternion import Quaternion
+from UM.Math.AxisAlignedBox import AxisAlignedBox
from UM.Resources import Resources
from UM.Scene.ToolHandle import ToolHandle
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
@@ -97,6 +98,7 @@ class CuraApplication(QtApplication):
self._i18n_catalog = None
self._previous_active_tool = None
self._platform_activity = False
+ self._scene_boundingbox = AxisAlignedBox()
self._job_name = None
self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged)
@@ -240,18 +242,29 @@ class CuraApplication(QtApplication):
requestAddPrinter = pyqtSignal()
activityChanged = pyqtSignal()
+ sceneBoundingBoxChanged = pyqtSignal()
@pyqtProperty(bool, notify = activityChanged)
def getPlatformActivity(self):
return self._platform_activity
+ @pyqtProperty(str, notify = sceneBoundingBoxChanged)
+ def getSceneBoundingBoxString(self):
+ return self._i18n_catalog.i18nc("@info", "%.1f x %.1f x %.1f mm") % (self._scene_boundingbox.width.item(), self._scene_boundingbox.depth.item(), self._scene_boundingbox.height.item())
+
def updatePlatformActivity(self, node = None):
count = 0
+ scene_boundingbox = AxisAlignedBox()
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
if type(node) is not SceneNode or not node.getMeshData():
continue
count += 1
+ scene_boundingbox += node.getBoundingBox()
+
+ if repr(self._scene_boundingbox) != repr(scene_boundingbox):
+ self._scene_boundingbox = scene_boundingbox
+ self.sceneBoundingBoxChanged.emit()
self._platform_activity = True if count > 0 else False
self.activityChanged.emit()
diff --git a/cura/CuraSplashScreen.py b/cura/CuraSplashScreen.py
index d2f9ad8d61..07f88fc843 100644
--- a/cura/CuraSplashScreen.py
+++ b/cura/CuraSplashScreen.py
@@ -19,10 +19,11 @@ class CuraSplashScreen(QSplashScreen):
version = Application.getInstance().getVersion().split("-")
- painter.setFont(QFont("Roboto", 20))
+ painter.setFont(QFont("Proxima Nova Rg", 20))
painter.drawText(0, 0, 203, 230, Qt.AlignRight | Qt.AlignBottom, version[0])
- painter.setFont(QFont("Roboto", 12))
- painter.drawText(0, 0, 203, 255, Qt.AlignRight | Qt.AlignBottom, version[1])
+ if len(version) > 1:
+ painter.setFont(QFont("Proxima Nova Rg", 12))
+ painter.drawText(0, 0, 203, 255, Qt.AlignRight | Qt.AlignBottom, version[1])
painter.restore()
super().drawContents(painter)
diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py
index 8fa5441d1a..534a2831eb 100644
--- a/plugins/CuraEngineBackend/CuraEngineBackend.py
+++ b/plugins/CuraEngineBackend/CuraEngineBackend.py
@@ -134,11 +134,11 @@ class CuraEngineBackend(Backend):
return #No slicing if we have error values since those are by definition illegal values.
self.processingProgress.emit(0.0)
- if not self._message:
- self._message = Message(catalog.i18nc("@info:status", "Slicing..."), 0, False, -1)
- self._message.show()
- else:
+ if self._message:
self._message.setProgress(-1)
+ #else:
+ # self._message = Message(catalog.i18nc("@info:status", "Slicing..."), 0, False, -1)
+ # self._message.show()
self._scene.gcode_list = []
self._slicing = True
diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml
index 9c35b9337c..ad363af4aa 100644
--- a/plugins/LayerView/LayerView.qml
+++ b/plugins/LayerView/LayerView.qml
@@ -10,16 +10,16 @@ import UM 1.0 as UM
Item
{
- width: 250
- height: 250
+ width: UM.Theme.sizes.button.width
+ height: UM.Theme.sizes.slider_layerview_size.height
Slider
{
id: slider
- width: 10
- height: 250
- anchors.right : parent.right
- anchors.rightMargin: UM.Theme.sizes.slider_layerview_margin.width/2
+ width: UM.Theme.sizes.slider_layerview_size.width
+ height: UM.Theme.sizes.slider_layerview_size.height
+ anchors.left: parent.left
+ anchors.leftMargin: UM.Theme.sizes.slider_layerview_margin.width/2
orientation: Qt.Vertical
minimumValue: 0;
maximumValue: UM.LayerView.numLayers;
@@ -31,15 +31,7 @@ Item
style: UM.Theme.styles.layerViewSlider
}
Rectangle {
- anchors.right: parent.right
- y: -UM.Theme.sizes.slider_layerview_background_extension.height
- z: slider.z - 1
- width: UM.Theme.sizes.button.width
- height: UM.Theme.sizes.slider_layerview_background_extension.height
- color: UM.Theme.colors.slider_text_background
- }
- Rectangle {
- anchors.right : parent.right
+ anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
z: slider.z - 1
width: UM.Theme.sizes.slider_layerview_background.width
diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
index 781b7b0f1c..1a10db90e3 100644
--- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
+++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
@@ -10,93 +10,53 @@ import UM 1.1 as UM
Item {
id: base;
+ property int currentIndex: UM.ActiveTool.properties.SelectedIndex;
+ property string printSequence: UM.ActiveTool.properties.PrintSequence;
- width: 0;
- height: 0;
+ width: childrenRect.width;
+ height: childrenRect.height;
- property variant position: mapToItem(null, 0, 0)
+ Column {
+ id: items
+ anchors.top: parent.top;
+ anchors.left: parent.left;
- property real viewportWidth: UM.Application.mainWindow.width * UM.Application.mainWindow.viewportRect.width;
- property real viewportHeight: UM.Application.mainWindow.height * UM.Application.mainWindow.viewportRect.height;
+ spacing: UM.Theme.sizes.default_margin.height;
- property int currentIndex;
-
- Rectangle {
- id: settingsPanel;
-
- z: 3;
-
- width: UM.Theme.sizes.per_object_settings_panel.width;
- height: items.height + UM.Theme.sizes.default_margin.height * 2;
-
- opacity: 0;
- Behavior on opacity { NumberAnimation { } }
-
- border.width: UM.Theme.sizes.per_object_settings_panel_border.width;
- border.color: UM.Theme.colors.per_object_settings_panel_border;
-
- color: UM.Theme.colors.per_object_settings_panel_background;
-
- DropArea {
- anchors.fill: parent;
+ Label {
+ width: UM.Theme.sizes.setting.width;
+ wrapMode: Text.Wrap;
+ text: catalog.i18nc("@label", "Per Object Settings behavior may be unexpected when 'Print sequence' is set to 'All at Once'.")
+ color: UM.Theme.colors.text;
+ visible: base.printSequence == "all_at_once"
}
- Button {
- id: closeButton;
- width: UM.Theme.sizes.message_close.width;
- height: UM.Theme.sizes.message_close.height;
- anchors {
- right: parent.right;
- rightMargin: UM.Theme.sizes.default_margin.width / 2;
- top: parent.top;
- topMargin: UM.Theme.sizes.default_margin.width / 2;
- }
- UM.RecolorImage {
- anchors.fill: parent;
- sourceSize.width: width
- sourceSize.height: width
- color: UM.Theme.colors.message_dismiss
- source: UM.Theme.icons.cross2;
- }
+ UM.SettingItem {
+ id: profileSelection
- onClicked: settingsPanel.opacity = 0
+ width: UM.Theme.sizes.setting.width;
+ height: UM.Theme.sizes.setting.height;
- style: ButtonStyle {
- background: Rectangle {
- color: UM.Theme.colors.message_background
- }
+ name: catalog.i18nc("@label", "Object profile")
+ type: "enum"
+ indent: false
+
+ style: UM.Theme.styles.setting_item;
+
+ options: UM.ProfilesModel { addUseGlobal: true }
+
+ value: UM.ActiveTool.properties.Model.getItem(base.currentIndex).profile
+
+ onItemValueChanged: {
+ var item = UM.ActiveTool.properties.Model.getItem(base.currentIndex);
+ UM.ActiveTool.properties.Model.setObjectProfile(item.id, value)
}
}
Column {
- id: items
- anchors.top: parent.top;
- anchors.topMargin: UM.Theme.sizes.default_margin.height;
-
+ id: customisedSettings
spacing: UM.Theme.sizes.default_lining.height;
-
- UM.SettingItem {
- id: profileSelection
-
- x: UM.Theme.sizes.per_object_settings_panel_border.width + 1
-
- width: UM.Theme.sizes.setting.width;
- height: UM.Theme.sizes.setting.height;
-
- name: catalog.i18nc("@label", "Profile")
- type: "enum"
-
- style: UM.Theme.styles.setting_item;
-
- options: UM.ProfilesModel { addUseGlobal: true }
-
- value: UM.ActiveTool.properties.Model.getItem(base.currentIndex).profile
-
- onItemValueChanged: {
- var item = UM.ActiveTool.properties.Model.getItem(base.currentIndex);
- UM.ActiveTool.properties.Model.setObjectProfile(item.id, value)
- }
- }
+ width: UM.Theme.sizes.setting.width + UM.Theme.sizes.setting.height/2;
Repeater {
id: settings;
@@ -106,7 +66,6 @@ Item {
UM.SettingItem {
width: UM.Theme.sizes.setting.width;
height: UM.Theme.sizes.setting.height;
- x: UM.Theme.sizes.per_object_settings_panel_border.width + 1
name: model.label;
type: model.type;
@@ -115,6 +74,7 @@ Item {
unit: model.unit;
valid: model.valid;
options: model.options
+ indent: false
style: UM.Theme.styles.setting_item;
@@ -124,13 +84,11 @@ Item {
Button
{
- anchors.left: parent.horizontalCenter;
- anchors.leftMargin: UM.Theme.sizes.default_margin.width;
+ anchors.left: parent.right;
width: UM.Theme.sizes.setting.height;
height: UM.Theme.sizes.setting.height;
- opacity: parent.hovered || hovered ? 1 : 0;
onClicked: UM.ActiveTool.properties.Model.removeSettingOverride(UM.ActiveTool.properties.Model.getItem(base.currentIndex).id, model.key)
style: ButtonStyle
@@ -154,80 +112,16 @@ Item {
}
}
}
-
- Item
- {
- height: UM.Theme.sizes.default_margin.height / 2
- width: parent.width
- }
-
- Button
- {
- id: customise_settings_button;
- anchors.right: profileSelection.right;
- visible: parseInt(UM.Preferences.getValue("cura/active_mode")) == 1
-
- text: catalog.i18nc("@action:button", "Customize Settings");
-
- style: ButtonStyle
- {
- background: Rectangle
- {
- width: control.width;
- height: control.height;
- color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button;
- }
- label: Label
- {
- text: control.text;
- color: UM.Theme.colors.load_save_button_text;
- }
- }
-
- onClicked: settingPickDialog.visible = true;
-
- Connections
- {
- target: UM.Preferences;
-
- onPreferenceChanged:
- {
- customise_settings_button.visible = parseInt(UM.Preferences.getValue("cura/active_mode"))
- }
- }
- }
}
- UM.I18nCatalog { id: catalog; name: "uranium"; }
- }
+ Button
+ {
+ id: customise_settings_button;
+ anchors.right: profileSelection.right;
+ height: UM.Theme.sizes.setting.height;
+ visible: parseInt(UM.Preferences.getValue("cura/active_mode")) == 1
- Repeater {
- model: UM.ActiveTool.properties.Model;
- delegate: Button {
- x: ((model.x + 1.0) / 2.0) * base.viewportWidth - base.position.x - width / 2
- y: -((model.y + 1.0) / 2.0) * base.viewportHeight + (base.viewportHeight - base.position.y) + height / 2
-
- width: UM.Theme.sizes.per_object_settings_button.width
- height: UM.Theme.sizes.per_object_settings_button.height
-
- tooltip: catalog.i18nc("@info:tooltip", "Customise settings for this object");
-
- checkable: true;
- onClicked: {
- if(settingsPanel.opacity < 0.5) //Per-object panel is not currently displayed.
- {
- base.currentIndex = index;
-
- settingsPanel.anchors.left = right;
- settingsPanel.anchors.top = top;
-
- settingsPanel.opacity = 1;
- }
- else //Per-object panel is already displayed. Deactivate it (same behaviour as the close button).
- {
- settingsPanel.opacity = 0;
- }
- }
+ text: catalog.i18nc("@action:button", "Add Setting");
style: ButtonStyle
{
@@ -235,20 +129,36 @@ Item {
{
width: control.width;
height: control.height;
-
- color: control.hovered ? UM.Theme.colors.button_active : UM.Theme.colors.button_hover;
+ border.width: UM.Theme.sizes.default_lining.width;
+ border.color: control.pressed ? UM.Theme.colors.action_button_active_border :
+ control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border
+ color: control.pressed ? UM.Theme.colors.action_button_active :
+ control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button
}
- label: Image {
- width: control.width;
- height: control.height;
- sourceSize.width: width;
- sourceSize.height: height;
- source: UM.Theme.icons.plus;
+ label: Label
+ {
+ text: control.text;
+ color: UM.Theme.colors.setting_control_text;
+ anchors.centerIn: parent
+ }
+ }
+
+ onClicked: settingPickDialog.visible = true;
+
+ Connections
+ {
+ target: UM.Preferences;
+
+ onPreferenceChanged:
+ {
+ customise_settings_button.visible = parseInt(UM.Preferences.getValue("cura/active_mode"))
}
}
}
}
+ UM.I18nCatalog { id: catalog; name: "uranium"; }
+
UM.Dialog {
id: settingPickDialog
diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py
index 664fe0c61d..132fb0d2f3 100644
--- a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py
+++ b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py
@@ -2,6 +2,8 @@
# Uranium is released under the terms of the AGPLv3 or higher.
from UM.Tool import Tool
+from UM.Scene.Selection import Selection
+from UM.Application import Application
from . import PerObjectSettingsModel
@@ -9,10 +11,19 @@ class PerObjectSettingsTool(Tool):
def __init__(self):
super().__init__()
- self.setExposedProperties("Model")
+ self.setExposedProperties("Model", "SelectedIndex", "PrintSequence")
def event(self, event):
return False
def getModel(self):
return PerObjectSettingsModel.PerObjectSettingsModel()
+
+ def getSelectedIndex(self):
+ selected_object_id = id(Selection.getSelectedObject(0))
+ index = self.getModel().find("id", selected_object_id)
+ return index
+
+ def getPrintSequence(self):
+ settings = Application.getInstance().getMachineManager().getActiveProfile()
+ return settings.getSettingValue("print_sequence")
\ No newline at end of file
diff --git a/plugins/PerObjectSettingsTool/__init__.py b/plugins/PerObjectSettingsTool/__init__.py
index c3cea197e1..99b33a55af 100644
--- a/plugins/PerObjectSettingsTool/__init__.py
+++ b/plugins/PerObjectSettingsTool/__init__.py
@@ -19,7 +19,8 @@ def getMetaData():
"name": i18n_catalog.i18nc("@label", "Per Object Settings"),
"description": i18n_catalog.i18nc("@info:tooltip", "Configure Per Object Settings"),
"icon": "setting_per_object",
- "tool_panel": "PerObjectSettingsPanel.qml"
+ "tool_panel": "PerObjectSettingsPanel.qml",
+ "weight": 3
},
}
diff --git a/resources/images/cura.png b/resources/images/cura.png
index 0bf87af165..625668ea25 100644
Binary files a/resources/images/cura.png and b/resources/images/cura.png differ
diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml
index a4e81efcce..c4281fdd2b 100644
--- a/resources/qml/Cura.qml
+++ b/resources/qml/Cura.qml
@@ -310,14 +310,24 @@ UM.MainWindow
}
}
+ JobSpecs
+ {
+ anchors
+ {
+ bottom: parent.bottom;
+ right: sidebar.left;
+ bottomMargin: UM.Theme.sizes.default_margin.height;
+ rightMargin: UM.Theme.sizes.default_margin.width;
+ }
+ }
+
UM.MessageStack
{
anchors
{
horizontalCenter: parent.horizontalCenter
- horizontalCenterOffset: -(UM.Theme.sizes.logo.width/ 2)
- top: parent.verticalCenter;
- bottom: parent.bottom;
+ horizontalCenterOffset: -(UM.Theme.sizes.sidebar.width/ 2)
+ verticalCenter: parent.verticalCenter;
}
}
@@ -330,8 +340,7 @@ UM.MainWindow
//anchors.bottom: parent.bottom
anchors.top: viewModeButton.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height;
- anchors.right: sidebar.left;
- anchors.rightMargin: UM.Theme.sizes.window_margin.width;
+ anchors.left: viewModeButton.left;
//anchors.bottom: buttons.top;
//anchors.bottomMargin: UM.Theme.sizes.default_margin.height;
@@ -344,10 +353,9 @@ UM.MainWindow
{
id: openFileButton;
//style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
- //style: UM.Theme.styles.open_file_button
text: catalog.i18nc("@action:button","Open File");
iconSource: UM.Theme.icons.load
- style: UM.Theme.styles.open_file_button
+ style: UM.Theme.styles.tool_button
tooltip: '';
anchors
{
@@ -373,6 +381,7 @@ UM.MainWindow
source: UM.Theme.images.logo;
width: UM.Theme.sizes.logo.width;
height: UM.Theme.sizes.logo.height;
+ z: -1;
sourceSize.width: width;
sourceSize.height: height;
@@ -381,13 +390,12 @@ UM.MainWindow
Button
{
id: viewModeButton
- property bool verticalTooltip: true
anchors
{
- top: parent.top;
- right: sidebar.left;
- rightMargin: UM.Theme.sizes.window_margin.width;
+ top: toolbar.bottom;
+ topMargin: UM.Theme.sizes.window_margin.height;
+ left: parent.left;
}
text: catalog.i18nc("@action:button","View Mode");
iconSource: UM.Theme.icons.viewmode;
@@ -422,12 +430,9 @@ UM.MainWindow
id: toolbar;
anchors {
- left: parent.left
- top: parent.top
- topMargin: UM.Theme.sizes.window_margin.height + UM.Theme.sizes.button.height
- //horizontalCenter: parent.horizontalCenter
- //horizontalCenterOffset: -(UM.Theme.sizes.sidebar.width / 2)
- //top: parent.top;
+ top: openFileButton.bottom;
+ topMargin: UM.Theme.sizes.window_margin.height;
+ left: parent.left;
}
}
@@ -629,7 +634,7 @@ UM.MainWindow
id: openDialog;
//: File open dialog title
- title: catalog.i18nc("@title:window","Open File")
+ title: catalog.i18nc("@title:window","Open file")
modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.WindowModal;
//TODO: Support multiple file selection, workaround bug in KDE file dialog
//selectMultiple: true
diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml
new file mode 100644
index 0000000000..b8a73c31cf
--- /dev/null
+++ b/resources/qml/JobSpecs.qml
@@ -0,0 +1,165 @@
+// Copyright (c) 2015 Ultimaker B.V.
+// Cura is released under the terms of the AGPLv3 or higher.
+
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtQuick.Controls.Styles 1.1
+import QtQuick.Layouts 1.1
+
+import UM 1.1 as UM
+
+Rectangle {
+ id: base;
+
+ property bool activity: Printer.getPlatformActivity;
+ property string fileBaseName
+ property variant activeMachineInstance: UM.MachineManager.activeMachineInstance
+
+ onActiveMachineInstanceChanged:
+ {
+ base.createFileName()
+ }
+
+ UM.I18nCatalog { id: catalog; name:"cura"}
+
+ property variant printDuration: PrintInformation.currentPrintTime;
+ property real printMaterialAmount: PrintInformation.materialAmount;
+
+ width: UM.Theme.sizes.jobspecs.width
+ height: childrenRect.height
+ color: "transparent"
+
+ function createFileName(){
+ var splitMachineName = UM.MachineManager.activeMachineInstance.split(" ")
+ var abbrMachine = ''
+ for (var i = 0; i < splitMachineName.length; i++){
+ if (splitMachineName[i].search(/ultimaker/i) != -1){
+ abbrMachine += 'UM'
+ }
+ else{
+ if (splitMachineName[i].charAt(0).search(/[0-9]/g) == -1)
+ abbrMachine += splitMachineName[i].charAt(0)
+ }
+ var regExpAdditives = /[0-9\+]/g;
+ var resultAdditives = splitMachineName[i].match(regExpAdditives);
+ if (resultAdditives != null){
+ for (var j = 0; j < resultAdditives.length; j++){
+ abbrMachine += resultAdditives[j]
+
+ }
+ }
+ }
+ printJobTextfield.text = abbrMachine + '_' + base.fileBaseName
+ }
+
+ Connections {
+ target: openDialog
+ onHasMesh: {
+ if(base.fileBaseName == ''){
+ base.fileBaseName = name
+ base.createFileName()
+ }
+ }
+ }
+
+ onActivityChanged: {
+ if (activity == false){
+ base.fileBaseName = ''
+ base.createFileName()
+ }
+ }
+
+
+ TextField {
+ id: printJobTextfield
+ anchors.right: parent.right
+ height: UM.Theme.sizes.jobspecs_line.height
+ width: base.width
+ property int unremovableSpacing: 5
+ text: ''
+ horizontalAlignment: TextInput.AlignRight
+ onTextChanged: Printer.setJobName(text)
+ visible: base.activity
+ onEditingFinished: {
+ if (printJobTextfield.text != ''){
+ printJobTextfield.focus = false
+ }
+ }
+ validator: RegExpValidator {
+ regExp: /^[^\\ \/ \.]*$/
+ }
+ style: TextFieldStyle{
+ textColor: UM.Theme.colors.setting_control_text;
+ font: UM.Theme.fonts.default;
+ background: Rectangle {
+ opacity: 0
+ border.width: 0
+ }
+ }
+ }
+
+ Label{
+ id: boundingSpec
+ anchors.top: printJobTextfield.bottom
+ anchors.right: parent.right
+ height: UM.Theme.sizes.jobspecs_line.height
+ verticalAlignment: Text.AlignVCenter
+ font: UM.Theme.fonts.small
+ color: UM.Theme.colors.text_subtext
+ text: Printer.getSceneBoundingBoxString
+ }
+
+ Rectangle {
+ id: specsRow
+ anchors.top: boundingSpec.bottom
+ anchors.right: parent.right
+ height: UM.Theme.sizes.jobspecs_line.height
+
+ Item{
+ width: parent.width
+ height: parent.height
+
+ UM.RecolorImage {
+ id: timeIcon
+ anchors.right: timeSpec.left
+ anchors.rightMargin: UM.Theme.sizes.default_margin.width/2
+ anchors.verticalCenter: parent.verticalCenter
+ width: UM.Theme.sizes.save_button_specs_icons.width
+ height: UM.Theme.sizes.save_button_specs_icons.height
+ sourceSize.width: width
+ sourceSize.height: width
+ color: UM.Theme.colors.text_subtext
+ source: UM.Theme.icons.print_time;
+ }
+ Label{
+ id: timeSpec
+ anchors.right: lengthIcon.left
+ anchors.rightMargin: UM.Theme.sizes.default_margin.width
+ anchors.verticalCenter: parent.verticalCenter
+ font: UM.Theme.fonts.small
+ color: UM.Theme.colors.text_subtext
+ text: (!base.printDuration || !base.printDuration.valid) ? "00h 00min" : base.printDuration.getDisplayString(UM.DurationFormat.Short)
+ }
+ UM.RecolorImage {
+ id: lengthIcon
+ anchors.right: lengthSpec.left
+ anchors.rightMargin: UM.Theme.sizes.default_margin.width/2
+ anchors.verticalCenter: parent.verticalCenter
+ width: UM.Theme.sizes.save_button_specs_icons.width
+ height: UM.Theme.sizes.save_button_specs_icons.height
+ sourceSize.width: width
+ sourceSize.height: width
+ color: UM.Theme.colors.text_subtext
+ source: UM.Theme.icons.category_material;
+ }
+ Label{
+ id: lengthSpec
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ font: UM.Theme.fonts.small
+ color: UM.Theme.colors.text_subtext
+ text: base.printMaterialAmount <= 0 ? "0.0 m" : catalog.i18nc("@label %1 is length of filament","%1 m").arg(base.printMaterialAmount)
+ }
+ }
+ }
+}
diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml
index f9a78ca2df..5c6b299054 100644
--- a/resources/qml/ProfileSetup.qml
+++ b/resources/qml/ProfileSetup.qml
@@ -81,7 +81,7 @@ Item{
text: catalog.i18nc("@label","Global Profile:");
width: parent.width/100*45
font: UM.Theme.fonts.default;
- color: UM.Theme.colors.text_default;
+ color: UM.Theme.colors.text;
}
diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml
index 70b43ffb72..c20aa905fc 100644
--- a/resources/qml/SaveButton.qml
+++ b/resources/qml/SaveButton.qml
@@ -10,187 +10,71 @@ import UM 1.1 as UM
Rectangle {
id: base;
+ UM.I18nCatalog { id: catalog; name:"cura"}
property real progress: UM.Backend.progress;
property bool activity: Printer.getPlatformActivity;
- Behavior on progress { NumberAnimation { duration: 250; } }
- property int totalHeight: childrenRect.height
+ //Behavior on progress { NumberAnimation { duration: 250; } }
+ property int totalHeight: childrenRect.height + UM.Theme.sizes.default_margin.height
property string fileBaseName
- property variant activeMachineInstance: UM.MachineManager.activeMachineInstance
-
- onActiveMachineInstanceChanged:
- {
- base.createFileName()
- }
-
- UM.I18nCatalog { id: catalog; name:"cura"}
-
- property variant printDuration: PrintInformation.currentPrintTime;
- property real printMaterialAmount: PrintInformation.materialAmount;
-
- function createFileName(){
- var splitMachineName = UM.MachineManager.activeMachineInstance.split(" ")
- var abbrMachine = ''
- for (var i = 0; i < splitMachineName.length; i++){
- if (splitMachineName[i].search(/ultimaker/i) != -1){
- abbrMachine += 'UM'
- }
- else{
- if (splitMachineName[i].charAt(0).search(/[0-9]/g) == -1)
- abbrMachine += splitMachineName[i].charAt(0)
- }
- var regExpAdditives = /[0-9\+]/g;
- var resultAdditives = splitMachineName[i].match(regExpAdditives);
- if (resultAdditives != null){
- for (var j = 0; j < resultAdditives.length; j++){
- abbrMachine += resultAdditives[j]
-
- }
- }
- }
- printJobTextfield.text = abbrMachine + '_' + base.fileBaseName
- }
-
- Connections {
- target: openDialog
- onHasMesh: {
- if(base.fileBaseName == ''){
- base.fileBaseName = name
- base.createFileName()
+ property string statusText: {
+ if(progress == 0) {
+ if(!activity) {
+ return catalog.i18nc("@label:PrintjobStatus","Please load a 3d model");
+ } else {
+ return catalog.i18nc("@label:PrintjobStatus","Preparing to slice...");
}
+ } else if(base.progress < 0.99) {
+ return catalog.i18nc("@label:PrintjobStatus","Slicing...");
+ } else {
+ return catalog.i18nc("@label:PrintjobStatus","Ready to ") + UM.OutputDeviceManager.activeDeviceShortDescription;
}
}
- onActivityChanged: {
- if (activity == false){
- base.fileBaseName = ''
- base.createFileName()
- }
+ Label {
+ id: statusLabel
+ width: parent.width - 2 * UM.Theme.sizes.default_margin.width
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.leftMargin: UM.Theme.sizes.default_margin.width
+
+ color: UM.Theme.colors.text
+ font: UM.Theme.fonts.large
+ text: statusText;
}
Rectangle{
- id: printJobRow
- implicitWidth: base.width;
- implicitHeight: UM.Theme.sizes.save_button_header.height
- anchors.top: parent.top
- color: UM.Theme.colors.sidebar_header_bar
- Label{
- id: printJobTextfieldLabel
- text: catalog.i18nc("@label:textbox", "Printjob Name");
- anchors.left: parent.left
- anchors.leftMargin: UM.Theme.sizes.default_margin.width;
- anchors.verticalCenter: parent.verticalCenter
- font: UM.Theme.fonts.default;
- color: UM.Theme.colors.text_white
- }
- TextField {
- id: printJobTextfield
- anchors.right: parent.right
- anchors.rightMargin: UM.Theme.sizes.default_margin.width;
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width/100*55
- height: UM.Theme.sizes.sidebar_inputFields.height
- property int unremovableSpacing: 5
- text: ''
- onTextChanged: Printer.setJobName(text)
- onEditingFinished: {
- if (printJobTextfield.text != ''){
- printJobTextfield.focus = false
- }
- }
- validator: RegExpValidator {
- regExp: /^[^\\ \/ \.]*$/
- }
- style: TextFieldStyle{
- textColor: UM.Theme.colors.setting_control_text;
- font: UM.Theme.fonts.default;
- background: Rectangle {
- radius: 0
- implicitWidth: parent.width
- implicitHeight: parent.height
- border.width: 1;
- border.color: UM.Theme.colors.slider_groove_border;
- }
- }
- }
- }
+ id: progressBar
+ width: parent.width - 2 * UM.Theme.sizes.default_margin.width
+ height: UM.Theme.sizes.progressbar.height
+ anchors.top: statusLabel.bottom
+ anchors.topMargin: UM.Theme.sizes.default_margin.height/4
+ anchors.left: parent.left
+ anchors.leftMargin: UM.Theme.sizes.default_margin.width
+ radius: UM.Theme.sizes.progressbar_radius.width
+ color: UM.Theme.colors.progressbar_background
- Rectangle {
- id: specsRow
- implicitWidth: base.width
- implicitHeight: UM.Theme.sizes.sidebar_specs_bar.height
- anchors.top: printJobRow.bottom
- visible: base.progress > 0.99 && base.activity == true
- Item{
- id: time
- width: childrenRect.width;
+ Rectangle{
+ width: Math.max(parent.width * base.progress)
height: parent.height
- anchors.left: parent.left
- anchors.leftMargin: UM.Theme.sizes.default_margin.width
- anchors.top: parent.top
- visible: base.printMaterialAmount > 0 ? true : false
- UM.RecolorImage {
- id: timeIcon
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- width: UM.Theme.sizes.save_button_specs_icons.width
- height: UM.Theme.sizes.save_button_specs_icons.height
- sourceSize.width: width
- sourceSize.height: width
- color: UM.Theme.colors.text_hover
- source: UM.Theme.icons.print_time;
- }
- Label{
- id: timeSpec
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: timeIcon.right
- anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
- font: UM.Theme.fonts.default
- color: UM.Theme.colors.text
- text: (!base.printDuration || !base.printDuration.valid) ? "" : base.printDuration.getDisplayString(UM.DurationFormat.Short)
- }
- }
- Item{
- width: parent.width / 100 * 55
- height: parent.height
- anchors.left: time.right
- anchors.leftMargin: UM.Theme.sizes.default_margin.width;
- anchors.top: parent.top
- visible: base.printMaterialAmount > 0 ? true : false
- UM.RecolorImage {
- id: lengthIcon
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- width: UM.Theme.sizes.save_button_specs_icons.width
- height: UM.Theme.sizes.save_button_specs_icons.height
- sourceSize.width: width
- sourceSize.height: width
- color: UM.Theme.colors.text_hover
- source: UM.Theme.icons.category_material;
- }
- Label{
- id: lengthSpec
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: lengthIcon.right
- anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
- font: UM.Theme.fonts.default
- color: UM.Theme.colors.text
- text: base.printMaterialAmount <= 0 ? "" : catalog.i18nc("@label %1 is length of filament","%1 m").arg(base.printMaterialAmount)
- }
+ color: UM.Theme.colors.progressbar_control
+ radius: UM.Theme.sizes.progressbar_radius.width
+ visible: base.progress > 0.99 ? false : true
}
}
Rectangle{
id: saveRow
width: base.width
- height: saveToButton.height + (UM.Theme.sizes.default_margin.height / 2) // height + bottomMargin
- anchors.top: specsRow.bottom
+ height: saveToButton.height
+ anchors.top: progressBar.bottom
+ anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: parent.left
Button {
id: saveToButton
property int resizedWidth
- x: base.width - saveToButton.resizedWidth - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.save_button_save_to_button.height
+ x: base.width - saveToButton.resizedWidth - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.save_button_save_to_button.height + 3
tooltip: UM.OutputDeviceManager.activeDeviceDescription;
enabled: base.progress > 0.99 && base.activity == true
height: UM.Theme.sizes.save_button_save_to_button.height
@@ -206,39 +90,25 @@ Rectangle {
background: Rectangle {
//opacity: control.enabled ? 1.0 : 0.5
//Behavior on opacity { NumberAnimation { duration: 50; } }
- color: {
- if(!control.enabled){
- return UM.Theme.colors.button;
- }
- else if(control.enabled && control.hovered) {
- return UM.Theme.colors.load_save_button_hover
- } else {
- return UM.Theme.colors.load_save_button
- }
- }
+ border.color: !control.enabled ? UM.Theme.colors.action_button_disabled_border :
+ control.pressed ? UM.Theme.colors.action_button_active_border :
+ control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border
+ color: !control.enabled ? UM.Theme.colors.action_button_disabled :
+ control.pressed ? UM.Theme.colors.action_button_active :
+ control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button
Behavior on color { ColorAnimation { duration: 50; } }
width: {
- var w = 0;
- if (base.width*0.55 > actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)){
- saveToButton.resizedWidth = base.width*0.55
- w = base.width*0.55
- }
- else {
- saveToButton.resizedWidth = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
- w = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
- }
- if(w < base.width * 0.55) {
- w = base.width * 0.55;
- }
- return w;
+ saveToButton.resizedWidth = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
+ return saveToButton.resizedWidth
}
Label {
id: actualLabel
- opacity: control.enabled ? 1.0 : 0.4
//Behavior on opacity { NumberAnimation { duration: 50; } }
anchors.centerIn: parent
- color: UM.Theme.colors.load_save_button_text
- font: UM.Theme.fonts.default
+ color: !control.enabled ? UM.Theme.colors.action_button_disabled_text :
+ control.pressed ? UM.Theme.colors.action_button_active_text :
+ control.hovered ? UM.Theme.colors.action_button_hovered_text : UM.Theme.colors.action_button_text
+ font: UM.Theme.fonts.action_button
text: control.text;
}
}
@@ -260,16 +130,12 @@ Rectangle {
style: ButtonStyle {
background: Rectangle {
id: deviceSelectionIcon
- color: {
- if(!control.enabled){
- return UM.Theme.colors.button;
- }
- else if(control.enabled && control.hovered) {
- return UM.Theme.colors.load_save_button_hover
- } else {
- return UM.Theme.colors.load_save_button
- }
- }
+ border.color: !control.enabled ? UM.Theme.colors.action_button_disabled_border :
+ control.pressed ? UM.Theme.colors.action_button_active_border :
+ control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border
+ color: !control.enabled ? UM.Theme.colors.action_button_disabled :
+ control.pressed ? UM.Theme.colors.action_button_active :
+ control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button
Behavior on color { ColorAnimation { duration: 50; } }
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2;
@@ -282,9 +148,11 @@ Rectangle {
width: UM.Theme.sizes.standard_arrow.width
height: UM.Theme.sizes.standard_arrow.height
sourceSize.width: width
- sourceSize.height: width
- color: UM.Theme.colors.load_save_button_text
- source: UM.Theme.icons.arrow_bottom
+ sourceSize.height: height
+ color: !control.enabled ? UM.Theme.colors.action_button_disabled_text :
+ control.pressed ? UM.Theme.colors.action_button_active_text :
+ control.hovered ? UM.Theme.colors.action_button_hovered_text : UM.Theme.colors.action_button_text;
+ source: UM.Theme.icons.arrow_bottom;
}
}
label: Label{ }
diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml
index e434492600..570dc8e5fe 100644
--- a/resources/qml/Sidebar.qml
+++ b/resources/qml/Sidebar.qml
@@ -15,6 +15,7 @@ Rectangle
property Action addMachineAction;
property Action configureMachinesAction;
property Action manageProfilesAction;
+ property int currentModeIndex;
color: UM.Theme.colors.sidebar;
UM.I18nCatalog { id: catalog; name:"cura"}
@@ -49,38 +50,118 @@ Rectangle
addMachineAction: base.addMachineAction;
configureMachinesAction: base.configureMachinesAction;
- modesModel: modesListModel;
+ }
- currentModeIndex:
- {
- var index = parseInt(UM.Preferences.getValue("cura/active_mode"))
- if(index)
- {
- return index;
- }
- return 0;
- }
- onCurrentModeIndexChanged: UM.Preferences.setValue("cura/active_mode", currentModeIndex);
+ Rectangle {
+ id: headerSeparator
+ width: parent.width
+ height: UM.Theme.sizes.sidebar_lining.height
+ color: UM.Theme.colors.sidebar_lining
+ anchors.top: header.bottom
+ anchors.topMargin: UM.Theme.sizes.default_margin.height
}
ProfileSetup {
id: profileItem
manageProfilesAction: base.manageProfilesAction
- anchors.top: header.bottom
+ anchors.top: settingsModeSelection.bottom
+ anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width
height: totalHeightProfileSetup
}
+ currentModeIndex:
+ {
+ var index = parseInt(UM.Preferences.getValue("cura/active_mode"))
+ if(index)
+ {
+ return index;
+ }
+ return 0;
+ }
+ onCurrentModeIndexChanged:
+ {
+ UM.Preferences.setValue("cura/active_mode", currentModeIndex);
+ }
+
+ Label {
+ id: settingsModeLabel
+ text: catalog.i18nc("@label:listbox","Setup");
+ anchors.left: parent.left
+ anchors.leftMargin: UM.Theme.sizes.default_margin.width;
+ anchors.top: headerSeparator.bottom
+ anchors.topMargin: UM.Theme.sizes.default_margin.height
+ width: parent.width/100*45
+ font: UM.Theme.fonts.large;
+ color: UM.Theme.colors.text
+ }
+
+ Rectangle {
+ id: settingsModeSelection
+ width: parent.width/100*55
+ height: UM.Theme.sizes.sidebar_header_mode_toggle.height
+ anchors.right: parent.right
+ anchors.rightMargin: UM.Theme.sizes.default_margin.width
+ anchors.top: headerSeparator.bottom
+ anchors.topMargin: UM.Theme.sizes.default_margin.height
+ Component{
+ id: wizardDelegate
+ Button {
+ height: settingsModeSelection.height
+ anchors.left: parent.left
+ anchors.leftMargin: model.index * (settingsModeSelection.width / 2)
+ anchors.verticalCenter: parent.verticalCenter
+ width: parent.width / 2
+ text: model.text
+ exclusiveGroup: modeMenuGroup;
+ checkable: true;
+ checked: base.currentModeIndex == index
+ onClicked: base.currentModeIndex = index
+
+ style: ButtonStyle {
+ background: Rectangle {
+ border.color: control.checked ? UM.Theme.colors.toggle_checked_border :
+ control.pressed ? UM.Theme.colors.toggle_active_border :
+ control.hovered ? UM.Theme.colors.toggle_hovered_border : UM.Theme.colors.toggle_unchecked_border
+ color: control.checked ? UM.Theme.colors.toggle_checked :
+ control.pressed ? UM.Theme.colors.toggle_active :
+ control.hovered ? UM.Theme.colors.toggle_hovered : UM.Theme.colors.toggle_unchecked
+ Behavior on color { ColorAnimation { duration: 50; } }
+ Label {
+ anchors.centerIn: parent
+ color: control.checked ? UM.Theme.colors.toggle_checked_text :
+ control.pressed ? UM.Theme.colors.toggle_active_text :
+ control.hovered ? UM.Theme.colors.toggle_hovered_text : UM.Theme.colors.toggle_unchecked_text
+ font: UM.Theme.fonts.default
+ text: control.text;
+ }
+ }
+ label: Item { }
+ }
+ }
+ }
+ ExclusiveGroup { id: modeMenuGroup; }
+ ListView{
+ id: modesList
+ property var index: 0
+ model: modesListModel
+ delegate: wizardDelegate
+ anchors.top: parent.top
+ anchors.left: parent.left
+ width: parent.width
+ }
+ }
+
Loader
{
id: sidebarContents;
- anchors.bottom: saveButton.top
+ anchors.bottom: footerSeparator.top
anchors.top: profileItem.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: base.left
anchors.right: base.right
- source: modesListModel.count > header.currentModeIndex ? modesListModel.get(header.currentModeIndex).file : "";
+ source: modesListModel.count > base.currentModeIndex ? modesListModel.get(base.currentModeIndex).file : "";
property Item sidebar: base;
@@ -101,6 +182,15 @@ Rectangle
}
}
+ Rectangle {
+ id: footerSeparator
+ width: parent.width
+ height: UM.Theme.sizes.sidebar_lining.height
+ color: UM.Theme.colors.sidebar_lining
+ anchors.bottom: saveButton.top
+ anchors.bottomMargin: UM.Theme.sizes.default_margin.height
+ }
+
SaveButton
{
id: saveButton;
@@ -123,6 +213,6 @@ Rectangle
{
modesListModel.append({ text: catalog.i18nc("@title:tab", "Simple"), file: "SidebarSimple.qml" })
modesListModel.append({ text: catalog.i18nc("@title:tab", "Advanced"), file: "SidebarAdvanced.qml" })
- sidebarContents.setSource(modesListModel.get(header.currentModeIndex).file)
+ sidebarContents.setSource(modesListModel.get(base.currentModeIndex).file)
}
}
diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml
index 2ce2e7975a..38d129c6bb 100644
--- a/resources/qml/SidebarHeader.qml
+++ b/resources/qml/SidebarHeader.qml
@@ -11,8 +11,6 @@ Item
{
id: base;
// Machine Setup
- property variant modesModel;
- property int currentModeIndex: 0;
property Action addMachineAction;
property Action configureMachinesAction;
UM.I18nCatalog { id: catalog; name:"cura"}
@@ -21,74 +19,28 @@ Item
Rectangle {
id: settingsModeRow
width: base.width
- height: UM.Theme.sizes.sidebar_header.height
+ height: 0
anchors.top: parent.top
color: UM.Theme.colors.sidebar_header_bar
+ }
- Label{
- id: settingsModeLabel
- text: catalog.i18nc("@label:listbox","Print Setup");
- anchors.left: parent.left
- anchors.leftMargin: UM.Theme.sizes.default_margin.width;
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width/100*45
- font: UM.Theme.fonts.default;
- color: UM.Theme.colors.text_white
- }
-
- Rectangle{
- id: settingsModeSelection
- width: parent.width/100*55
- height: UM.Theme.sizes.sidebar_header_mode_toggle.height
- anchors.right: parent.right
- anchors.rightMargin: UM.Theme.sizes.default_margin.width;
- anchors.verticalCenter: parent.verticalCenter
- Component{
- id: wizardDelegate
- Button {
- height: settingsModeSelection.height
- anchors.left: parent.left
- anchors.leftMargin: model.index * (settingsModeSelection.width / 2)
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width / 2
- text: model.text
- exclusiveGroup: modeMenuGroup;
- checkable: true;
- checked: base.currentModeIndex == index
- onClicked: base.currentModeIndex = index
- style: ButtonStyle {
- background: Rectangle {
- color: control.checked ? UM.Theme.colors.toggle_active : UM.Theme.colors.toggle_disabled
- Behavior on color { ColorAnimation { duration: 50; } }
- Label {
- anchors.centerIn: parent
- color: control.checked ? UM.Theme.colors.toggle_active_text : UM.Theme.colors.toggle_disabled_text
- font: UM.Theme.fonts.default
- text: control.text;
- }
- }
- label: Item { }
- }
- }
- }
- ExclusiveGroup { id: modeMenuGroup; }
- ListView{
- id: modesList
- property var index: 0
- model: base.modesModel
- delegate: wizardDelegate
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width
- }
- }
+ Label{
+ id: printjobTabLabel
+ text: catalog.i18nc("@label:listbox","Print Job");
+ anchors.left: parent.left
+ anchors.leftMargin: UM.Theme.sizes.default_margin.width;
+ anchors.top: settingsModeRow.bottom
+ anchors.topMargin: UM.Theme.sizes.default_margin.height
+ width: parent.width/100*45
+ font: UM.Theme.fonts.large;
+ color: UM.Theme.colors.text
}
Rectangle {
id: machineSelectionRow
width: base.width
height: UM.Theme.sizes.sidebar_setup.height
- anchors.top: settingsModeRow.bottom
+ anchors.top: printjobTabLabel.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.horizontalCenter: parent.horizontalCenter
@@ -100,7 +52,7 @@ Item
anchors.leftMargin: UM.Theme.sizes.default_margin.width
anchors.verticalCenter: parent.verticalCenter
font: UM.Theme.fonts.default;
- color: UM.Theme.colors.text_default;
+ color: UM.Theme.colors.text;
}
ToolButton {
diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml
index a16b0af225..7ed23c3af5 100644
--- a/resources/qml/SidebarSimple.qml
+++ b/resources/qml/SidebarSimple.qml
@@ -13,6 +13,9 @@ Item
id: base;
anchors.fill: parent;
+ signal showTooltip(Item item, point location, string text);
+ signal hideTooltip();
+
property Action configureSettings;
property variant minimumPrintTime: PrintInformation.minimumPrintTime;
property variant maximumPrintTime: PrintInformation.maximumPrintTime;
@@ -20,12 +23,110 @@ Item
Component.onCompleted: PrintInformation.enabled = true
Component.onDestruction: PrintInformation.enabled = false
UM.I18nCatalog { id: catalog; name:"cura"}
+/*
+ Rectangle{
+ id: speedCellLeft
+ anchors.top: parent.top
+ anchors.left: parent.left
+ width: base.width/100*35 - UM.Theme.sizes.default_margin.width
+ height: childrenRect.height
+ Label{
+ id: speedLabel
+ //: Speed selection label
+ text: catalog.i18nc("@label","Speed:");
+ font: UM.Theme.fonts.default;
+ color: UM.Theme.colors.text;
+ anchors.top: parent.top
+ anchors.topMargin: UM.Theme.sizes.default_margin.height
+ anchors.left: parent.left
+ anchors.leftMargin: UM.Theme.sizes.default_margin.width
+ }
+ }
+
+ Rectangle {
+ id: speedCellRight
+ anchors.left: speedCellLeft.right
+ anchors.top: speedCellLeft.top
+ anchors.topMargin: UM.Theme.sizes.default_margin.height
+ width: parent.width/100*65 - UM.Theme.sizes.default_margin.width
+ height: childrenRect.height
+
+ CheckBox{
+ id: normalSpeedCheckBox
+ property bool hovered_ex: false
+
+ anchors.top: parent.top
+ anchors.left: parent.left
+
+ //: Normal speed checkbox
+ text: catalog.i18nc("@option:check","Normal");
+ style: UM.Theme.styles.checkbox;
+
+ exclusiveGroup: speedCheckBoxGroup
+ checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.speed_print <= 60 : true;
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked:
+ {
+ UM.MachineManager.setSettingValue("speed_print", 60)
+ }
+ onEntered:
+ {
+ parent.hovered_ex = true
+ base.showTooltip(normalSpeedCheckBox, Qt.point(-speedCellRight.x, parent.height),
+ catalog.i18nc("@label", "Use normal printing speed. This will result in high quality prints."));
+ }
+ onExited:
+ {
+ parent.hovered_ex = false
+ base.hideTooltip();
+ }
+ }
+ }
+ CheckBox{
+ id: highSpeedCheckBox
+ property bool hovered_ex: false
+
+ anchors.top: parent.top
+ anchors.left: normalSpeedCheckBox.right
+ anchors.leftMargin: UM.Theme.sizes.default_margin.width
+
+ //: High speed checkbox
+ text: catalog.i18nc("@option:check","Fast");
+ style: UM.Theme.styles.checkbox;
+
+ exclusiveGroup: speedCheckBoxGroup
+ checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.speed_print > 60 : true;
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked:
+ {
+ UM.MachineManager.setSettingValue("speed_print", 100)
+ }
+ onEntered:
+ {
+ parent.hovered_ex = true
+ base.showTooltip(normalSpeedCheckBox, Qt.point(-speedCellRight.x, parent.height),
+ catalog.i18nc("@label", "Use high printing speed. This will reduce printing time, but may affect the quality of the print."));
+ }
+ onExited:
+ {
+ parent.hovered_ex = false
+ base.hideTooltip();
+ }
+ }
+ }
+ ExclusiveGroup { id: speedCheckBoxGroup; }
+ }
+*/
Rectangle{
id: infillCellLeft
anchors.top: parent.top
anchors.left: parent.left
- width: base.width/100* 55 - UM.Theme.sizes.default_margin.width
+ width: base.width/100* 35 - UM.Theme.sizes.default_margin.width
height: childrenRect.height < UM.Theme.sizes.simple_mode_infill_caption.height ? UM.Theme.sizes.simple_mode_infill_caption.height : childrenRect.height
Label{
@@ -33,34 +134,34 @@ Item
//: Infill selection label
text: catalog.i18nc("@label","Infill:");
font: UM.Theme.fonts.default;
- color: UM.Theme.colors.text_default;
+ color: UM.Theme.colors.text;
anchors.top: parent.top
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
}
- Label{
+/* Label{
id: infillCaption
- width: infillCellLeft.width - UM.Theme.sizes.default_margin.width
+ width: infillCellLeft.width - UM.Theme.sizes.default_margin.width * 2
text: infillModel.count > 0 && infillListView.activeIndex != -1 ? infillModel.get(infillListView.activeIndex).text : ""
font: UM.Theme.fonts.caption
wrapMode: Text.Wrap
- color: UM.Theme.colors.text
+ color: UM.Theme.colors.text_subtext
anchors.top: infillLabel.bottom
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
- }
+ } */
}
Flow {
id: infillCellRight
height: childrenRect.height;
- width: base.width / 100 * 45
+ width: base.width / 100 * 65
+ spacing: UM.Theme.sizes.default_margin.width
- anchors.right: parent.right
- anchors.rightMargin: UM.Theme.sizes.default_margin.width - (UM.Theme.sizes.default_margin.width/4)
- anchors.top: parent.top
+ anchors.left: infillCellLeft.right
+ anchors.top: infillCellLeft.top
anchors.topMargin: UM.Theme.sizes.default_margin.height
Repeater {
@@ -91,28 +192,41 @@ Item
Rectangle{
id: infillIconLining
- width: infillCellRight.width / 3 - UM.Theme.sizes.default_margin.width;
+ width: (infillCellRight.width - 3 * UM.Theme.sizes.default_margin.width) / 4;
height: width
- border.color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border
- border.width: infillListView.activeIndex == index ? 2 : 1
- color: infillListView.activeIndex == index ? UM.Theme.colors.setting_category_active : "transparent"
+ border.color: (infillListView.activeIndex == index) ? UM.Theme.colors.setting_control_selected :
+ (mousearea.containsMouse ? UM.Theme.colors.setting_control_border_highlight : UM.Theme.colors.setting_control_border)
+ border.width: UM.Theme.sizes.default_lining.width
+ color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_selected : "transparent"
- Image {
+ UM.RecolorImage {
id: infillIcon
anchors.fill: parent;
- anchors.margins: UM.Theme.sizes.default_margin.width / 2
+ anchors.margins: UM.Theme.sizes.infill_button_margin.width
sourceSize.width: width
sourceSize.height: width
source: UM.Theme.icons[model.icon];
+ color: (infillListView.activeIndex == index) ? UM.Theme.colors.text_white : UM.Theme.colors.text
}
MouseArea {
+ id: mousearea
anchors.fill: parent
+ hoverEnabled: true
onClicked: {
- infillListView.activeIndex = index
- UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage)
+ if (infillListView.activeIndex != index)
+ {
+ infillListView.activeIndex = index
+ UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage)
+ }
+ }
+ onEntered: {
+ base.showTooltip(infillCellRight, Qt.point(-infillCellRight.x, parent.height), model.text);
+ }
+ onExited: {
+ base.hideTooltip();
}
}
}
@@ -132,9 +246,15 @@ Item
Component.onCompleted:
{
infillModel.append({
- name: catalog.i18nc("@label", "Sparse"),
+ name: catalog.i18nc("@label", "Hollow"),
+ percentage: 0,
+ text: catalog.i18nc("@label", "No (0%) infill will leave your model hollow at the cost of low strength"),
+ icon: "hollow"
+ })
+ infillModel.append({
+ name: catalog.i18nc("@label", "Light"),
percentage: 20,
- text: catalog.i18nc("@label", "Sparse (20%) infill will give your model an average strength"),
+ text: catalog.i18nc("@label", "Light (20%) infill will give your model an average strength"),
icon: "sparse"
})
infillModel.append({
@@ -158,7 +278,7 @@ Item
anchors.top: infillCellRight.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: parent.left
- width: parent.width/100*45 - UM.Theme.sizes.default_margin.width
+ width: parent.width/100*35 - UM.Theme.sizes.default_margin.width
height: childrenRect.height
Label{
@@ -167,45 +287,81 @@ Item
//: Helpers selection label
text: catalog.i18nc("@label:listbox","Helpers:");
font: UM.Theme.fonts.default;
- color: UM.Theme.colors.text_default;
+ color: UM.Theme.colors.text;
}
}
Rectangle {
id: helpersCellRight
anchors.top: helpersCellLeft.top
anchors.left: helpersCellLeft.right
- width: parent.width/100*55 - UM.Theme.sizes.default_margin.width
+ width: parent.width/100*65 - UM.Theme.sizes.default_margin.width
height: childrenRect.height
CheckBox{
- id: skirtCheckBox
+ id: brimCheckBox
+ property bool hovered_ex: false
+
anchors.top: parent.top
anchors.left: parent.left
//: Setting enable skirt adhesion checkbox
- text: catalog.i18nc("@option:check","Enable Skirt Adhesion");
+ text: catalog.i18nc("@option:check","Generate Brim");
style: UM.Theme.styles.checkbox;
checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.adhesion_type == "brim" : false;
- onClicked:
- {
- UM.MachineManager.setSettingValue("adhesion_type", "brim")
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked:
+ {
+ parent.checked = !parent.checked
+ UM.MachineManager.setSettingValue("adhesion_type", parent.checked?"brim":"skirt")
+ }
+ onEntered:
+ {
+ parent.hovered_ex = true
+ base.showTooltip(brimCheckBox, Qt.point(-helpersCellRight.x, parent.height),
+ catalog.i18nc("@label", "Enable printing a brim. This will add a single-layer-thick flat area around your object which is easy to cut off afterwards."));
+ }
+ onExited:
+ {
+ parent.hovered_ex = false
+ base.hideTooltip();
+ }
}
}
CheckBox{
- anchors.top: skirtCheckBox.bottom
+ id: supportCheckBox
+ property bool hovered_ex: false
+
+ anchors.top: brimCheckBox.bottom
anchors.topMargin: UM.Theme.sizes.default_lining.height
anchors.left: parent.left
//: Setting enable support checkbox
- text: catalog.i18nc("@option:check","Enable Support");
-
+ text: catalog.i18nc("@option:check","Generate Support Structure");
style: UM.Theme.styles.checkbox;
checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.support_enable : false;
- onClicked:
- {
- UM.MachineManager.setSettingValue("support_enable", checked)
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked:
+ {
+ parent.checked = !parent.checked
+ UM.MachineManager.setSettingValue("support_enable", parent.checked)
+ }
+ onEntered:
+ {
+ parent.hovered_ex = true
+ base.showTooltip(supportCheckBox, Qt.point(-helpersCellRight.x, parent.height),
+ catalog.i18nc("@label", "Enable printing support structures. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air."));
+ }
+ onExited:
+ {
+ parent.hovered_ex = false
+ base.hideTooltip();
+ }
}
}
}
diff --git a/resources/qml/SidebarTooltip.qml b/resources/qml/SidebarTooltip.qml
index 8b7cc1c0dc..c51a33c611 100644
--- a/resources/qml/SidebarTooltip.qml
+++ b/resources/qml/SidebarTooltip.qml
@@ -8,13 +8,15 @@ import QtQuick.Layouts 1.1
import UM 1.0 as UM
-Rectangle {
+UM.PointingRectangle {
id: base;
width: UM.Theme.sizes.tooltip.width;
height: label.height + UM.Theme.sizes.tooltip_margins.height * 2;
color: UM.Theme.colors.tooltip;
+ arrowSize: UM.Theme.sizes.default_arrow.width
+
opacity: 0;
Behavior on opacity { NumberAnimation { duration: 100; } }
@@ -26,9 +28,10 @@ Rectangle {
y = parent.height - base.height;
} else {
x = position.x - base.width;
- y = position.y;
+ y = position.y - UM.Theme.sizes.tooltip_arrow_margins.height;
}
base.opacity = 1;
+ target = Qt.point(40 , position.y)
}
function hide() {
@@ -47,6 +50,6 @@ Rectangle {
}
wrapMode: Text.Wrap;
font: UM.Theme.fonts.default;
- color: UM.Theme.colors.text_default;
+ color: UM.Theme.colors.tooltip_text;
}
}
diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml
index 206fb69261..4eca81a4a6 100644
--- a/resources/qml/Toolbar.qml
+++ b/resources/qml/Toolbar.qml
@@ -20,7 +20,7 @@ Item {
anchors.bottom: parent.bottom;
anchors.left: parent.left;
- spacing: UM.Theme.sizes.default_lining.width
+ spacing: UM.Theme.sizes.button_lining.width
Repeater {
id: repeat
@@ -50,20 +50,17 @@ Item {
}
}
- Rectangle {
- width: base.width
- height: base.height
- z: parent.z - 1
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- color: UM.Theme.colors.lining
- }
-
- Rectangle {
- id: panelBackground;
+ UM.PointingRectangle {
+ id: panelBorder;
anchors.left: parent.right;
- y: base.activeY
+ anchors.leftMargin: UM.Theme.sizes.default_margin.width;
+ anchors.top: base.top;
+ anchors.topMargin: base.activeY
+ z: buttons.z -1
+
+ target: Qt.point(parent.right, base.activeY + UM.Theme.sizes.button.height/2)
+ arrowSize: UM.Theme.sizes.default_arrow.width
width: {
if (panel.item && panel.width > 0){
@@ -78,9 +75,20 @@ Item {
opacity: panel.item ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100 } }
- color: UM.Theme.colors.tool_panel_background;
- border.width: UM.Theme.sizes.default_lining.width
- border.color: UM.Theme.colors.lining
+ color: UM.Theme.colors.lining;
+ //border.width: UM.Theme.sizes.default_lining.width
+ //border.color: UM.Theme.colors.lining
+
+ UM.PointingRectangle {
+ id: panelBackground;
+
+ color: UM.Theme.colors.tool_panel_background;
+ anchors.fill: parent
+ anchors.margins: UM.Theme.sizes.default_lining.width
+
+ target: Qt.point(-UM.Theme.sizes.default_margin.width, UM.Theme.sizes.button.height/2)
+ arrowSize: parent.arrowSize
+ }
Loader {
id: panel
diff --git a/resources/themes/cura/icons/dense.svg b/resources/themes/cura/icons/dense.svg
index 44097c21de..9c527ecc92 100644
--- a/resources/themes/cura/icons/dense.svg
+++ b/resources/themes/cura/icons/dense.svg
@@ -3,17 +3,12 @@
diff --git a/resources/themes/cura/icons/dot.svg b/resources/themes/cura/icons/dot.svg
new file mode 100644
index 0000000000..e1f093bed0
--- /dev/null
+++ b/resources/themes/cura/icons/dot.svg
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/resources/themes/cura/icons/hollow.svg b/resources/themes/cura/icons/hollow.svg
new file mode 100644
index 0000000000..49d1749acc
--- /dev/null
+++ b/resources/themes/cura/icons/hollow.svg
@@ -0,0 +1,13 @@
+
+
+
diff --git a/resources/themes/cura/icons/solid.svg b/resources/themes/cura/icons/solid.svg
index 9c527ecc92..622b07e4fa 100644
--- a/resources/themes/cura/icons/solid.svg
+++ b/resources/themes/cura/icons/solid.svg
@@ -1,14 +1,171 @@
-
+
-
\ No newline at end of file
diff --git a/resources/themes/cura/icons/sparse.svg b/resources/themes/cura/icons/sparse.svg
index e32a7345b1..44097c21de 100644
--- a/resources/themes/cura/icons/sparse.svg
+++ b/resources/themes/cura/icons/sparse.svg
@@ -9,7 +9,11 @@
-
-
+
+
+
+
+
+
diff --git a/resources/themes/cura/icons/viewmode.svg b/resources/themes/cura/icons/viewmode.svg
index b015d87df7..f83a195a21 100644
--- a/resources/themes/cura/icons/viewmode.svg
+++ b/resources/themes/cura/icons/viewmode.svg
@@ -1,3384 +1,18 @@
-
-
-
-
-
-
-
-
-
-]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml
index 027ef72050..b64ba24874 100644
--- a/resources/themes/cura/styles.qml
+++ b/resources/themes/cura/styles.qml
@@ -13,7 +13,7 @@ QtObject {
background: Rectangle {
color: UM.Theme.colors.setting_control
border.width: 1
- border.color: UM.Theme.colors.setting_control_border
+ border.color: control.hovered ? UM.Theme.colors.setting_control_border_highlight : UM.Theme.colors.setting_control_border
UM.RecolorImage {
id: downArrow
anchors.verticalCenter: parent.verticalCenter
@@ -28,47 +28,41 @@ QtObject {
}
Label {
id: sidebarComboBoxLabel
- //property bool down: control.pressed || (control.checkable && control.checked);
color: UM.Theme.colors.setting_control_text
text: control.text;
elide: Text.ElideRight;
anchors.left: parent.left;
anchors.leftMargin: UM.Theme.sizes.setting_unit_margin.width
- anchors.right: separationLine.left;
+ anchors.right: downArrow.left;
anchors.verticalCenter: parent.verticalCenter;
font: UM.Theme.fonts.default
}
- Rectangle{
- id: separationLine
- width: 1
- height: UM.Theme.sizes.setting_control.height
- color: UM.Theme.colors.setting_control_border
- anchors.right: downArrow.left
- anchors.rightMargin: UM.Theme.sizes.setting_unit_margin.width + downArrow.width/2
- anchors.top: parent.top
- z: parent.z + 1
- }
}
label: Label{}
}
}
+/*
property Component open_file_button: Component {
ButtonStyle {
background: Item{
implicitWidth: UM.Theme.sizes.button.width;
implicitHeight: UM.Theme.sizes.button.height;
Rectangle {
+ id: tool_button_background
anchors.left: parent.right
anchors.verticalCenter: parent.verticalCenter
- color: UM.Theme.colors.button_text
- width: control.hovered ? openFileLabel.width : 0;
- height: openFileLabel.height
- Behavior on width { NumberAnimation { duration: 100; } }
opacity: control.hovered ? 1.0 : 0.0;
+
+ width: control.hovered ? label.width : 0;
+ height: label.height
+
+ Behavior on width { NumberAnimation { duration: 100; } }
+ Behavior on height { NumberAnimation { duration: 100; } }
Behavior on opacity { NumberAnimation { duration: 100; } }
+
Label {
- id: openFileLabel
+ id: label
anchors.bottom: parent.bottom
text: control.text
font: UM.Theme.fonts.button_tooltip;
@@ -77,7 +71,8 @@ QtObject {
}
Rectangle {
anchors.fill: parent;
- color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
+ color: control.pressed ? UM.Theme.colors.button_active :
+ control.hovered ? UM.Theme.colors.button_hover : UM.Theme.colors.button
Behavior on color { ColorAnimation { duration: 50; } }
}
}
@@ -92,6 +87,7 @@ QtObject {
}
}
}
+*/
property Component tool_button: Component {
ButtonStyle {
@@ -99,39 +95,33 @@ QtObject {
implicitWidth: UM.Theme.sizes.button.width;
implicitHeight: UM.Theme.sizes.button.height;
- Rectangle {
- id: tool_button_background
- anchors.left: control.verticalTooltip ? parent.left : parent.right
- anchors.verticalCenter: control.verticalTooltip ? undefined : parent.verticalCenter
- anchors.top: control.verticalTooltip ? parent.bottom : undefined
+ UM.PointingRectangle {
+ id: button_tooltip
+
+ anchors.left: parent.right
+ anchors.leftMargin: UM.Theme.sizes.button_tooltip_arrow.width * 2
+ anchors.verticalCenter: parent.verticalCenter
+
+ target: Qt.point(parent.x, y + height/2)
+ arrowSize: UM.Theme.sizes.button_tooltip_arrow.width
+ color: UM.Theme.colors.tooltip
opacity: control.hovered ? 1.0 : 0.0;
- width: {
- if (control.verticalTooltip == true){
- if (label.width > parent.width)
- return label.width
- else
- return parent.width
- }
- else {
- if (control.hovered)
- return label.width
- else
- return 0
- }
- }
- height: !control.verticalTooltip ? label.height : control.hovered ? label.height: 0
+ width: control.hovered ? button_tip.width + UM.Theme.sizes.button_tooltip.width : 0
+ height: UM.Theme.sizes.button_tooltip.height
Behavior on width { NumberAnimation { duration: 100; } }
- Behavior on height { NumberAnimation { duration: 100; } }
Behavior on opacity { NumberAnimation { duration: 100; } }
Label {
- id: label
- anchors.bottom: parent.bottom
- text: control.text
+ id: button_tip
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter;
+
+ text: control.text;
font: UM.Theme.fonts.button_tooltip;
- color: UM.Theme.colors.button_tooltip_text;
+ color: UM.Theme.colors.tooltip_text;
}
}
@@ -154,16 +144,21 @@ QtObject {
}
Behavior on color { ColorAnimation { duration: 50; } }
- Label {
+
+ UM.RecolorImage {
id: tool_button_arrow
- opacity: !control.enabled ? 0.4 : 1.0
+ opacity: !control.enabled ? 0.2 : 1.0
anchors.right: parent.right;
- anchors.rightMargin: (UM.Theme.sizes.button.width - UM.Theme.sizes.button_icon.width - tool_button_arrow.width) / 2
- anchors.verticalCenter: parent.verticalCenter;
- text: "▼";
- font: UM.Theme.fonts.small;
+ anchors.rightMargin: (UM.Theme.sizes.button.width - UM.Theme.sizes.button_icon.width) / 4
+ anchors.bottom: parent.bottom;
+ anchors.bottomMargin: (UM.Theme.sizes.button.height - UM.Theme.sizes.button_icon.height) / 4
+ width: UM.Theme.sizes.standard_arrow.width
+ height: UM.Theme.sizes.standard_arrow.height
+ sourceSize.width: width
+ sourceSize.height: width
visible: control.menu != null;
color: UM.Theme.colors.button_text
+ source: UM.Theme.icons.arrow_bottom
}
}
}
@@ -171,7 +166,7 @@ QtObject {
label: Item {
Image {
anchors.centerIn: parent;
- opacity: !control.enabled ? 0.4 : 1.0
+ opacity: !control.enabled ? 0.2 : 1.0
source: control.iconSource;
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
@@ -181,6 +176,8 @@ QtObject {
}
}
}
+
+/*
property Component tool_button_panel: Component {
ButtonStyle {
background: Item {
@@ -189,21 +186,21 @@ QtObject {
Rectangle {
id: tool_button_background
- anchors.top: parent.verticalCenter;
-
- width: parent.width;
- height: control.hovered ? parent.height / 2 + label.height : 0;
- Behavior on height { NumberAnimation { duration: 100; } }
-
+ anchors.left: parent.right
+ anchors.verticalCenter: parent.verticalCenter
opacity: control.hovered ? 1.0 : 0.0;
+
+ width: control.hovered ? label.width : 0;
+ height: label.height
+
+ Behavior on width { NumberAnimation { duration: 100; } }
+ Behavior on height { NumberAnimation { duration: 100; } }
Behavior on opacity { NumberAnimation { duration: 100; } }
Label {
id: label
anchors.bottom: parent.bottom
text: control.text
- width: UM.Theme.sizes.button.width;
- wrapMode: Text.WordWrap
font: UM.Theme.fonts.button_tooltip;
color: UM.Theme.colors.button_tooltip_text;
}
@@ -246,18 +243,20 @@ QtObject {
}
}
}
-
+*/
property Component progressbar: Component{
ProgressBarStyle {
background:Rectangle {
implicitWidth: UM.Theme.sizes.message.width - (UM.Theme.sizes.default_margin.width * 2)
implicitHeight: UM.Theme.sizes.progressbar.height
+ radius: UM.Theme.sizes.progressbar_radius.width
color: UM.Theme.colors.progressbar_background
}
progress: Rectangle {
color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control
Rectangle{
+ radius: UM.Theme.sizes.progressbar_radius.width
color: UM.Theme.colors.progressbar_control
width: UM.Theme.sizes.progressbar_control.width
height: UM.Theme.sizes.progressbar_control.height
@@ -281,6 +280,11 @@ QtObject {
property Component sidebar_category: Component {
ButtonStyle {
background: Rectangle {
+ anchors.fill: parent;
+ anchors.left: parent.left
+ anchors.leftMargin: UM.Theme.sizes.default_margin.width
+ anchors.right: parent.right
+ anchors.rightMargin: UM.Theme.sizes.default_margin.width
implicitHeight: UM.Theme.sizes.section.height;
color: {
if(control.color) {
@@ -298,6 +302,24 @@ QtObject {
}
}
Behavior on color { ColorAnimation { duration: 50; } }
+ Rectangle {
+ height: UM.Theme.sizes.default_lining.height
+ width: parent.width
+ anchors.bottom: parent.bottom
+ color: {
+ if(!control.enabled) {
+ return UM.Theme.colors.setting_category_disabled_border;
+ } else if(control.hovered && control.checkable && control.checked) {
+ return UM.Theme.colors.setting_category_active_hover_border;
+ } else if(control.pressed || (control.checkable && control.checked)) {
+ return UM.Theme.colors.setting_category_active_border;
+ } else if(control.hovered) {
+ return UM.Theme.colors.setting_category_hover_border;
+ } else {
+ return UM.Theme.colors.setting_category_border;
+ }
+ }
+ }
}
label: Item {
anchors.fill: parent;
@@ -341,7 +363,7 @@ QtObject {
sourceSize.width: width
sourceSize.height: width
color: UM.Theme.colors.setting_category_text
- source: control.checked ? UM.Theme.icons.arrow_top : UM.Theme.icons.arrow_bottom
+ source: control.checked ? UM.Theme.icons.arrow_bottom : UM.Theme.icons.arrow_left
}
}
}
@@ -356,12 +378,14 @@ QtObject {
scrollBarBackground: Rectangle {
implicitWidth: UM.Theme.sizes.scrollbar.width
+ radius: implicitWidth / 2
color: UM.Theme.colors.scrollbar_background;
}
handle: Rectangle {
id: scrollViewHandle
implicitWidth: UM.Theme.sizes.scrollbar.width;
+ radius: implicitWidth / 2
color: styleData.pressed ? UM.Theme.colors.scrollbar_handle_down : styleData.hovered ? UM.Theme.colors.scrollbar_handle_hover : UM.Theme.colors.scrollbar_handle;
Behavior on color { ColorAnimation { duration: 50; } }
@@ -381,7 +405,9 @@ QtObject {
controlColor: UM.Theme.colors.setting_control;
controlHighlightColor: UM.Theme.colors.setting_control_highlight;
controlBorderColor: UM.Theme.colors.setting_control_border;
+ controlBorderHighlightColor: UM.Theme.colors.setting_control_border_highlight;
controlTextColor: UM.Theme.colors.setting_control_text;
+ controlBorderWidth: UM.Theme.sizes.default_lining.width;
controlFont: UM.Theme.fonts.default;
validationErrorColor: UM.Theme.colors.setting_validation_error;
@@ -400,19 +426,24 @@ QtObject {
implicitWidth: UM.Theme.sizes.checkbox.width;
implicitHeight: UM.Theme.sizes.checkbox.height;
- color: control.hovered ? UM.Theme.colors.checkbox_hover : UM.Theme.colors.checkbox;
+ color: (control.hovered || control.hovered_ex) ? UM.Theme.colors.checkbox_hover : UM.Theme.colors.checkbox;
Behavior on color { ColorAnimation { duration: 50; } }
- border.width: 1
- border.color: UM.Theme.colors.checkbox_border;
+ radius: control.exclusiveGroup ? UM.Theme.sizes.checkbox.width / 2 : 0
- Label {
- anchors.centerIn: parent;
- color: UM.Theme.colors.checkbox_mark;
+ border.width: UM.Theme.sizes.default_lining.width;
+ border.color: (control.hovered || control.hovered_ex) ? UM.Theme.colors.checkbox_border_hover : UM.Theme.colors.checkbox_border;
- text: "✓";
-
- opacity: control.checked ? 1 : 0;
+ UM.RecolorImage {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: parent.width/2.5
+ height: parent.height/2.5
+ sourceSize.width: width
+ sourceSize.height: width
+ color: UM.Theme.colors.checkbox_mark
+ source: control.exclusiveGroup ? UM.Theme.icons.dot : UM.Theme.icons.check
+ opacity: control.checked
Behavior on opacity { NumberAnimation { duration: 100; } }
}
}
@@ -431,7 +462,7 @@ QtObject {
implicitHeight: UM.Theme.sizes.slider_groove.height;
color: UM.Theme.colors.slider_groove;
- border.width: 1;
+ border.width: UM.Theme.sizes.default_lining.width;
border.color: UM.Theme.colors.slider_groove_border;
Rectangle {
@@ -459,9 +490,10 @@ QtObject {
id: layerSliderGroove
implicitWidth: control.width;
implicitHeight: UM.Theme.sizes.slider_groove.height;
+ radius: width/2;
color: UM.Theme.colors.slider_groove;
- border.width: 1;
+ border.width: UM.Theme.sizes.default_lining;
border.color: UM.Theme.colors.slider_groove_border;
Rectangle {
anchors {
@@ -471,6 +503,7 @@ QtObject {
}
color: UM.Theme.colors.slider_groove_fill;
width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width;
+ radius: width/2
}
}
handle: Rectangle {
@@ -481,7 +514,6 @@ QtObject {
Behavior on color { ColorAnimation { duration: 50; } }
TextField {
id: valueLabel
- property int unremovableSpacing: 5
property string maxValue: control.maximumValue + 1
placeholderText: control.value + 1
onEditingFinished: {
@@ -494,20 +526,17 @@ QtObject {
}
validator: IntValidator {bottom: 1; top: control.maximumValue + 1;}
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
- anchors.bottom: layerSliderControl.bottom
- anchors.right: layerSliderControl.left
- anchors.rightMargin: valueLabel.unremovableSpacing / 2
- anchors.bottomMargin: parent.width + (UM.Theme.sizes.default_margin.width / 2)
- transformOrigin: Item.BottomRight
+ anchors.top: layerSliderControl.bottom
+ anchors.topMargin: UM.Theme.sizes.default_margin.width
+ anchors.horizontalCenter: layerSliderControl.horizontalCenter
rotation: 90
style: TextFieldStyle{
textColor: UM.Theme.colors.setting_control_text;
font: UM.Theme.fonts.default;
background: Rectangle {
- radius: 0
implicitWidth: control.maxValue.length * valueLabel.font.pixelSize
- implicitHeight: UM.Theme.sizes.slider_handle.height + valueLabel.unremovableSpacing
- border.width: 1;
+ implicitHeight: UM.Theme.sizes.slider_handle.height + UM.Theme.sizes.default_margin.width
+ border.width: UM.Theme.sizes.default_lining.width;
border.color: UM.Theme.colors.slider_groove_border;
}
}
@@ -526,8 +555,8 @@ QtObject {
implicitHeight: control.height;
implicitWidth: control.width;
- border.width: 1;
- border.color: UM.Theme.colors.setting_control_border;
+ border.width: UM.Theme.sizes.default_lining.width;
+ border.color: control.hovered ? UM.Theme.colors.setting_control_border_highlight : UM.Theme.colors.setting_control_border;
color: UM.Theme.colors.setting_validation_ok;
diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json
index f4660e4f0f..a3eb519e32 100644
--- a/resources/themes/cura/theme.json
+++ b/resources/themes/cura/theme.json
@@ -1,159 +1,180 @@
{
"fonts": {
"large": {
- "size": 1.5,
+ "size": 1.25,
"bold": true,
- "family": "Roboto"
+ "family": "Proxima Nova Rg"
},
"default": {
- "size": 1,
- "family": "Roboto"
- },
- "default_allcaps": {
- "size": 1,
- "capitalize": true,
- "family": "Roboto"
+ "size": 1.15,
+ "family": "Proxima Nova Rg"
},
"small": {
- "size": 0.75,
- "family": "Roboto"
- },
- "tiny": {
- "size": 0.5,
- "family": "Roboto"
+ "size": 1.0,
+ "family": "Proxima Nova Rg"
},
"caption": {
- "size": 0.75,
- "italic": true,
- "family": "Roboto"
+ "size": 1.0,
+ "family": "Proxima Nova Rg"
},
"sidebar_header": {
"size": 0.75,
"capitalize": true,
- "family": "Roboto"
+ "family": "Proxima Nova Rg"
},
"default_header": {
"size": 1.0,
"bold": true,
- "family": "Roboto",
+ "family": "Proxima Nova Rg",
"letterSpacing": 2.0
},
"button_tooltip": {
- "size": 0.75,
- "capitalize": true,
- "family": "Roboto"
+ "size": 1.0,
+ "family": "Proxima Nova Rg"
},
"setting_category": {
- "size": 1.0,
- "family": "Roboto"
+ "size": 1.15,
+ "family": "Proxima Nova Rg"
+ },
+ "action_button": {
+ "size": 1.15,
+ "bold": true,
+ "family": "Proxima Nova Rg"
}
},
"colors": {
- "text_default": [0, 0, 0, 255],
"sidebar": [255, 255, 255, 255],
- "lining": [208, 210, 211, 255],
+ "lining": [127, 127, 127, 255],
"primary": [12, 169, 227, 255],
- "primary_hover": [34, 150, 190, 255],
+ "primary_hover": [48, 182, 231, 255],
"primary_text": [255, 255, 255, 255],
- "border": [205, 202, 201, 255],
- "secondary": [205, 202, 201, 255],
+ "border": [127, 127, 127, 255],
+ "secondary": [245, 245, 245, 255],
- "text": [140, 144, 154, 255],
+ "text": [24, 41, 77, 255],
"text_inactive": [174, 174, 174, 255],
- "text_white": [255, 255, 255, 255],
"text_hover": [35, 35, 35, 255],
"text_pressed": [12, 169, 227, 255],
+ "text_white": [255, 255, 255, 255],
+ "text_subtext": [127, 127, 127, 255],
"error": [255, 140, 0, 255],
- "sidebar_header_bar": [12, 169, 227, 255],
+ "sidebar_header_bar": [24, 41, 77, 255],
+ "sidebar_lining": [245, 245, 245, 255],
- "button": [139, 143, 153, 255],
- "button_hover": [77, 184, 226, 255],
+ "button": [24, 41, 77, 255],
+ "button_hover": [70, 84, 113, 255],
"button_active": [32, 166, 219, 255],
- "button_active_hover": [77, 184, 226, 255],
+ "button_active_hover": [12, 169, 227, 255],
"button_text": [255, 255, 255, 255],
- "button_disabled": [0, 0, 0, 255],
- "button_tooltip_text": [35, 35, 35, 255],
+ "button_disabled": [24, 41, 77, 255],
+ "button_disabled_text": [70, 84, 113, 255],
- "toggle_active": [255, 255, 255, 255],
- "toggle_active_text": [77, 184, 226, 255],
- "toggle_disabled": [77, 184, 226, 255],
- "toggle_disabled_text": [255, 255, 255, 255],
+ "button_tooltip": [255, 255, 255, 255],
+ "button_tooltip_border": [24, 41, 77, 255],
+ "button_tooltip_text": [24, 41, 77, 255],
- "load_save_button": [0, 0, 0, 255],
- "load_save_button_text": [255, 255, 255, 255],
- "load_save_button_hover": [43, 45, 46, 255],
- "load_save_button_inactive": [176, 184, 191, 255],
- "load_save_button_inactive_text": [209, 214, 219, 255],
+ "toggle_checked": [24, 41, 77, 255],
+ "toggle_checked_border": [24, 41, 77, 255],
+ "toggle_checked_text": [255, 255, 255, 255],
+ "toggle_unchecked": [255, 255, 255, 255],
+ "toggle_unchecked_border": [127, 127, 127, 255],
+ "toggle_unchecked_text": [24, 41, 77, 255],
+ "toggle_hovered": [255, 255, 255, 255],
+ "toggle_hovered_border": [32, 166, 219, 255],
+ "toggle_hovered_text": [24, 41, 77, 255],
+ "toggle_active": [32, 166, 219, 255],
+ "toggle_active_border": [32, 166, 219, 255],
+ "toggle_active_text": [255, 255, 255, 255],
- "scrollbar_background": [245, 245, 245, 255],
- "scrollbar_handle": [12, 159, 227, 255],
- "scrollbar_handle_hover": [174, 174, 174, 255],
+ "action_button": [255, 255, 255, 255],
+ "action_button_text": [24, 41, 77, 255],
+ "action_button_border": [127, 127, 127, 255],
+ "action_button_hovered": [255, 255, 255, 255],
+ "action_button_hovered_text": [24, 41, 77, 255],
+ "action_button_hovered_border": [12, 169, 227, 255],
+ "action_button_active": [12, 169, 227, 255],
+ "action_button_active_text": [255, 255, 255, 255],
+ "action_button_active_border": [12, 169, 227, 255],
+ "action_button_disabled": [245, 245, 245, 255],
+ "action_button_disabled_text": [127, 127, 127, 255],
+ "action_button_disabled_border": [127, 127, 127, 255],
+
+ "scrollbar_background": [255, 255, 255, 255],
+ "scrollbar_handle": [24, 41, 77, 255],
+ "scrollbar_handle_hover": [12, 159, 227, 255],
"scrollbar_handle_down": [12, 159, 227, 255],
- "setting_category": [238, 238, 238, 255],
- "setting_category_disabled": [238, 238, 238, 255],
- "setting_category_hover": [231, 231, 231, 255],
- "setting_category_active": [240, 248, 255, 255],
- "setting_category_active_hover": [233, 244, 245, 255],
- "setting_category_text": [35, 35, 35, 255],
+ "setting_category": [255, 255, 255, 255],
+ "setting_category_disabled": [255, 255, 255, 255],
+ "setting_category_hover": [245, 245, 245, 255],
+ "setting_category_active": [255, 255, 255, 255],
+ "setting_category_active_hover": [245, 245, 245, 255],
+ "setting_category_text": [24, 41, 77, 255],
+ "setting_category_border": [127, 127, 127, 255],
+ "setting_category_disabled_border": [127, 127, 127, 255],
+ "setting_category_hover_border": [12, 159, 227, 255],
+ "setting_category_active_border": [245, 245, 245, 255],
+ "setting_category_active_hover_border": [245, 245, 245, 255],
"setting_control": [255, 255, 255, 255],
- "setting_control_highlight": [245, 245, 245, 255],
- "setting_control_border": [174, 174, 174, 255],
- "setting_control_text": [0, 0, 0, 255],
- "setting_control_depth_line": [162, 192, 227, 255],
- "setting_control_hover": [139, 143, 153, 255],
- "setting_control_selected": [35, 35, 35, 255],
- "setting_control_revert": [85, 85, 85, 255],
- "setting_unit": [174, 174, 174, 255],
+ "setting_control_selected": [24, 41, 77, 255],
+ "setting_control_highlight": [255, 255, 255, 0],
+ "setting_control_border": [127, 127, 127, 255],
+ "setting_control_border_highlight": [12, 169, 227, 255],
+ "setting_control_text": [24, 41, 77, 255],
+ "setting_control_depth_line": [127, 127, 127, 255],
+ "setting_control_revert": [127, 127, 127, 255],
+ "setting_unit": [127, 127, 127, 255],
"setting_validation_error": [255, 57, 14, 255],
"setting_validation_warning": [255, 186, 15, 255],
"setting_validation_ok": [255, 255, 255, 255],
- "progressbar_background": [208, 210, 211, 255],
- "progressbar_control": [12, 169, 227, 255],
+ "progressbar_background": [245, 245, 245, 255],
+ "progressbar_control": [24, 41, 77, 255],
"slider_groove": [245, 245, 245, 255],
- "slider_groove_border": [139, 143, 153, 255],
- "slider_groove_fill": [139, 143, 153, 255],
+ "slider_groove_border": [127, 127, 127, 255],
+ "slider_groove_fill": [127, 127, 127, 255],
"slider_handle": [32, 166, 219, 255],
"slider_handle_hover": [77, 182, 226, 255],
"slider_text_background": [255, 255, 255, 255],
"checkbox": [255, 255, 255, 255],
- "checkbox_hover": [245, 245, 245, 255],
- "checkbox_border": [174, 174, 174, 255],
- "checkbox_mark": [35, 35, 35, 255],
- "checkbox_text": [0, 0, 0, 255],
+ "checkbox_hover": [255, 255, 255, 255],
+ "checkbox_border": [127, 127, 127, 255],
+ "checkbox_border_hover": [12, 169, 227, 255],
+ "checkbox_mark": [24, 41, 77, 255],
+ "checkbox_text": [24, 41, 77, 255],
- "tooltip": [255, 225, 146, 255],
+ "tooltip": [12, 169, 227, 255],
+ "tooltip_text": [255, 255, 255, 255],
"message_background": [255, 255, 255, 255],
"message_text": [32, 166, 219, 255],
- "message_dismiss": [139, 143, 153, 255],
+ "message_dismiss": [127, 127, 127, 255],
"tool_panel_background": [255, 255, 255, 255],
"per_object_settings_panel_background": [255, 255, 255, 255],
- "per_object_settings_panel_border": [208, 210, 211, 255]
+ "per_object_settings_panel_border": [127, 127, 127, 255]
},
"sizes": {
- "window_margin": [1.5, 1.5],
+ "window_margin": [1.0, 1.0],
"default_margin": [1.0, 1.0],
- "default_lining": [0.1, 0.1],
+ "default_lining": [0.08, 0.08],
+ "default_arrow": [0.8, 0.8],
"logo": [9.5, 2.0],
- "sidebar": [26.0, 10.0],
- "sidebar_header": [0.0, 3.8],
- "sidebar_header_mode_toggle": [0.0, 2.4],
- "sidebar_setup": [0.0, 2.6],
- "sidebar_subParts": [0.0, 2.4],
- "sidebar_specs_bar": [0.0, 2.2],
- "sidebar_inputFields": [0.0, 1.9],
+ "sidebar": [30.0, 10.0],
+ "sidebar_header": [0.0, 4.0],
+ "sidebar_header_mode_toggle": [0.0, 2.0],
+ "sidebar_lining": [0.5, 0.5],
+ "sidebar_setup": [0.0, 2.0],
+ "sidebar_inputfields": [0.0, 2.0],
"simple_mode_infill_caption": [0.0, 5.0],
"simple_mode_infill_height": [0.0, 8.0],
@@ -161,8 +182,8 @@
"section_icon": [1.6, 1.6],
"section_icon_column": [2.8, 0.0],
- "setting": [21.0, 1.8],
- "setting_control": [7.0, 2.0],
+ "setting": [19.0, 1.8],
+ "setting_control": [10.0, 2.0],
"setting_control_depth_margin": [1.4, 0.0],
"setting_preferences_button_margin": [3.3, 0.0],
"setting_control_margin": [0.0, 0.0],
@@ -171,31 +192,35 @@
"standard_list_lineheight": [1.5, 1.5],
"standard_list_input": [20.0, 25.0],
- "standard_arrow": [0.6, 0.6],
+ "standard_arrow": [0.8, 0.8],
- "button": [3.8, 3.8],
- "button_icon": [2.6, 2.6],
+ "button": [4, 4],
+ "button_icon": [3, 3],
+ "button_lining": [0, 0],
+
+ "button_tooltip": [1.0, 1.3],
+ "button_tooltip_arrow": [0.25, 0.25],
"progressbar": [26.0, 0.8],
+ "progressbar_radius": [0.4, 0.4],
"progressbar_control": [8.0, 0.8],
"progressbar_padding": [0.0, 1.0],
- "scrollbar": [0.7, 0.5],
+ "scrollbar": [0.75, 0.5],
"slider_groove": [0.5, 0.5],
"slider_handle": [1.5, 1.5],
+ "slider_layerview_size": [1.0, 16.0],
"slider_layerview_background": [4.0, 0.0],
"slider_layerview_smalltext_margin": [0.3, 0.00],
- "slider_layerview_background_extension": [0.0, 2.2],
"slider_layerview_margin": [3.0, 3.0],
- "checkbox": [1.5, 1.5],
+ "checkbox": [2.0, 2.0],
"tooltip": [20.0, 10.0],
"tooltip_margins": [1.0, 1.0],
+ "tooltip_arrow_margins": [2.0, 2.0],
- "save_button_border": [0.06, 0.06],
- "save_button_header": [0.0, 3.2],
"save_button_text_margin": [0.3, 0.6],
"save_button_slicing_bar": [0.0, 2.2],
"save_button_label_margin": [0.5, 0.5],
@@ -209,8 +234,13 @@
"message_close": [1.25, 1.25],
"message_button": [6.0, 1.8],
+ "infill_button_margin": [0.5, 0.5],
+
"per_object_settings_button": [2.0, 2.0],
"per_object_settings_panel": [24.0, 10.0],
- "per_object_settings_panel_border": [0.1, 0.1]
+ "per_object_settings_panel_border": [0.1, 0.1],
+
+ "jobspecs": [20, 0],
+ "jobspecs_line": [2.0, 2.0]
}
}