diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 18d089946c..dc8131ce42 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -48,7 +48,7 @@ Rectangle { } } } - //printJobTextfield.text = abbrMachine + '_' + base.fileBaseName + printJobTextfield.text = abbrMachine + '_' + base.fileBaseName } Connections { @@ -62,49 +62,47 @@ Rectangle { Rectangle{ id: printJobRow implicitWidth: base.width; - //implicitHeight: UM.Theme.sizes.sidebar_header.height /////////////remove this TODO - implicitHeight: 1 + implicitHeight: UM.Theme.sizes.sidebar_header.height anchors.top: parent.top - //color: UM.Theme.colors.sidebar_header_bar - color: UM.Theme.colors.setting_control_border -// Label{ -// id: printJobTextfieldLabel -// text: catalog.i18nc("@label","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: '' -// 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; -// } -// } -// } + 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: '' + 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; + } + } + } } Rectangle { @@ -138,7 +136,7 @@ Rectangle { 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) ? "" : catalog.i18nc("@label h:m (hours:minutes) is added to the expected printtime (%1)", "%1 h:m").arg(base.printDuration.getDisplayString(UM.DurationFormat.Short)) + text: (!base.printDuration || !base.printDuration.valid) ? "" : catalog.i18nc("@label h:m (abbreviation for hours:minutes) is added to the expected printtime (%1)", "%1 h:m").arg(base.printDuration.getDisplayString(UM.DurationFormat.Short)) } } Item{ @@ -165,7 +163,7 @@ Rectangle { 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 m").arg(base.printMaterialAmount) + text: base.printMaterialAmount <= 0 ? "" : catalog.i18nc("@label m (abbreviation for meters) is added to the expected length of filament (%1) ","%1 m").arg(base.printMaterialAmount) } } }