mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 12:05:54 +08:00
Add pencil-mark to print job name in JobSpecs area
This commit is contained in:
parent
f6ccbab9dc
commit
ed0fea125c
@ -69,17 +69,61 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle
|
||||||
TextField {
|
{
|
||||||
id: printJobTextfield
|
id: jobNameRow
|
||||||
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: UM.Theme.sizes.jobspecs_line.height
|
height: UM.Theme.sizes.jobspecs_line.height
|
||||||
|
visible: base.activity
|
||||||
|
|
||||||
|
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: UM.Theme.colors.setting_control_text
|
||||||
|
source: UM.Theme.icons.pencil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
width: base.width
|
||||||
property int unremovableSpacing: 5
|
property int unremovableSpacing: 5
|
||||||
text: ''
|
text: ''
|
||||||
horizontalAlignment: TextInput.AlignRight
|
horizontalAlignment: TextInput.AlignRight
|
||||||
onTextChanged: Printer.setJobName(text)
|
onTextChanged: Printer.setJobName(text)
|
||||||
visible: base.activity
|
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
if (printJobTextfield.text != ''){
|
if (printJobTextfield.text != ''){
|
||||||
printJobTextfield.focus = false
|
printJobTextfield.focus = false
|
||||||
@ -90,17 +134,19 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
style: TextFieldStyle{
|
style: TextFieldStyle{
|
||||||
textColor: UM.Theme.colors.setting_control_text;
|
textColor: UM.Theme.colors.setting_control_text;
|
||||||
font: UM.Theme.fonts.default;
|
font: UM.Theme.fonts.default_bold;
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
opacity: 0
|
opacity: 0
|
||||||
border.width: 0
|
border.width: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Label{
|
Label{
|
||||||
id: boundingSpec
|
id: boundingSpec
|
||||||
anchors.top: printJobTextfield.bottom
|
anchors.top: jobNameRow.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: UM.Theme.sizes.jobspecs_line.height
|
height: UM.Theme.sizes.jobspecs_line.height
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
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 |
@ -9,6 +9,11 @@
|
|||||||
"size": 1.15,
|
"size": 1.15,
|
||||||
"family": "Proxima Nova Rg"
|
"family": "Proxima Nova Rg"
|
||||||
},
|
},
|
||||||
|
"default_bold": {
|
||||||
|
"size": 1.15,
|
||||||
|
"bold": true,
|
||||||
|
"family": "Proxima Nova Rg"
|
||||||
|
},
|
||||||
"small": {
|
"small": {
|
||||||
"size": 1.0,
|
"size": 1.0,
|
||||||
"family": "Proxima Nova Rg"
|
"family": "Proxima Nova Rg"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user