diff --git a/cura/CuraSplashScreen.py b/cura/CuraSplashScreen.py index 07f88fc843..d27c9c0240 100644 --- a/cura/CuraSplashScreen.py +++ b/cura/CuraSplashScreen.py @@ -1,8 +1,8 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. -from PyQt5.QtCore import Qt -from PyQt5.QtGui import QPixmap, QColor, QFont +from PyQt5.QtCore import Qt, QCoreApplication +from PyQt5.QtGui import QPixmap, QColor, QFont, QFontMetrics from PyQt5.QtWidgets import QSplashScreen from UM.Resources import Resources @@ -11,7 +11,10 @@ from UM.Application import Application class CuraSplashScreen(QSplashScreen): def __init__(self): super().__init__() - self.setPixmap(QPixmap(Resources.getPath(Resources.Images, "cura.png"))) + self._scale = round(QFontMetrics(QCoreApplication.instance().font()).ascent() / 12) + + splash_image = QPixmap(Resources.getPath(Resources.Images, "cura.png")) + self.setPixmap(splash_image.scaled(splash_image.size() * self._scale)) def drawContents(self, painter): painter.save() @@ -19,11 +22,11 @@ class CuraSplashScreen(QSplashScreen): version = Application.getInstance().getVersion().split("-") - painter.setFont(QFont("Proxima Nova Rg", 20)) - painter.drawText(0, 0, 203, 230, Qt.AlignRight | Qt.AlignBottom, version[0]) + painter.setFont(QFont("Proxima Nova Rg", 20 )) + painter.drawText(0, 0, 330 * self._scale, 230 * self._scale, Qt.AlignHCenter | Qt.AlignBottom, version[0]) if len(version) > 1: - painter.setFont(QFont("Proxima Nova Rg", 12)) - painter.drawText(0, 0, 203, 255, Qt.AlignRight | Qt.AlignBottom, version[1]) + painter.setFont(QFont("Proxima Nova Rg", 12 )) + painter.drawText(0, 0, 330 * self._scale, 255 * self._scale, Qt.AlignHCenter | Qt.AlignBottom, version[1]) painter.restore() super().drawContents(painter) diff --git a/plugins/LayerView/__init__.py b/plugins/LayerView/__init__.py index cf9d5970da..3d43532126 100644 --- a/plugins/LayerView/__init__.py +++ b/plugins/LayerView/__init__.py @@ -18,7 +18,8 @@ def getMetaData(): }, "view": { "name": catalog.i18nc("@item:inlistbox", "Layers"), - "view_panel": "LayerView.qml" + "view_panel": "LayerView.qml", + "weight": 2 } } diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 1a10db90e3..6095b9ad96 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -104,7 +104,7 @@ Item { height: parent.height/2 sourceSize.width: width sourceSize.height: width - color: UM.Theme.colors.setting_control_revert + color: control.hovered ? UM.Theme.colors.setting_control_button_hover : UM.Theme.colors.setting_control_button source: UM.Theme.icons.cross1 } } diff --git a/plugins/SolidView/__init__.py b/plugins/SolidView/__init__.py index 2681b2d375..a2d874f8cb 100644 --- a/plugins/SolidView/__init__.py +++ b/plugins/SolidView/__init__.py @@ -16,7 +16,8 @@ def getMetaData(): "api": 2 }, "view": { - "name": i18n_catalog.i18nc("@item:inmenu", "Solid") + "name": i18n_catalog.i18nc("@item:inmenu", "Solid"), + "weight": 0 } } diff --git a/plugins/XRayView/__init__.py b/plugins/XRayView/__init__.py index 7d9b108f1e..277dc69b92 100644 --- a/plugins/XRayView/__init__.py +++ b/plugins/XRayView/__init__.py @@ -16,7 +16,8 @@ def getMetaData(): "api": 2 }, "view": { - "name": catalog.i18nc("@item:inlistbox", "X-Ray") + "name": catalog.i18nc("@item:inlistbox", "X-Ray"), + "weight": 1 } } diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index c4281fdd2b..8901667425 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -157,7 +157,7 @@ UM.MainWindow { id: machineMenu; //: Machine menu - title: catalog.i18nc("@title:menu","&Machine"); + title: catalog.i18nc("@title:menu","&Printer"); Instantiator { @@ -203,7 +203,7 @@ UM.MainWindow Menu { id: profileMenu - title: catalog.i18nc("@title:menu", "&Profile") + title: catalog.i18nc("@title:menu", "P&rofile") Instantiator { @@ -327,7 +327,8 @@ UM.MainWindow { horizontalCenter: parent.horizontalCenter horizontalCenterOffset: -(UM.Theme.sizes.sidebar.width/ 2) - verticalCenter: parent.verticalCenter; + top: parent.verticalCenter; + bottom: parent.bottom; } } diff --git a/resources/qml/GeneralPage.qml b/resources/qml/GeneralPage.qml index 1641afc3bb..67590e0627 100644 --- a/resources/qml/GeneralPage.qml +++ b/resources/qml/GeneralPage.qml @@ -11,7 +11,7 @@ import UM 1.1 as UM UM.PreferencesPage { //: General configuration page title - title: catalog.i18nc("@title:tab","General"); + title: catalog.i18nc("@title:tab","General") function setDefaultLanguage(languageCode) { @@ -38,74 +38,72 @@ UM.PreferencesPage setDefaultLanguage(defaultLanguage) } - GridLayout + ColumnLayout { - columns: 2; //: Language selection label UM.I18nCatalog{id: catalog; name:"cura"} - Label - { - id: languageLabel - text: catalog.i18nc("@label","Language") - } - ComboBox + RowLayout { - id: languageComboBox - model: ListModel + Label { - id: languageList - - Component.onCompleted: { -// append({ text: catalog.i18nc("@item:inlistbox", "Bulgarian"), code: "bg" }) -// append({ text: catalog.i18nc("@item:inlistbox", "Czech"), code: "cs" }) - append({ text: catalog.i18nc("@item:inlistbox", "English"), code: "en" }) - append({ text: catalog.i18nc("@item:inlistbox", "Finnish"), code: "fi" }) - append({ text: catalog.i18nc("@item:inlistbox", "French"), code: "fr" }) - append({ text: catalog.i18nc("@item:inlistbox", "German"), code: "de" }) -// append({ text: catalog.i18nc("@item:inlistbox", "Italian"), code: "it" }) - append({ text: catalog.i18nc("@item:inlistbox", "Polish"), code: "pl" }) -// append({ text: catalog.i18nc("@item:inlistbox", "Russian"), code: "ru" }) -// append({ text: catalog.i18nc("@item:inlistbox", "Spanish"), code: "es" }) - } + id: languageLabel + text: catalog.i18nc("@label","Language:") } - currentIndex: + ComboBox { - var code = UM.Preferences.getValue("general/language"); - for(var i = 0; i < languageList.count; ++i) + id: languageComboBox + model: ListModel { - if(model.get(i).code == code) - { - return i + id: languageList + + Component.onCompleted: { +// append({ text: catalog.i18nc("@item:inlistbox", "Bulgarian"), code: "bg" }) +// append({ text: catalog.i18nc("@item:inlistbox", "Czech"), code: "cs" }) + append({ text: catalog.i18nc("@item:inlistbox", "English"), code: "en" }) + append({ text: catalog.i18nc("@item:inlistbox", "Finnish"), code: "fi" }) + append({ text: catalog.i18nc("@item:inlistbox", "French"), code: "fr" }) + append({ text: catalog.i18nc("@item:inlistbox", "German"), code: "de" }) +// append({ text: catalog.i18nc("@item:inlistbox", "Italian"), code: "it" }) + append({ text: catalog.i18nc("@item:inlistbox", "Polish"), code: "pl" }) +// append({ text: catalog.i18nc("@item:inlistbox", "Russian"), code: "ru" }) +// append({ text: catalog.i18nc("@item:inlistbox", "Spanish"), code: "es" }) } } - } - onActivated: UM.Preferences.setValue("general/language", model.get(index).code) - anchors.left: languageLabel.right - anchors.top: languageLabel.top - anchors.leftMargin: 20 - - Component.onCompleted: - { - // Because ListModel is stupid and does not allow using qsTr() for values. - for(var i = 0; i < languageList.count; ++i) + currentIndex: { - languageList.setProperty(i, "text", catalog.i18n(languageList.get(i).text)); + var code = UM.Preferences.getValue("general/language"); + for(var i = 0; i < languageList.count; ++i) + { + if(model.get(i).code == code) + { + return i + } + } } + onActivated: UM.Preferences.setValue("general/language", model.get(index).code) - // Glorious hack time. ComboBox does not update the text properly after changing the - // model. So change the indices around to force it to update. - currentIndex += 1; - currentIndex -= 1; + Component.onCompleted: + { + // Because ListModel is stupid and does not allow using qsTr() for values. + for(var i = 0; i < languageList.count; ++i) + { + languageList.setProperty(i, "text", catalog.i18n(languageList.get(i).text)); + } + + // Glorious hack time. ComboBox does not update the text properly after changing the + // model. So change the indices around to force it to update. + currentIndex += 1; + currentIndex -= 1; + } } } Label { - id: languageCaption; - Layout.columnSpan: 2 + id: languageCaption //: Language change warning text: catalog.i18nc("@label", "You will need to restart the application for language changes to have effect.") @@ -113,103 +111,46 @@ UM.PreferencesPage font.italic: true } - CheckBox - { - id: pushFreeCheckbox - checked: boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) - onCheckedChanged: UM.Preferences.setValue("physics/automatic_push_free", checked) - } - Button - { - id: pushFreeText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox + UM.TooltipArea { + width: childrenRect.width + height: childrenRect.height + text: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect.") - //: Display Overhang preference checkbox - text: catalog.i18nc("@option:check", "Ensure objects are kept apart"); - onClicked: pushFreeCheckbox.checked = !pushFreeCheckbox.checked - - //: Display Overhang preference tooltip - tooltip: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect.") - - style: ButtonStyle + CheckBox { - background: Rectangle - { - border.width: 0 - color: "transparent" - } - label: Text - { - renderType: Text.NativeRendering - horizontalAlignment: Text.AlignLeft - text: control.text - } + id: pushFreeCheckbox + text: catalog.i18nc("@option:check", "Ensure objects are kept apart") + checked: boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) + onCheckedChanged: UM.Preferences.setValue("physics/automatic_push_free", checked) } } - CheckBox - { - id: sendDataCheckbox - checked: boolCheck(UM.Preferences.getValue("info/send_slice_info")) - onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked) - } - Button - { - id: sendDataText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox + UM.TooltipArea { + width: childrenRect.width + height: childrenRect.height + text: catalog.i18nc("@info:tooltip","Should opened files be scaled to the build volume if they are too large?") - //: Display Overhang preference checkbox - text: catalog.i18nc("@option:check","Send (Anonymous) Print Information"); - onClicked: sendDataCheckbox.checked = !sendDataCheckbox.checked - - //: Display Overhang preference tooltip - tooltip: catalog.i18nc("@info:tooltip","Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.") - - style: ButtonStyle + CheckBox { - background: Rectangle - { - border.width: 0 - color: "transparent" - } - label: Text - { - renderType: Text.NativeRendering - horizontalAlignment: Text.AlignLeft - text: control.text - } + id: scaleToFitCheckbox + text: catalog.i18nc("@option:check","Scale large files") + checked: boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) + onCheckedChanged: UM.Preferences.setValue("mesh/scale_to_fit", checked) } } - CheckBox - { - id: scaleToFitCheckbox - checked: boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) - onCheckedChanged: UM.Preferences.setValue("mesh/scale_to_fit", checked) - } - Button - { - id: scaleToFitText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox - //: Display Overhang preference checkbox - text: catalog.i18nc("@option:check","Scale Too Large Files"); - onClicked: scaleToFitCheckbox.checked = !scaleToFitCheckbox.checked + UM.TooltipArea { + width: childrenRect.width + height: childrenRect.height + text: catalog.i18nc("@info:tooltip","Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.") - //: Display Overhang preference tooltip - tooltip: catalog.i18nc("@info:tooltip","Should opened files be scaled to the build volume when they are too large?") - - style: ButtonStyle + CheckBox { - background: Rectangle - { - border.width: 0 - color: "transparent" - } - label: Text - { - renderType: Text.NativeRendering - horizontalAlignment: Text.AlignLeft - text: control.text - } + id: sendDataCheckbox + text: catalog.i18nc("@option:check","Send (anonymous) print information") + checked: boolCheck(UM.Preferences.getValue("info/send_slice_info")) + onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked) } } - Item { Layout.fillHeight: true; Layout.columnSpan: 2 } } } diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index b8a73c31cf..56fae1b0b8 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -69,38 +69,84 @@ Rectangle { } } - - TextField { - id: printJobTextfield + Rectangle + { + id: jobNameRow + anchors.top: parent.top 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 + + Item + { + width: parent.width + height: parent.height + + Button + { + id: printJobPencilIcon + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + width: UM.Theme.sizes.save_button_specs_icons.width + height: UM.Theme.sizes.save_button_specs_icons.height + + onClicked: + { + printJobTextfield.selectAll() + printJobTextfield.focus = true + } + style: ButtonStyle + { + background: Rectangle + { + color: "transparent" + UM.RecolorImage + { + 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: control.hovered ? UM.Theme.colors.setting_control_button_hover : UM.Theme.colors.text + source: UM.Theme.icons.pencil; + } + } + } } - } - validator: RegExpValidator { - regExp: /^[^\\ \/ \.]*$/ - } - style: TextFieldStyle{ - textColor: UM.Theme.colors.setting_control_text; - font: UM.Theme.fonts.default; - background: Rectangle { - opacity: 0 - border.width: 0 + + TextField + { + id: printJobTextfield + anchors.right: printJobPencilIcon.left + anchors.rightMargin: UM.Theme.sizes.default_margin.width/2 + height: UM.Theme.sizes.jobspecs_line.height + width: base.width + property int unremovableSpacing: 5 + text: '' + horizontalAlignment: TextInput.AlignRight + 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_bold; + background: Rectangle { + opacity: 0 + border.width: 0 + } + } } } } Label{ id: boundingSpec - anchors.top: printJobTextfield.bottom + anchors.top: jobNameRow.bottom anchors.right: parent.right height: UM.Theme.sizes.jobspecs_line.height verticalAlignment: Text.AlignVCenter diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml index 5c6b299054..3757d64773 100644 --- a/resources/qml/ProfileSetup.qml +++ b/resources/qml/ProfileSetup.qml @@ -14,62 +14,9 @@ Item{ property int totalHeightProfileSetup: childrenRect.height property Action manageProfilesAction - Rectangle { - id: variantRow - anchors.top: base.top - width: base.width - height: UM.Theme.sizes.sidebar_setup.height - //visible: UM.MachineManager.hasVariants; - visible: true - - Label{ - id: variantLabel - text: catalog.i18nc("@label","Variant:"); - 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; - } - - ToolButton { - id: variantSelection - text: UM.MachineManager.activeMachineVariant - width: parent.width/100*55 - height: UM.Theme.sizes.setting_control.height - tooltip: UM.MachineManager.activeMachineInstance; - anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width - anchors.verticalCenter: parent.verticalCenter - style: UM.Theme.styles.sidebar_header_button - - menu: Menu - { - id: variantsSelectionMenu - Instantiator - { - model: UM.MachineVariantsModel { id: variantsModel } - MenuItem - { - text: model.name; - checkable: true; - checked: model.active; - exclusiveGroup: variantSelectionMenuGroup; - onTriggered: UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name) - } - onObjectAdded: variantsSelectionMenu.insertItem(index, object) - onObjectRemoved: variantsSelectionMenu.removeItem(object) - } - - ExclusiveGroup { id: variantSelectionMenuGroup; } - } - } - } - Rectangle{ - id: globalProfileRow; - anchors.top: UM.MachineManager.hasVariants ? variantRow.bottom : base.top - //anchors.top: variantRow.bottom + id: globalProfileRow + anchors.top: base.top height: UM.Theme.sizes.sidebar_setup.height width: base.width @@ -78,7 +25,7 @@ Item{ anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.default_margin.width; anchors.verticalCenter: parent.verticalCenter - text: catalog.i18nc("@label","Global Profile:"); + text: catalog.i18nc("@label","Profile:"); width: parent.width/100*45 font: UM.Theme.fonts.default; color: UM.Theme.colors.text; diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index c20aa905fc..903b92d03e 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -74,7 +74,7 @@ Rectangle { 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 + 3 + x: base.width - saveToButton.resizedWidth - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.save_button_save_to_button.height + UM.Theme.sizes.save_button_save_to_button.width tooltip: UM.OutputDeviceManager.activeDeviceDescription; enabled: base.progress > 0.99 && base.activity == true height: UM.Theme.sizes.save_button_save_to_button.height @@ -90,6 +90,7 @@ Rectangle { background: Rectangle { //opacity: control.enabled ? 1.0 : 0.5 //Behavior on opacity { NumberAnimation { duration: 50; } } + border.width: UM.Theme.sizes.default_lining.width 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 @@ -130,6 +131,7 @@ Rectangle { style: ButtonStyle { background: Rectangle { id: deviceSelectionIcon + border.width: UM.Theme.sizes.default_lining.width 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 diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 570dc8e5fe..60549117f5 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -120,6 +120,7 @@ Rectangle style: ButtonStyle { background: Rectangle { + border.width: UM.Theme.sizes.default_lining.width 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 diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 38d129c6bb..f422573bb2 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -17,7 +17,7 @@ Item property int totalHeightHeader: childrenRect.height Rectangle { - id: settingsModeRow + id: sidebarTabRow width: base.width height: 0 anchors.top: parent.top @@ -29,7 +29,7 @@ Item text: catalog.i18nc("@label:listbox","Print Job"); anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.default_margin.width; - anchors.top: settingsModeRow.bottom + anchors.top: sidebarTabRow.bottom anchors.topMargin: UM.Theme.sizes.default_margin.height width: parent.width/100*45 font: UM.Theme.fonts.large; @@ -47,7 +47,7 @@ Item Label{ id: machineSelectionLabel //: Machine selection label - text: catalog.i18nc("@label:listbox","Machine:"); + text: catalog.i18nc("@label:listbox","Printer:"); anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.default_margin.width anchors.verticalCenter: parent.verticalCenter @@ -93,4 +93,57 @@ Item } } } + + Rectangle { + id: variantRow + anchors.top: machineSelectionRow.bottom + anchors.topMargin: UM.MachineManager.hasVariants ? UM.Theme.sizes.default_margin.height : 0 + width: base.width + height: UM.MachineManager.hasVariants ? UM.Theme.sizes.sidebar_setup.height : 0 + visible: UM.MachineManager.hasVariants + + Label{ + id: variantLabel + text: catalog.i18nc("@label","Nozzle:"); + 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; + } + + ToolButton { + id: variantSelection + text: UM.MachineManager.activeMachineVariant + width: parent.width/100*55 + height: UM.Theme.sizes.setting_control.height + tooltip: UM.MachineManager.activeMachineVariant; + anchors.right: parent.right + anchors.rightMargin: UM.Theme.sizes.default_margin.width + anchors.verticalCenter: parent.verticalCenter + style: UM.Theme.styles.sidebar_header_button + + menu: Menu + { + id: variantsSelectionMenu + Instantiator + { + model: UM.MachineVariantsModel { id: variantsModel } + MenuItem + { + text: model.name; + checkable: true; + checked: model.active; + exclusiveGroup: variantSelectionMenuGroup; + onTriggered: UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name) + } + onObjectAdded: variantsSelectionMenu.insertItem(index, object) + onObjectRemoved: variantsSelectionMenu.removeItem(object) + } + + ExclusiveGroup { id: variantSelectionMenuGroup; } + } + } + } } diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 7ed23c3af5..e88c43f958 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -127,7 +127,7 @@ Item anchors.top: parent.top anchors.left: parent.left 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 + height: childrenRect.height Label{ id: infillLabel @@ -140,17 +140,6 @@ Item anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.default_margin.width } -/* Label{ - id: infillCaption - 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_subtext - anchors.top: infillLabel.bottom - anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width - } */ } Flow { @@ -162,7 +151,6 @@ Item anchors.left: infillCellLeft.right anchors.top: infillCellLeft.top - anchors.topMargin: UM.Theme.sizes.default_margin.height Repeater { id: infillListView @@ -335,7 +323,7 @@ Item property bool hovered_ex: false anchors.top: brimCheckBox.bottom - anchors.topMargin: UM.Theme.sizes.default_lining.height + anchors.topMargin: UM.Theme.sizes.default_margin.height anchors.left: parent.left //: Setting enable support checkbox diff --git a/resources/qml/ViewPage.qml b/resources/qml/ViewPage.qml index 7b33345a9a..ee0c74904a 100644 --- a/resources/qml/ViewPage.qml +++ b/resources/qml/ViewPage.qml @@ -39,7 +39,7 @@ UM.PreferencesPage checked: boolCheck(UM.Preferences.getValue("view/show_overhang")) onClicked: UM.Preferences.setValue("view/show_overhang", checked) - text: catalog.i18nc("@option:check","Display Overhang"); + text: catalog.i18nc("@option:check","Display overhang"); } } diff --git a/resources/qml/WizardPages/AddMachine.qml b/resources/qml/WizardPages/AddMachine.qml index 745b91edb6..524b4c30de 100644 --- a/resources/qml/WizardPages/AddMachine.qml +++ b/resources/qml/WizardPages/AddMachine.qml @@ -129,30 +129,31 @@ Item section.property: "manufacturer" section.delegate: Button { - text: section + " " + text: section style: ButtonStyle { background: Rectangle { - id: manufacturerBackground - opacity: 0.3 border.width: 0 - color: control.hovered ? palette.light : "transparent"; + color: "transparent"; height: UM.Theme.sizes.standard_list_lineheight.height + width: machineList.width } label: Text { - horizontalAlignment: Text.AlignLeft + anchors.left: parent.left + anchors.leftMargin: UM.Theme.sizes.standard_arrow.width + UM.Theme.sizes.default_margin.width text: control.text color: palette.windowText font.bold: true UM.RecolorImage { id: downArrow anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.right + anchors.right: parent.left + anchors.rightMargin: UM.Theme.sizes.default_margin.width width: UM.Theme.sizes.standard_arrow.width height: UM.Theme.sizes.standard_arrow.height sourceSize.width: width sourceSize.height: width color: palette.windowText - source: base,activeManufacturer == section ? UM.Theme.icons.arrow_bottom : UM.Theme.icons.arrow_right + source: base.activeManufacturer == section ? UM.Theme.icons.arrow_bottom : UM.Theme.icons.arrow_right } } } @@ -184,18 +185,6 @@ Item machineName.text = getMachineName() } - Label - { - id: author - text: model.author - font: UM.Theme.fonts.very_small - anchors.left: machineButton.right - anchors.leftMargin: UM.Theme.sizes.standard_list_lineheight.height/2 - anchors.baseline: machineButton.baseline - anchors.baselineOffset: -UM.Theme.sizes.standard_list_lineheight.height / 16 - color: palette.mid - } - states: State { name: "collapsed"; when: base.activeManufacturer != model.manufacturer; diff --git a/resources/themes/cura/icons/pencil.svg b/resources/themes/cura/icons/pencil.svg new file mode 100644 index 0000000000..cdeb265ad7 --- /dev/null +++ b/resources/themes/cura/icons/pencil.svg @@ -0,0 +1,16 @@ + + + + + + image/svg+xml + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index b64ba24874..f4937716af 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -12,7 +12,7 @@ QtObject { ButtonStyle { background: Rectangle { color: UM.Theme.colors.setting_control - border.width: 1 + 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 UM.RecolorImage { id: downArrow @@ -331,7 +331,8 @@ QtObject { width: UM.Theme.sizes.section_icon_column.width UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter + anchors.left: parent.left + anchors.leftMargin: UM.Theme.sizes.default_margin.width color: UM.Theme.colors.setting_category_text source: control.iconSource; width: UM.Theme.sizes.section_icon.width; @@ -344,6 +345,7 @@ QtObject { Label { anchors { left: icon.right; + leftMargin: UM.Theme.sizes.default_lining.width; right: parent.right; verticalCenter: parent.verticalCenter; } @@ -493,7 +495,7 @@ QtObject { radius: width/2; color: UM.Theme.colors.slider_groove; - border.width: UM.Theme.sizes.default_lining; + border.width: UM.Theme.sizes.default_lining.width; border.color: UM.Theme.colors.slider_groove_border; Rectangle { anchors { @@ -515,26 +517,24 @@ QtObject { TextField { id: valueLabel property string maxValue: control.maximumValue + 1 - placeholderText: control.value + 1 + text: control.value + 1 + horizontalAlignment: TextInput.AlignHCenter onEditingFinished: { if (valueLabel.text != ''){ control.value = valueLabel.text - 1 - valueLabel.text = '' - valueLabel.focus = false } - } validator: IntValidator {bottom: 1; top: control.maximumValue + 1;} visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false anchors.top: layerSliderControl.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.width + anchors.topMargin: width/2 - UM.Theme.sizes.default_margin.width/2 anchors.horizontalCenter: layerSliderControl.horizontalCenter rotation: 90 style: TextFieldStyle{ textColor: UM.Theme.colors.setting_control_text; font: UM.Theme.fonts.default; background: Rectangle { - implicitWidth: control.maxValue.length * valueLabel.font.pixelSize + implicitWidth: control.maxValue.length * valueLabel.font.pixelSize + UM.Theme.sizes.default_margin.width 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; diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 1f99c51270..6435b9a4a2 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -9,6 +9,11 @@ "size": 1.15, "family": "Proxima Nova Rg" }, + "default_bold": { + "size": 1.15, + "bold": true, + "family": "Proxima Nova Rg" + }, "small": { "size": 1.0, "family": "Proxima Nova Rg" @@ -59,7 +64,7 @@ "text": [24, 41, 77, 255], "text_inactive": [174, 174, 174, 255], - "text_hover": [35, 35, 35, 255], + "text_hover": [70, 84, 113, 255], "text_pressed": [12, 169, 227, 255], "text_white": [255, 255, 255, 255], "text_subtext": [127, 127, 127, 255], @@ -104,24 +109,24 @@ "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], + "action_button_disabled_border": [245, 245, 245, 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": [255, 255, 255, 255], + "setting_category": [245, 245, 245, 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": [245, 245, 245, 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_border": [245, 245, 245, 255], + "setting_category_disabled_border": [245, 245, 245, 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_category_active_hover_border": [12, 159, 227, 255], "setting_control": [255, 255, 255, 255], "setting_control_selected": [24, 41, 77, 255], @@ -130,7 +135,8 @@ "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_control_button": [127, 127, 127, 255], + "setting_control_button_hover": [70, 84, 113, 255], "setting_unit": [127, 127, 127, 255], "setting_validation_error": [255, 57, 14, 255], "setting_validation_warning": [255, 186, 15, 255], @@ -231,7 +237,7 @@ "save_button_save_to_button": [0.3, 2.7], "save_button_specs_icons": [1.4, 1.4], - "modal_window_minimum": [30.0, 30.0], + "modal_window_minimum": [40.0, 30.0], "wizard_progress": [10.0, 0.0], "message": [30.0, 5.0],