mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 06:03:57 -06:00
re-implements the safebutton -> filename -> textfield
Not yet fully functional but re-implemented for stringfreeze Contributes to: issue CURA-125
This commit is contained in:
parent
032b6e4000
commit
ae2a07ca06
1 changed files with 43 additions and 45 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue