mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 08:17:49 -06:00
Replace textField in JobSpecs
CURA-8685
This commit is contained in:
parent
77b46868a6
commit
b45b3faa3c
2 changed files with 12 additions and 20 deletions
|
@ -18,6 +18,8 @@ UM.Dialog
|
|||
width: minimumWidth
|
||||
height: minimumHeight
|
||||
|
||||
|
||||
|
||||
GridLayout
|
||||
{
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// Copyright (c) 2021 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.5 as UM
|
||||
|
@ -29,7 +28,8 @@ Item
|
|||
{
|
||||
if (!activity)
|
||||
{
|
||||
//When there is no mesh in the buildplate; the printJobTextField is set to an empty string so it doesn't set an empty string as a jobName (which is later used for saving the file)
|
||||
// When there is no mesh in the buildplate; the printJobTextField is set to an empty string so it doesn't
|
||||
// set an empty string as a jobName (which is later used for saving the file)
|
||||
PrintInformation.baseName = ""
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ Item
|
|||
height: UM.Theme.getSize("jobspecs_line").height
|
||||
width: Math.max(__contentWidth + UM.Theme.getSize("default_margin").width, 50)
|
||||
maximumLength: 120
|
||||
text: (PrintInformation === null) ? "" : PrintInformation.jobName
|
||||
text: PrintInformation === null ? "" : PrintInformation.jobName
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
|
||||
property string textBeforeEdit: ""
|
||||
|
@ -91,17 +91,10 @@ Item
|
|||
validator: RegExpValidator {
|
||||
regExp: /^[^\\\/\*\?\|\[\]]*$/
|
||||
}
|
||||
|
||||
style: TextFieldStyle
|
||||
{
|
||||
textColor: UM.Theme.getColor("text_scene")
|
||||
font: UM.Theme.getFont("default")
|
||||
background: Rectangle
|
||||
{
|
||||
opacity: 0
|
||||
border.width: 0
|
||||
}
|
||||
}
|
||||
color: UM.Theme.getColor("text_scene")
|
||||
background: Item {}
|
||||
selectByMouse: true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,10 +118,7 @@ Item
|
|||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
base.addAdditionalComponents("jobSpecsButton")
|
||||
}
|
||||
Component.onCompleted: base.addAdditionalComponents("jobSpecsButton")
|
||||
|
||||
Connections
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue