mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Merge pull request #571 from Ultimaker/feature_ux2-1_update
Updated Design rework for 2.1 release
This commit is contained in:
commit
9544602df5
18 changed files with 276 additions and 280 deletions
|
@ -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)
|
||||
|
|
|
@ -18,7 +18,8 @@ def getMetaData():
|
|||
},
|
||||
"view": {
|
||||
"name": catalog.i18nc("@item:inlistbox", "Layers"),
|
||||
"view_panel": "LayerView.qml"
|
||||
"view_panel": "LayerView.qml",
|
||||
"weight": 2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
16
resources/themes/cura/icons/pencil.svg
Normal file
16
resources/themes/cura/icons/pencil.svg
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="0 -256 1792 1792" id="svg3001" version="1.1" inkscape:version="0.48.3.1 r9886" width="100%" height="100%" sodipodi:docname="pencil_font_awesome.svg">
|
||||
<metadata id="metadata3011">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs id="defs3009"/>
|
||||
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" id="namedview3007" showgrid="false" inkscape:zoom="0.13169643" inkscape:cx="896" inkscape:cy="896" inkscape:window-x="0" inkscape:window-y="25" inkscape:window-maximized="0" inkscape:current-layer="svg3001"/>
|
||||
<g transform="matrix(1,0,0,-1,121.49153,1270.2373)" id="g3003">
|
||||
<path d="M 363,0 454,91 219,326 128,235 V 128 H 256 V 0 h 107 z m 523,928 q 0,22 -22,22 -10,0 -17,-7 L 305,401 q -7,-7 -7,-17 0,-22 22,-22 10,0 17,7 l 542,542 q 7,7 7,17 z M 832,1120 1248,704 416,-128 H 0 v 416 z m 683,-96 q 0,-53 -37,-90 l -166,-166 -416,416 166,165 q 36,38 90,38 53,0 91,-38 l 235,-234 q 37,-39 37,-91 z" id="path3005" inkscape:connector-curvature="0" style="fill:currentColor"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -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;
|
||||
|
|
|
@ -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],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue