mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Merge pull request #11535 from Ultimaker/CURA-8688_qt6_cleanup
[CURA-8688] QT6 cleanup
This commit is contained in:
commit
901dc55733
63 changed files with 1109 additions and 855 deletions
|
@ -6,7 +6,7 @@ import QtQuick.Controls 2.3
|
|||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
import UM 1.1 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
UM.Dialog
|
||||
|
@ -19,9 +19,7 @@ UM.Dialog
|
|||
width: minimumWidth
|
||||
height: Math.max(dialogSummaryItem.height + 2 * buttonsItem.height, minimumHeight) // 2 * button height to also have some extra space around the button relative to the button size
|
||||
|
||||
property int comboboxHeight: 15 * screenScaleFactor
|
||||
property int spacerHeight: 10 * screenScaleFactor
|
||||
property int doubleSpacerHeight: 20 * screenScaleFactor
|
||||
property int comboboxHeight: UM.Theme.getSize("default_margin").height
|
||||
|
||||
onClosing: manager.notifyClosed()
|
||||
onVisibleChanged:
|
||||
|
@ -46,10 +44,6 @@ UM.Dialog
|
|||
id: catalog
|
||||
name: "cura"
|
||||
}
|
||||
SystemPalette
|
||||
{
|
||||
id: palette
|
||||
}
|
||||
|
||||
ListModel
|
||||
{
|
||||
|
@ -68,45 +62,39 @@ UM.Dialog
|
|||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
spacing: 2 * screenScaleFactor
|
||||
Label
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
Column
|
||||
{
|
||||
id: titleLabel
|
||||
text: catalog.i18nc("@action:title", "Summary - Cura Project")
|
||||
font.pointSize: 18
|
||||
}
|
||||
Rectangle
|
||||
{
|
||||
id: separator
|
||||
color: palette.text
|
||||
width: parent.width
|
||||
height: 1
|
||||
}
|
||||
Item // Spacer
|
||||
{
|
||||
height: doubleSpacerHeight
|
||||
width: height
|
||||
height: cildrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
id: titleLabel
|
||||
text: catalog.i18nc("@action:title", "Summary - Cura Project")
|
||||
font: UM.Theme.getFont("large")
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: separator
|
||||
color: UM.Theme.getColor("text")
|
||||
width: parent.width
|
||||
height: UM.Theme.getSize("default_lining").height
|
||||
}
|
||||
}
|
||||
|
||||
Row
|
||||
Item
|
||||
{
|
||||
height: childrenRect.height
|
||||
width: parent.width
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Printer settings")
|
||||
font.bold: true
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Item
|
||||
{
|
||||
// spacer
|
||||
height: spacerHeight
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
height: childrenRect.height
|
||||
|
||||
UM.TooltipArea
|
||||
{
|
||||
id: machineResolveStrategyTooltip
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
width: (parent.width / 3) | 0
|
||||
height: visible ? comboboxHeight : 0
|
||||
visible: base.visible && machineResolveComboBox.model.count > 1
|
||||
|
@ -157,64 +145,65 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
|
||||
Column
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Type")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: manager.machineType
|
||||
width: (parent.width / 3) | 0
|
||||
width: parent.width
|
||||
height: cildrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
id: printer_settings_label
|
||||
text: catalog.i18nc("@action:label", "Printer settings")
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Type")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
text: manager.machineType
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", manager.isPrinterGroup ? "Printer Group" : "Printer Name")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
text: manager.machineName
|
||||
width: (parent.width / 3) | 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row
|
||||
Item
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", manager.isPrinterGroup ? "Printer Group" : "Printer Name")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: manager.machineName
|
||||
width: (parent.width / 3) | 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
|
||||
Item // Spacer
|
||||
{
|
||||
height: doubleSpacerHeight
|
||||
width: height
|
||||
}
|
||||
Row
|
||||
{
|
||||
height: childrenRect.height
|
||||
width: parent.width
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Profile settings")
|
||||
font.bold: true
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Item
|
||||
{
|
||||
// spacer
|
||||
height: spacerHeight
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
UM.TooltipArea
|
||||
{
|
||||
id: qualityChangesResolveTooltip
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: (parent.width / 3) | 0
|
||||
height: visible ? comboboxHeight : 0
|
||||
visible: manager.qualityChangesConflict
|
||||
|
@ -232,96 +221,105 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
width: parent.width
|
||||
height: cildrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Profile settings")
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Name")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
text: manager.qualityName
|
||||
width: (parent.width / 3) | 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Intent")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
text: manager.intentName
|
||||
width: (parent.width / 3) | 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Not in profile")
|
||||
visible: manager.numUserSettings != 0
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings)
|
||||
visible: manager.numUserSettings != 0
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Derivative from")
|
||||
visible: manager.numSettingsOverridenByQualityChanges != 0
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18ncp("@action:label", "%1, %2 override", "%1, %2 overrides", manager.numSettingsOverridenByQualityChanges).arg(manager.qualityType).arg(manager.numSettingsOverridenByQualityChanges)
|
||||
width: (parent.width / 3) | 0
|
||||
visible: manager.numSettingsOverridenByQualityChanges != 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Row
|
||||
|
||||
Item
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Name")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: manager.qualityName
|
||||
width: (parent.width / 3) | 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Intent")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: manager.intentName
|
||||
width: (parent.width / 3) | 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: manager.numUserSettings != 0 ? childrenRect.height : 0
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Not in profile")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings)
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
visible: manager.numUserSettings != 0
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: manager.numSettingsOverridenByQualityChanges != 0 ? childrenRect.height : 0
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Derivative from")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: catalog.i18ncp("@action:label", "%1, %2 override", "%1, %2 overrides", manager.numSettingsOverridenByQualityChanges).arg(manager.qualityType).arg(manager.numSettingsOverridenByQualityChanges)
|
||||
width: (parent.width / 3) | 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
visible: manager.numSettingsOverridenByQualityChanges != 0
|
||||
}
|
||||
Item // Spacer
|
||||
{
|
||||
height: doubleSpacerHeight
|
||||
width: height
|
||||
}
|
||||
Row
|
||||
{
|
||||
height: childrenRect.height
|
||||
width: parent.width
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Material settings")
|
||||
font.bold: true
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Item
|
||||
{
|
||||
// spacer
|
||||
height: spacerHeight
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
|
||||
UM.TooltipArea
|
||||
{
|
||||
id: materialResolveTooltip
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: (parent.width / 3) | 0
|
||||
height: visible ? comboboxHeight : 0
|
||||
visible: manager.materialConflict
|
||||
|
@ -339,76 +337,91 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
width: parent.width
|
||||
height: cildrenRect.height
|
||||
Row
|
||||
{
|
||||
height: childrenRect.height
|
||||
width: parent.width
|
||||
spacing: UM.Theme.getSize("narrow_margin").width
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Material settings")
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
}
|
||||
|
||||
Repeater
|
||||
{
|
||||
model: manager.materialLabels
|
||||
delegate: Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Name")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
text: modelData
|
||||
width: (parent.width / 3) | 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Repeater
|
||||
Column
|
||||
{
|
||||
model: manager.materialLabels
|
||||
delegate: Row
|
||||
width: parent.width
|
||||
height: cildrenRect.height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Setting visibility")
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Name")
|
||||
text: catalog.i18nc("@action:label", "Mode")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: modelData
|
||||
text: manager.activeMode
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
visible: manager.hasVisibleSettingsField
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Visible settings:")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings)
|
||||
width: (parent.width / 3) | 0
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item // Spacer
|
||||
{
|
||||
height: doubleSpacerHeight
|
||||
width: height
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Setting visibility")
|
||||
font.bold: true
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Mode")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: manager.activeMode
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
visible: manager.hasVisibleSettingsField
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Visible settings:")
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings)
|
||||
width: (parent.width / 3) | 0
|
||||
}
|
||||
}
|
||||
Item // Spacer
|
||||
{
|
||||
height: spacerHeight
|
||||
width: height
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
|
@ -418,12 +431,10 @@ UM.Dialog
|
|||
{
|
||||
width: warningLabel.height
|
||||
height: width
|
||||
|
||||
source: UM.Theme.getIcon("Information")
|
||||
color: palette.text
|
||||
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: warningLabel
|
||||
text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.")
|
||||
|
@ -432,44 +443,22 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
}
|
||||
Item
|
||||
{
|
||||
id: buttonsItem
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
Button
|
||||
|
||||
buttonSpacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
rightButtons: [
|
||||
Cura.TertiaryButton
|
||||
{
|
||||
id: cancel_button
|
||||
text: catalog.i18nc("@action:button","Cancel");
|
||||
onClicked: { manager.onCancelButtonClicked() }
|
||||
enabled: true
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: ok_button.left
|
||||
anchors.rightMargin: 2 * screenScaleFactor
|
||||
}
|
||||
Button
|
||||
text: catalog.i18nc("@action:button", "Cancel")
|
||||
onClicked: reject()
|
||||
},
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: ok_button
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: catalog.i18nc("@action:button","Open");
|
||||
onClicked: { manager.closeBackend(); manager.onOkButtonClicked() }
|
||||
text: catalog.i18nc("@action:button", "Open")
|
||||
onClicked: accept()
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
function accept() {
|
||||
manager.closeBackend();
|
||||
manager.onOkButtonClicked();
|
||||
base.visible = false;
|
||||
base.accept();
|
||||
}
|
||||
|
||||
function reject() {
|
||||
manager.onCancelButtonClicked();
|
||||
base.visible = false;
|
||||
base.rejected();
|
||||
}
|
||||
onRejected: manager.onCancelButtonClicked()
|
||||
onAccepted: manager.onOkButtonClicked()
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ Item
|
|||
anchors.top: dataRow.bottom
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: confirmDeleteDialog
|
||||
title: catalog.i18nc("@dialog:title", "Delete Backup")
|
||||
|
@ -96,7 +96,7 @@ Item
|
|||
onAccepted: CuraDrive.deleteBackup(modelData.backup_id)
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: confirmRestoreDialog
|
||||
title: catalog.i18nc("@dialog:title", "Restore Backup")
|
||||
|
|
|
@ -35,7 +35,8 @@ Item
|
|||
model: columnHeaders
|
||||
Rectangle
|
||||
{
|
||||
width: Math.max(1, Math.round(tableBase.width / headerRepeater.count))
|
||||
//minimumWidth: Math.max(1, Math.round(tableBase.width / headerRepeater.count))
|
||||
width: 300
|
||||
height: UM.Theme.getSize("section").height
|
||||
|
||||
color: UM.Theme.getColor("secondary")
|
||||
|
|
|
@ -49,7 +49,7 @@ Cura.MachineAction
|
|||
width: childrenRect.width
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
property string firmwareName: Cura.MachineManager.activeMachine.getDefaultFirmwareName()
|
||||
Button
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: autoUpgradeButton
|
||||
text: catalog.i18nc("@action:button", "Automatically upgrade Firmware")
|
||||
|
@ -60,7 +60,7 @@ Cura.MachineAction
|
|||
activeOutputDevice.updateFirmware(parent.firmwareName);
|
||||
}
|
||||
}
|
||||
Button
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: manualUpgradeButton
|
||||
text: catalog.i18nc("@action:button", "Upload custom Firmware")
|
||||
|
@ -173,7 +173,7 @@ Cura.MachineAction
|
|||
}
|
||||
|
||||
rightButtons: [
|
||||
Button
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Close")
|
||||
enabled: manager.firmwareUpdater != null ? manager.firmwareUpdater.firmwareUpdateState != 1 : true
|
||||
|
|
|
@ -11,26 +11,25 @@ import Cura 1.0 as Cura
|
|||
|
||||
UM.Dialog
|
||||
{
|
||||
title: catalog.i18nc("@title:window", "Convert Image...")
|
||||
title: catalog.i18nc("@title:window", "Convert Image")
|
||||
|
||||
minimumWidth: grid.width + 2 * UM.Theme.getSize("default_margin").height
|
||||
minimumHeight: UM.Theme.getSize("modal_window_minimum").height
|
||||
width: minimumWidth
|
||||
height: minimumHeight
|
||||
|
||||
|
||||
|
||||
GridLayout
|
||||
{
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
id: grid
|
||||
columnSpacing: UM.Theme.getSize("default_margin").width
|
||||
rowSpacing: UM.Theme.getSize("thin_margin").height
|
||||
columnSpacing: UM.Theme.getSize("narrow_margin").width
|
||||
rowSpacing: UM.Theme.getSize("narrow_margin").height
|
||||
columns: 2
|
||||
|
||||
UM.Label
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
text: catalog.i18nc("@action:label", "Height (mm)")
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
|
@ -45,6 +44,7 @@ UM.Dialog
|
|||
{
|
||||
id: peak_height
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
selectByMouse: true
|
||||
objectName: "Peak_Height"
|
||||
validator: RegExpValidator { regExp: /^\d{0,3}([\,|\.]\d*)?$/ }
|
||||
|
@ -62,6 +62,7 @@ UM.Dialog
|
|||
UM.Label
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
text: catalog.i18nc("@action:label", "Base (mm)")
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
|
@ -78,6 +79,7 @@ UM.Dialog
|
|||
id: base_height
|
||||
selectByMouse: true
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
objectName: "Base_Height"
|
||||
validator: RegExpValidator { regExp: /^\d{0,3}([\,|\.]\d*)?$/ }
|
||||
onTextChanged: manager.onBaseHeightChanged(text)
|
||||
|
@ -94,6 +96,7 @@ UM.Dialog
|
|||
UM.Label
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
text: catalog.i18nc("@action:label", "Width (mm)")
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
|
@ -110,6 +113,7 @@ UM.Dialog
|
|||
selectByMouse: true
|
||||
objectName: "Width"
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
focus: true
|
||||
validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ }
|
||||
onTextChanged: manager.onWidthChanged(text)
|
||||
|
@ -126,6 +130,7 @@ UM.Dialog
|
|||
UM.Label
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
text: catalog.i18nc("@action:label", "Depth (mm)")
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
|
@ -140,6 +145,7 @@ UM.Dialog
|
|||
{
|
||||
id: depth
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
selectByMouse: true
|
||||
objectName: "Depth"
|
||||
focus: true
|
||||
|
@ -158,6 +164,7 @@ UM.Dialog
|
|||
UM.Label
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
text: ""
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
|
@ -172,9 +179,14 @@ UM.Dialog
|
|||
{
|
||||
id: lighter_is_higher
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: UM.Theme.getSize("toolbox_action_button").height
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
Layout.preferredHeight: UM.Theme.getSize("setting_control").height
|
||||
objectName: "Lighter_Is_Higher"
|
||||
model: [catalog.i18nc("@item:inlistbox", "Darker is higher"), catalog.i18nc("@item:inlistbox", "Lighter is higher")]
|
||||
textRole: "text"
|
||||
model: [
|
||||
{ text: catalog.i18nc("@item:inlistbox", "Darker is higher") },
|
||||
{ text: catalog.i18nc("@item:inlistbox", "Lighter is higher") }
|
||||
]
|
||||
onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) }
|
||||
}
|
||||
|
||||
|
@ -189,6 +201,7 @@ UM.Dialog
|
|||
UM.Label
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
text: catalog.i18nc("@action:label", "Color Model")
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
|
@ -203,10 +216,15 @@ UM.Dialog
|
|||
{
|
||||
id: color_model
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
Layout.preferredHeight: UM.Theme.getSize("setting_control").height
|
||||
objectName: "ColorModel"
|
||||
model: [catalog.i18nc("@item:inlistbox", "Linear"), catalog.i18nc("@item:inlistbox", "Translucency")]
|
||||
textRole: "text"
|
||||
model: [
|
||||
{ text: catalog.i18nc("@item:inlistbox", "Linear") },
|
||||
{ text: catalog.i18nc("@item:inlistbox", "Translucency") }
|
||||
]
|
||||
onCurrentIndexChanged: { manager.onColorModelChanged(currentIndex) }
|
||||
Layout.preferredHeight: UM.Theme.getSize("toolbox_action_button").height
|
||||
}
|
||||
|
||||
Cura.ToolTip
|
||||
|
@ -220,6 +238,7 @@ UM.Dialog
|
|||
UM.Label
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
text: catalog.i18nc("@action:label", "1mm Transmittance (%)")
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
|
@ -232,25 +251,26 @@ UM.Dialog
|
|||
|
||||
Cura.TextField
|
||||
{
|
||||
id: transmittance
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
selectByMouse: true
|
||||
objectName: "Transmittance"
|
||||
validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ }
|
||||
onTextChanged: manager.onTransmittanceChanged(text)
|
||||
}
|
||||
|
||||
Cura.ToolTip
|
||||
{
|
||||
text: catalog.i18nc("@info:tooltip", "The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.")
|
||||
visible: transmittance.hovered || transmittance_label.containsMouse
|
||||
targetPoint: Qt.point(transmittance.x + Math.round(transmittance.width / 2), 0)
|
||||
y: transmittance.y + transmittance.height + UM.Theme.getSize("default_margin").height
|
||||
Cura.ToolTip
|
||||
{
|
||||
text: catalog.i18nc("@info:tooltip", "The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.")
|
||||
visible: parent.hovered || transmittance_label.containsMouse
|
||||
targetPoint: Qt.point(parent.x + Math.round(parent.width / 2), 0)
|
||||
y: parent.y + parent.height + UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
}
|
||||
|
||||
UM.Label
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
text: catalog.i18nc("@action:label", "Smoothing")
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
|
@ -262,14 +282,15 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
|
||||
Slider
|
||||
Cura.SpinBox
|
||||
{
|
||||
id: smoothing
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
|
||||
objectName: "Smoothing"
|
||||
to: 100.0
|
||||
stepSize: 1.0
|
||||
onValueChanged: { manager.onSmoothingChanged(value) }
|
||||
onValueChanged: manager.onSmoothingChanged(value)
|
||||
}
|
||||
|
||||
Cura.ToolTip
|
||||
|
@ -293,18 +314,20 @@ UM.Dialog
|
|||
onAccepted: manager.onOkButtonClicked()
|
||||
onRejected: manager.onCancelButtonClicked()
|
||||
|
||||
buttonSpacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
rightButtons: [
|
||||
Button
|
||||
{
|
||||
id: ok_button
|
||||
text: catalog.i18nc("@action:button", "OK")
|
||||
onClicked: manager.onOkButtonClicked()
|
||||
},
|
||||
Button
|
||||
Cura.TertiaryButton
|
||||
{
|
||||
id: cancel_button
|
||||
text: catalog.i18nc("@action:button", "Cancel")
|
||||
onClicked: manager.onCancelButtonClicked()
|
||||
},
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: ok_button
|
||||
text: catalog.i18nc("@action:button", "OK")
|
||||
onClicked: manager.onOkButtonClicked()
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import QtQuick 2.10
|
|||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
|
||||
|
@ -88,7 +88,7 @@ Cura.MachineAction
|
|||
}
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: machineNameLabel
|
||||
anchors.top: parent.top
|
||||
|
@ -97,7 +97,6 @@ Cura.MachineAction
|
|||
text: Cura.MachineManager.activeMachine.name
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
UM.TabRow
|
||||
|
|
|
@ -64,8 +64,8 @@ Window
|
|||
// Page title.
|
||||
Item
|
||||
{
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: childrenRect.height + UM.Theme.getSize("default_margin").height
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.preferredHeight: childrenRect.height + UM.Theme.getSize("default_margin").height
|
||||
|
||||
Label
|
||||
{
|
||||
|
|
|
@ -11,19 +11,28 @@ import ".."
|
|||
Button {
|
||||
id: base;
|
||||
|
||||
background: Item { }
|
||||
background: Rectangle {
|
||||
color: UM.Theme.getColor("category_background")
|
||||
}
|
||||
|
||||
contentItem: Row
|
||||
{
|
||||
spacing: UM.Theme.getSize("default_lining").width
|
||||
|
||||
UM.RecolorImage
|
||||
Item //Wrapper to give space before icon with fixed width. This allows aligning checkbox with category icon.
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: (label.height / 2) | 0
|
||||
height: label.height
|
||||
width: height
|
||||
source: base.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight");
|
||||
color: base.hovered ? palette.highlight : palette.buttonText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: (label.height / 2) | 0
|
||||
width: height
|
||||
source: base.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight")
|
||||
color: base.hovered ? UM.Theme.getColor("primary_button_hover"): UM.Theme.getColor("text")
|
||||
}
|
||||
}
|
||||
UM.RecolorImage
|
||||
{
|
||||
|
@ -31,22 +40,20 @@ Button {
|
|||
height: label.height
|
||||
width: height
|
||||
source: UM.Theme.getIcon(definition.icon)
|
||||
color: base.hovered ? palette.highlight : palette.buttonText
|
||||
color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("text")
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
id: label
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: base.text
|
||||
color: base.hovered ? palette.highlight : palette.buttonText
|
||||
color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("text")
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
SystemPalette { id: palette }
|
||||
}
|
||||
|
||||
signal showTooltip(string text);
|
||||
signal hideTooltip();
|
||||
signal showTooltip(string text)
|
||||
signal hideTooltip()
|
||||
signal contextMenuRequested()
|
||||
|
||||
text: definition.label
|
||||
|
|
|
@ -10,16 +10,25 @@ import Cura 1.0 as Cura
|
|||
|
||||
UM.TooltipArea
|
||||
{
|
||||
x: model.depth * UM.Theme.getSize("default_margin").width;
|
||||
text: model.description;
|
||||
x: model.depth * UM.Theme.getSize("default_margin").width
|
||||
text: model.description
|
||||
|
||||
width: childrenRect.width;
|
||||
height: childrenRect.height;
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
|
||||
Item
|
||||
{
|
||||
id: spacer
|
||||
// Align checkbox with PerObjectCategory icon
|
||||
width: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
UM.CheckBox
|
||||
{
|
||||
id: check
|
||||
|
||||
anchors.left: spacer.right
|
||||
|
||||
text: definition.label
|
||||
checked: addedSettingsModel.getVisible(model.key)
|
||||
|
||||
|
|
|
@ -425,8 +425,6 @@ Item
|
|||
storeIndex: 0
|
||||
}
|
||||
|
||||
SystemPalette { id: palette }
|
||||
|
||||
Component
|
||||
{
|
||||
id: settingTextField
|
||||
|
|
|
@ -13,7 +13,8 @@ UM.Dialog
|
|||
id: settingPickDialog
|
||||
|
||||
title: catalog.i18nc("@title:window", "Select Settings to Customize for this model")
|
||||
width: screenScaleFactor * 360
|
||||
width: UM.Theme.getSize("small_popup_dialog").width
|
||||
backgroundColor: UM.Theme.getColor("background_1")
|
||||
|
||||
property var additional_excluded_settings
|
||||
|
||||
|
@ -78,12 +79,13 @@ UM.Dialog
|
|||
anchors
|
||||
{
|
||||
top: filterInput.bottom
|
||||
topMargin: UM.Theme.getSize("default_margin").height
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
ScrollBar.vertical: UM.ScrollBar {}
|
||||
ScrollBar.vertical: UM.ScrollBar { id: scrollBar }
|
||||
clip: true
|
||||
|
||||
model: UM.SettingDefinitionsModel
|
||||
|
@ -104,7 +106,7 @@ UM.Dialog
|
|||
{
|
||||
id: loader
|
||||
|
||||
width: listview.width
|
||||
width: listview.width - scrollBar.width
|
||||
height: model.type != undefined ? UM.Theme.getSize("section").height : 0
|
||||
|
||||
property var definition: model
|
||||
|
@ -126,10 +128,10 @@ UM.Dialog
|
|||
}
|
||||
|
||||
rightButtons: [
|
||||
Button
|
||||
Cura.TertiaryButton
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Close")
|
||||
onClicked: settingPickDialog.visible = false
|
||||
onClicked: reject()
|
||||
}
|
||||
]
|
||||
}
|
|
@ -15,14 +15,15 @@ UM.Dialog
|
|||
id: dialog
|
||||
|
||||
title: catalog.i18nc("@title:window", "Post Processing Plugin")
|
||||
width: 700 * screenScaleFactor;
|
||||
height: 500 * screenScaleFactor;
|
||||
minimumWidth: 400 * screenScaleFactor;
|
||||
minimumHeight: 250 * screenScaleFactor;
|
||||
width: 700 * screenScaleFactor
|
||||
height: 500 * screenScaleFactor
|
||||
minimumWidth: 400 * screenScaleFactor
|
||||
minimumHeight: 250 * screenScaleFactor
|
||||
|
||||
onVisibleChanged:
|
||||
{
|
||||
if(!visible) //Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack.
|
||||
// Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack.
|
||||
if (!visible)
|
||||
{
|
||||
manager.writeScriptsToStack()
|
||||
}
|
||||
|
@ -35,8 +36,7 @@ UM.Dialog
|
|||
property int columnWidth: Math.round((base.width / 2) - UM.Theme.getSize("default_margin").width)
|
||||
property int textMargin: UM.Theme.getSize("narrow_margin").width
|
||||
property string activeScriptName
|
||||
SystemPalette{ id: palette }
|
||||
SystemPalette{ id: disabledPalette; colorGroup: SystemPalette.Disabled }
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
ButtonGroup
|
||||
|
@ -51,14 +51,12 @@ UM.Dialog
|
|||
|
||||
spacing: base.textMargin
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: activeScriptsHeader
|
||||
text: catalog.i18nc("@label", "Post Processing Scripts")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: base.textMargin
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: base.textMargin
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
@ -68,7 +66,6 @@ UM.Dialog
|
|||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
right: parent.right
|
||||
rightMargin: base.textMargin
|
||||
}
|
||||
|
@ -80,166 +77,168 @@ UM.Dialog
|
|||
id: activeScriptsScrollBar
|
||||
}
|
||||
model: manager.scriptList
|
||||
delegate: Item
|
||||
|
||||
delegate: Button
|
||||
{
|
||||
id: activeScriptButton
|
||||
|
||||
width: parent.width - activeScriptsScrollBar.width
|
||||
height: activeScriptButton.height
|
||||
Button
|
||||
{
|
||||
id: activeScriptButton
|
||||
text: manager.getScriptLabelByKey(modelData.toString())
|
||||
ButtonGroup.group: selectedScriptGroup
|
||||
width: parent.width
|
||||
height: UM.Theme.getSize("setting").height
|
||||
checkable: true
|
||||
height: UM.Theme.getSize("standard_list_lineheight").height
|
||||
|
||||
checked:
|
||||
ButtonGroup.group: selectedScriptGroup
|
||||
checkable: true
|
||||
|
||||
checked:
|
||||
{
|
||||
if (manager.selectedScriptIndex == index)
|
||||
{
|
||||
if (manager.selectedScriptIndex == index)
|
||||
{
|
||||
base.activeScriptName = manager.getScriptLabelByKey(modelData.toString())
|
||||
return true
|
||||
}
|
||||
else
|
||||
{
|
||||
return false
|
||||
}
|
||||
}
|
||||
onClicked:
|
||||
{
|
||||
forceActiveFocus()
|
||||
manager.setSelectedScriptIndex(index)
|
||||
base.activeScriptName = manager.getScriptLabelByKey(modelData.toString())
|
||||
return true
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
else
|
||||
{
|
||||
color: activeScriptButton.checked ? palette.highlight : "transparent"
|
||||
return false
|
||||
}
|
||||
contentItem: Label
|
||||
{
|
||||
wrapMode: Text.Wrap
|
||||
text: activeScriptButton.text
|
||||
elide: Text.ElideRight
|
||||
color: activeScriptButton.checked ? palette.highlightedText : palette.text
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button
|
||||
background: Rectangle
|
||||
{
|
||||
id: removeButton
|
||||
text: "x"
|
||||
width: 20 * screenScaleFactor
|
||||
height: 20 * screenScaleFactor
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: manager.removeScriptByIndex(index)
|
||||
contentItem: Item
|
||||
color: activeScriptButton.checked ? UM.Theme.getColor("background_3") : "transparent"
|
||||
}
|
||||
|
||||
onClicked:
|
||||
{
|
||||
forceActiveFocus()
|
||||
manager.setSelectedScriptIndex(index)
|
||||
base.activeScriptName = manager.getScriptLabelByKey(modelData.toString())
|
||||
}
|
||||
|
||||
RowLayout
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
||||
UM.Label
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
text: manager.getScriptLabelByKey(modelData.toString())
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: downButton
|
||||
Layout.preferredWidth: height
|
||||
Layout.fillHeight: true
|
||||
enabled: index != manager.scriptList.length - 1
|
||||
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked:
|
||||
{
|
||||
if (manager.selectedScriptIndex == index)
|
||||
{
|
||||
manager.setSelectedScriptIndex(index + 1)
|
||||
}
|
||||
return manager.moveScript(index, index + 1)
|
||||
}
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: Math.round(removeButton.width / 2.7)
|
||||
height: Math.round(removeButton.height / 2.7)
|
||||
sourceSize.height: width
|
||||
color: palette.text
|
||||
source: UM.Theme.getIcon("Cancel")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Button
|
||||
{
|
||||
id: downButton
|
||||
text: ""
|
||||
anchors.right: removeButton.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
enabled: index != manager.scriptList.length - 1
|
||||
width: 20 * screenScaleFactor
|
||||
height: 20 * screenScaleFactor
|
||||
onClicked:
|
||||
{
|
||||
if (manager.selectedScriptIndex == index)
|
||||
{
|
||||
manager.setSelectedScriptIndex(index + 1)
|
||||
}
|
||||
return manager.moveScript(index, index + 1)
|
||||
}
|
||||
contentItem: Item
|
||||
{
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: Math.round(downButton.width / 2.5)
|
||||
height: Math.round(downButton.height / 2.5)
|
||||
sourceSize.height: width
|
||||
color: downButton.enabled ? palette.text : disabledPalette.text
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: parent.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
|
||||
source: UM.Theme.getIcon("ChevronSingleDown")
|
||||
}
|
||||
}
|
||||
}
|
||||
Button
|
||||
{
|
||||
id: upButton
|
||||
text: ""
|
||||
enabled: index != 0
|
||||
width: 20 * screenScaleFactor
|
||||
height: 20 * screenScaleFactor
|
||||
anchors.right: downButton.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked:
|
||||
Item
|
||||
{
|
||||
if (manager.selectedScriptIndex == index)
|
||||
id: upButton
|
||||
Layout.preferredWidth: height
|
||||
Layout.fillHeight: true
|
||||
enabled: index != 0
|
||||
|
||||
MouseArea
|
||||
{
|
||||
manager.setSelectedScriptIndex(index - 1)
|
||||
anchors.fill: parent
|
||||
onClicked:
|
||||
{
|
||||
if (manager.selectedScriptIndex == index)
|
||||
{
|
||||
manager.setSelectedScriptIndex(index - 1)
|
||||
}
|
||||
return manager.moveScript(index, index - 1)
|
||||
}
|
||||
}
|
||||
return manager.moveScript(index, index - 1)
|
||||
}
|
||||
contentItem: Item
|
||||
{
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: Math.round(upButton.width / 2.5)
|
||||
height: Math.round(upButton.height / 2.5)
|
||||
sourceSize.height: width
|
||||
color: upButton.enabled ? palette.text : disabledPalette.text
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: upButton.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
|
||||
source: UM.Theme.getIcon("ChevronSingleUp")
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: removeButton
|
||||
Layout.preferredWidth: height
|
||||
Layout.fillHeight: true
|
||||
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: manager.removeScriptByIndex(index)
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: UM.Theme.getColor("text")
|
||||
source: UM.Theme.getIcon("Cancel")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Button
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: addButton
|
||||
text: catalog.i18nc("@action", "Add a script")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: base.textMargin
|
||||
onClicked: scriptsMenu.open()
|
||||
}
|
||||
Menu
|
||||
}
|
||||
|
||||
Cura.Menu
|
||||
{
|
||||
id: scriptsMenu
|
||||
|
||||
Models.Instantiator
|
||||
{
|
||||
id: scriptsMenu
|
||||
width: parent.width
|
||||
model: manager.loadedScriptList
|
||||
|
||||
Models.Instantiator
|
||||
Cura.MenuItem
|
||||
{
|
||||
model: manager.loadedScriptList
|
||||
|
||||
MenuItem
|
||||
{
|
||||
text: manager.getScriptLabelByKey(modelData.toString())
|
||||
onTriggered: manager.addScriptToList(modelData.toString())
|
||||
}
|
||||
|
||||
onObjectAdded: scriptsMenu.insertItem(index, object)
|
||||
onObjectRemoved: scriptsMenu.removeItem(object)
|
||||
text: manager.getScriptLabelByKey(modelData.toString())
|
||||
onTriggered: manager.addScriptToList(modelData.toString())
|
||||
}
|
||||
|
||||
onObjectAdded: scriptsMenu.insertItem(index, object)
|
||||
onObjectRemoved: scriptsMenu.removeItem(object)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -304,16 +303,9 @@ UM.Dialog
|
|||
width: listview.width
|
||||
height:
|
||||
{
|
||||
if(provider.properties.enabled == "True")
|
||||
if (provider.properties.enabled == "True" && model.type != undefined)
|
||||
{
|
||||
if(model.type != undefined)
|
||||
{
|
||||
return UM.Theme.getSize("section").height
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0
|
||||
}
|
||||
return UM.Theme.getSize("section").height;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -393,10 +385,10 @@ UM.Dialog
|
|||
|
||||
function onShowTooltip(text)
|
||||
{
|
||||
tooltip.text = text
|
||||
var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0)
|
||||
tooltip.show(position)
|
||||
tooltip.target.x = position.x + 1
|
||||
tooltip.text = text;
|
||||
var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0);
|
||||
tooltip.show(position);
|
||||
tooltip.target.x = position.x + 1;
|
||||
}
|
||||
|
||||
function onHideTooltip() { tooltip.hide() }
|
||||
|
@ -453,7 +445,7 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
|
||||
rightButtons: Button
|
||||
rightButtons: Cura.TertiaryButton
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Close")
|
||||
onClicked: dialog.accept()
|
||||
|
|
|
@ -35,8 +35,8 @@ Cura.MachineAction
|
|||
id: discoverUM3Action
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
SystemPalette { id: palette }
|
||||
UM.I18nCatalog { id: catalog; name:"cura" }
|
||||
|
||||
UM.Label
|
||||
{
|
||||
id: pageTitle
|
||||
|
@ -53,9 +53,9 @@ Cura.MachineAction
|
|||
|
||||
Row
|
||||
{
|
||||
spacing: UM.Theme.getSize("default_lining").width
|
||||
spacing: UM.Theme.getSize("thin_margin").width
|
||||
|
||||
Button
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: addButton
|
||||
text: catalog.i18nc("@action:button", "Add");
|
||||
|
@ -65,7 +65,7 @@ Cura.MachineAction
|
|||
}
|
||||
}
|
||||
|
||||
Button
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: editButton
|
||||
text: catalog.i18nc("@action:button", "Edit")
|
||||
|
@ -76,7 +76,7 @@ Cura.MachineAction
|
|||
}
|
||||
}
|
||||
|
||||
Button
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: removeButton
|
||||
text: catalog.i18nc("@action:button", "Remove")
|
||||
|
@ -84,7 +84,7 @@ Cura.MachineAction
|
|||
onClicked: manager.removeManualDevice(base.selectedDevice.key, base.selectedDevice.ipAddress)
|
||||
}
|
||||
|
||||
Button
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: rediscoverButton
|
||||
text: catalog.i18nc("@action:button", "Refresh")
|
||||
|
@ -122,23 +122,18 @@ Cura.MachineAction
|
|||
base.completeProperties = base.selectedDevice != null && base.selectedDevice.getProperty("incomplete") != "true";
|
||||
}
|
||||
Component.onCompleted: manager.startDiscovery()
|
||||
delegate: Rectangle
|
||||
|
||||
delegate: UM.Label
|
||||
{
|
||||
height: printNameLabel.height
|
||||
color: ListView.isCurrentItem ? palette.highlight : index % 2 ? palette.base : palette.alternateBase
|
||||
id: printNameLabel
|
||||
width: listview.width
|
||||
Label
|
||||
{
|
||||
id: printNameLabel
|
||||
height: contentHeight
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.right: parent.right
|
||||
text: listview.model[index].name
|
||||
color: parent.ListView.isCurrentItem ? palette.highlightedText : palette.text
|
||||
elide: Text.ElideRight
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
height: contentHeight
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
|
||||
anchors.right: parent.right
|
||||
text: listview.model[index].name
|
||||
elide: Text.ElideRight
|
||||
|
||||
MouseArea
|
||||
{
|
||||
|
@ -151,6 +146,11 @@ Cura.MachineAction
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
{
|
||||
color: parent.ListView.isCurrentItem ? UM.Theme.getColor("background_3") : "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
UM.Label
|
||||
|
@ -175,20 +175,19 @@ Cura.MachineAction
|
|||
font: UM.Theme.getFont("large_bold")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Grid
|
||||
GridLayout
|
||||
{
|
||||
visible: base.completeProperties
|
||||
width: parent.width
|
||||
columns: 2
|
||||
property real labelWidth: Math.round(width * 0.5)
|
||||
UM.Label
|
||||
{
|
||||
width: labelWidth
|
||||
Layout.fillWidth: true
|
||||
text: catalog.i18nc("@label", "Type")
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
width: labelWidth
|
||||
Layout.fillWidth: true
|
||||
text:
|
||||
{
|
||||
if (base.selectedDevice) {
|
||||
|
@ -199,22 +198,22 @@ Cura.MachineAction
|
|||
}
|
||||
UM.Label
|
||||
{
|
||||
width: labelWidth
|
||||
Layout.fillWidth: true
|
||||
text: catalog.i18nc("@label", "Firmware version")
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
width: labelWidth
|
||||
Layout.fillWidth: true
|
||||
text: base.selectedDevice ? base.selectedDevice.firmwareVersion : ""
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
width: labelWidth
|
||||
Layout.fillWidth: true
|
||||
text: catalog.i18nc("@label", "Address")
|
||||
}
|
||||
UM.Label
|
||||
{
|
||||
width: labelWidth
|
||||
Layout.fillWidth: true
|
||||
text: base.selectedDevice ? base.selectedDevice.ipAddress : ""
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +245,7 @@ Cura.MachineAction
|
|||
text: catalog.i18nc("@label", "The printer at this address has not yet responded." )
|
||||
}
|
||||
|
||||
Button
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Connect")
|
||||
enabled: (base.selectedDevice && base.completeProperties && base.selectedDevice.clusterSize > 0) ? true : false
|
||||
|
@ -256,7 +255,7 @@ Cura.MachineAction
|
|||
}
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: invalidIPAddressMessageDialog
|
||||
title: catalog.i18nc("@title:window", "Invalid IP address")
|
||||
|
@ -264,7 +263,7 @@ Cura.MachineAction
|
|||
standardButtons: Dialog.Ok
|
||||
}
|
||||
|
||||
Dialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: manualPrinterDialog
|
||||
property string printerKey
|
||||
|
@ -273,6 +272,7 @@ Cura.MachineAction
|
|||
title: catalog.i18nc("@title:window", "Printer Address")
|
||||
|
||||
width: UM.Theme.getSize("small_popup_dialog").width
|
||||
height: UM.Theme.getSize("small_popup_dialog").height
|
||||
|
||||
anchors.centerIn: Overlay.overlay
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.15
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.6 as Cura
|
||||
|
||||
/**
|
||||
* A MonitorInfoBlurb is an extension of the GenericPopUp used to show static information (vs. interactive context
|
||||
|
@ -133,7 +134,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: sendToTopConfirmationDialog
|
||||
onAccepted: OutputDevice.sendJobToTop(printJob.key)
|
||||
|
@ -142,7 +143,7 @@ Item
|
|||
title: catalog.i18nc("@window:title", "Move print job to top")
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: deleteConfirmationDialog
|
||||
onAccepted: OutputDevice.deleteJobFromQueue(printJob.key)
|
||||
|
@ -151,7 +152,7 @@ Item
|
|||
title: catalog.i18nc("@window:title", "Delete print job")
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: abortConfirmationDialog
|
||||
onAccepted: printJob.setState("abort")
|
||||
|
|
|
@ -392,6 +392,7 @@ Item
|
|||
id: printerJobNameLabel
|
||||
color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
font: UM.Theme.getFont("large") // 16pt, bold
|
||||
text: printer && printer.activePrintJob ? printer.activePrintJob.name : catalog.i18nc("@label", "Untitled")
|
||||
width: parent.width
|
||||
|
|
|
@ -2,11 +2,9 @@
|
|||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls 2.15 as NewControls
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
|
@ -585,7 +583,7 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: exitConfirmationDialog
|
||||
title: catalog.i18nc("@title:window %1 is the application name", "Closing %1").arg(CuraApplication.applicationDisplayName)
|
||||
|
@ -743,14 +741,14 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: packageInstallDialog
|
||||
title: catalog.i18nc("@window:title", "Install Package")
|
||||
standardButtons: StandardButton.Ok
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: infoMultipleFilesWithGcodeDialog
|
||||
title: catalog.i18nc("@title:window", "Open File(s)")
|
||||
|
|
|
@ -50,7 +50,7 @@ UM.Dialog
|
|||
UM.I18nCatalog{id: catalog; name: "cura"}
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: version
|
||||
|
||||
|
@ -63,7 +63,7 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: description
|
||||
width: parent.width
|
||||
|
@ -76,7 +76,7 @@ UM.Dialog
|
|||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: creditsNotes
|
||||
width: parent.width
|
||||
|
@ -105,20 +105,20 @@ UM.Dialog
|
|||
delegate: Row
|
||||
{
|
||||
spacing: UM.Theme.getSize("narrow_margin").width
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: "<a href='%1' title='%2'>%2</a>".arg(model.url).arg(model.name)
|
||||
width: (projectsList.width * 0.25) | 0
|
||||
elide: Text.ElideRight
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: model.description
|
||||
elide: Text.ElideRight
|
||||
width: ((projectsList.width * 0.6) | 0) - parent.spacing * 2 - projectsListScrollBar.width
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: model.license
|
||||
elide: Text.ElideRight
|
||||
|
@ -165,12 +165,11 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
|
||||
rightButtons: Cura.SecondaryButton
|
||||
rightButtons: Cura.TertiaryButton
|
||||
{
|
||||
//: Close about dialog button
|
||||
id: closeButton
|
||||
text: catalog.i18nc("@action:button", "Close")
|
||||
|
||||
onClicked: base.visible = false;
|
||||
onClicked: reject()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ UM.Dialog
|
|||
anchors.fill: parent
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: questionText
|
||||
width: parent.width
|
||||
|
|
|
@ -21,6 +21,8 @@ UM.Dialog
|
|||
width: minimumWidth
|
||||
height: minimumHeight
|
||||
|
||||
margin: UM.Theme.getSize("thick_margin").width
|
||||
|
||||
property var changesModel: Cura.UserChangesModel { id: userChangesModel }
|
||||
|
||||
onVisibilityChanged:
|
||||
|
@ -91,6 +93,9 @@ UM.Dialog
|
|||
leftButtons: [
|
||||
Cura.ComboBox
|
||||
{
|
||||
implicitHeight: UM.Theme.getSize("combobox_wide").height
|
||||
implicitWidth: UM.Theme.getSize("combobox_wide").width
|
||||
|
||||
id: discardOrKeepProfileChangesDropDownButton
|
||||
textRole: "text"
|
||||
|
||||
|
|
20
resources/qml/Dialogs/MessageDialog.qml
Normal file
20
resources/qml/Dialogs/MessageDialog.qml
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.5 as Cura
|
||||
|
||||
// Wrapper around the UM.MessageBox with the primary/secondarybuttons
|
||||
// set to Cura.PrimaryButton and Cura.SecondaryButton respectively
|
||||
UM.MessageDialog
|
||||
{
|
||||
primaryButton: Cura.PrimaryButton
|
||||
{
|
||||
text: model.text
|
||||
}
|
||||
|
||||
secondaryButton: Cura.TertiaryButton
|
||||
{
|
||||
text: model.text
|
||||
}
|
||||
}
|
|
@ -45,11 +45,7 @@ UM.Dialog
|
|||
visibilityHandler: UM.SettingPreferenceVisibilityHandler { }
|
||||
}
|
||||
|
||||
SystemPalette
|
||||
{
|
||||
id: palette
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: mainHeading
|
||||
width: parent.width
|
||||
|
@ -86,7 +82,7 @@ UM.Dialog
|
|||
spacing: UM.Theme.getSize("default_margin").height
|
||||
Column
|
||||
{
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: settingsHeading
|
||||
text: catalog.i18nc("@action:label", "Printer settings")
|
||||
|
@ -96,14 +92,14 @@ UM.Dialog
|
|||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Type")
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: (Cura.MachineManager.activeMachine == null) ? "" : Cura.MachineManager.activeMachine.definition.name
|
||||
text: Cura.MachineManager.activeMachine == null ? "" : Cura.MachineManager.activeMachine.definition.name
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
}
|
||||
}
|
||||
|
@ -111,12 +107,12 @@ UM.Dialog
|
|||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: Cura.MachineManager.activeMachineNetworkGroupName != "" ? catalog.i18nc("@action:label", "Printer Group") : catalog.i18nc("@action:label", "Name")
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text:
|
||||
{
|
||||
|
@ -155,7 +151,7 @@ UM.Dialog
|
|||
var material_name = extruder.material.name
|
||||
return (material_name !== undefined) ? material_name : ""
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: {
|
||||
var extruder = Number(modelData.position)
|
||||
|
@ -179,7 +175,7 @@ UM.Dialog
|
|||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text:
|
||||
{
|
||||
|
@ -192,7 +188,7 @@ UM.Dialog
|
|||
width: Math.floor(scroll.width / 3) | 0
|
||||
enabled: modelData.isEnabled
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text:
|
||||
{
|
||||
|
@ -212,7 +208,7 @@ UM.Dialog
|
|||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Profile settings")
|
||||
font.bold: true
|
||||
|
@ -220,12 +216,12 @@ UM.Dialog
|
|||
Row
|
||||
{
|
||||
width: parent.width
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Not in profile")
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", Cura.MachineManager.numUserSettings).arg(Cura.MachineManager.numUserSettings)
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
|
@ -236,12 +232,12 @@ UM.Dialog
|
|||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Name")
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: Cura.MachineManager.activeQualityOrQualityChangesName
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
|
@ -253,12 +249,12 @@ UM.Dialog
|
|||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Intent")
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: Cura.MachineManager.activeIntentCategory
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
|
@ -273,10 +269,9 @@ UM.Dialog
|
|||
|
||||
leftButtons:
|
||||
[
|
||||
CheckBox
|
||||
UM.CheckBox
|
||||
{
|
||||
id: dontShowAgainCheckbox
|
||||
anchors.left: parent.left
|
||||
text: catalog.i18nc("@action:label", "Don't show project summary on save again")
|
||||
checked: dontShowAgain
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ Item
|
|||
property color contentBackgroundColor: UM.Theme.getColor("action_button")
|
||||
|
||||
property color headerBackgroundColor: UM.Theme.getColor("action_button")
|
||||
property color headerActiveColor: UM.Theme.getColor("secondary")
|
||||
property color headerHoverColor: UM.Theme.getColor("action_button_hovered")
|
||||
property color headerActiveColor: UM.Theme.getColor("expandable_active")
|
||||
property color headerHoverColor: UM.Theme.getColor("expandable_hover")
|
||||
|
||||
property alias enabled: mouseArea.enabled
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Cura.RoundedRectangle
|
|||
property alias xPosCloseButton: closeButton.left
|
||||
|
||||
height: UM.Theme.getSize("expandable_component_content_header").height
|
||||
color: UM.Theme.getColor("secondary")
|
||||
color: UM.Theme.getColor("background_1")
|
||||
cornerSide: Cura.RoundedRectangle.Direction.Up
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: UM.Theme.getColor("lining")
|
||||
|
@ -27,7 +27,6 @@ Cura.RoundedRectangle
|
|||
id: headerLabel
|
||||
text: ""
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("small_button_text")
|
||||
height: parent.height
|
||||
|
||||
anchors
|
||||
|
|
|
@ -30,8 +30,8 @@ Item
|
|||
property color contentBackgroundColor: UM.Theme.getColor("action_button")
|
||||
|
||||
property color headerBackgroundColor: UM.Theme.getColor("action_button")
|
||||
property color headerActiveColor: UM.Theme.getColor("secondary")
|
||||
property color headerHoverColor: UM.Theme.getColor("action_button_hovered")
|
||||
property color headerActiveColor: UM.Theme.getColor("expandable_active")
|
||||
property color headerHoverColor: UM.Theme.getColor("expandable_hover")
|
||||
|
||||
property alias mouseArea: headerMouseArea
|
||||
property alias enabled: headerMouseArea.enabled
|
||||
|
|
|
@ -83,13 +83,12 @@ UM.TooltipArea
|
|||
height: numericTextFieldWithUnit.controlHeight
|
||||
|
||||
// Background is a rounded-cornered box with filled color as state indication (normal, warning, error, etc.)
|
||||
background: Rectangle
|
||||
background: UM.UnderlineBackground
|
||||
{
|
||||
anchors.fill: parent
|
||||
anchors.margins: Math.round(UM.Theme.getSize("default_lining").width)
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
|
||||
border.color:
|
||||
liningColor:
|
||||
{
|
||||
if (!textFieldWithUnit.enabled)
|
||||
{
|
||||
|
@ -108,9 +107,9 @@ UM.TooltipArea
|
|||
// Validation is OK.
|
||||
if (textFieldWithUnit.hovered || textFieldWithUnit.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
return UM.Theme.getColor("border_main_light")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
return UM.Theme.getColor("border_field_light")
|
||||
}
|
||||
|
||||
color:
|
||||
|
|
|
@ -20,13 +20,35 @@ Item
|
|||
{
|
||||
id: applicationMenu
|
||||
width: parent.width
|
||||
FileMenu {}
|
||||
height: UM.Theme.getSize("context_menu").height
|
||||
|
||||
background: Rectangle {
|
||||
color: UM.Theme.getColor("background_1")
|
||||
}
|
||||
|
||||
delegate: MenuBarItem
|
||||
{
|
||||
id: menuBarItem
|
||||
|
||||
contentItem: UM.Label
|
||||
{
|
||||
text: menuBarItem.text.replace(new RegExp("&([A-Za-z])"), function (match, character)
|
||||
{
|
||||
return `<u>${character}</u>`;
|
||||
})
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
{
|
||||
color: menuBarItem.highlighted ? UM.Theme.getColor("background_2") : "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
FileMenu {}
|
||||
EditMenu {}
|
||||
ViewMenu {}
|
||||
|
||||
background: Rectangle {}
|
||||
|
||||
SettingsMenu
|
||||
{
|
||||
//On MacOS, don't translate the "Settings" word.
|
||||
|
@ -38,13 +60,9 @@ Item
|
|||
//- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar
|
||||
title: (Qt.platform.os == "osx") ? "&Settings" : catalog.i18nc("@title:menu menubar:toplevel", "&Settings")
|
||||
}
|
||||
|
||||
ExtensionMenu { id: extensionMenu }
|
||||
|
||||
PreferencesMenu {}
|
||||
|
||||
HelpMenu {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,7 +78,7 @@ Item
|
|||
onAccepted: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args)
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: newProjectDialog
|
||||
|
||||
|
@ -97,7 +115,6 @@ Item
|
|||
target: Cura.Actions.browsePackages
|
||||
function onTriggered()
|
||||
{
|
||||
print("beepboop")
|
||||
extensionMenu.extensionModel.callExtensionMethod("Marketplace", "show")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,6 @@ Item
|
|||
background: Rectangle
|
||||
{
|
||||
radius: UM.Theme.getSize("action_button_radius").width
|
||||
width: contents.width
|
||||
color:
|
||||
{
|
||||
if (stageSelectorButton.checked)
|
||||
|
|
|
@ -278,6 +278,7 @@ Item
|
|||
|
||||
width: selectors.controlWidth
|
||||
height: parent.height
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
focusPolicy: Qt.ClickFocus
|
||||
|
||||
|
@ -289,6 +290,7 @@ Item
|
|||
}
|
||||
onClicked: materialsMenu.popup()
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
width: instructionButton.width + 2 * UM.Theme.getSize("narrow_margin").width
|
||||
|
@ -331,6 +333,7 @@ Item
|
|||
tooltip: text
|
||||
height: parent.height
|
||||
width: selectors.controlWidth
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
focusPolicy: Qt.ClickFocus
|
||||
enabled: enabledCheckbox.checked
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ Cura.Menu
|
|||
focus: true
|
||||
from: 1
|
||||
to: 99
|
||||
width: 2 * UM.Theme.getSize("button").width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ Cura.Menu
|
|||
Instantiator
|
||||
{
|
||||
model: brandMaterials
|
||||
delegate: Menu
|
||||
delegate: Cura.Menu
|
||||
{
|
||||
id: brandMaterialsMenu
|
||||
title: materialName
|
||||
|
|
|
@ -7,7 +7,7 @@ import QtQuick.Controls 2.4
|
|||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Menu
|
||||
Cura.Menu
|
||||
{
|
||||
id: menu
|
||||
title: "Printer type"
|
||||
|
|
|
@ -319,7 +319,7 @@ Item
|
|||
onClicked: confirmationDialog.visible = true
|
||||
}
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: confirmationDialog
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ UM.PreferencesPage
|
|||
title: catalog.i18nc("@title:tab", "General")
|
||||
id: generalPreferencesPage
|
||||
|
||||
width: parent.width
|
||||
width: parent ? parent.width: 0
|
||||
|
||||
function setDefaultLanguage(languageCode)
|
||||
{
|
||||
|
@ -554,8 +554,8 @@ UM.PreferencesPage
|
|||
|
||||
model: comboBoxList
|
||||
textRole: "text"
|
||||
width: UM.Theme.getSize("setting_control").width
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
width: UM.Theme.getSize("combobox_wide").width
|
||||
height: UM.Theme.getSize("combobox_wide").height
|
||||
|
||||
currentIndex:
|
||||
{
|
||||
|
@ -711,8 +711,8 @@ UM.PreferencesPage
|
|||
Cura.ComboBox
|
||||
{
|
||||
id: choiceOnOpenProjectDropDownButton
|
||||
width: UM.Theme.getSize("setting_control").width
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
width: UM.Theme.getSize("combobox_wide").width
|
||||
height: UM.Theme.getSize("combobox_wide").height
|
||||
|
||||
model: ListModel
|
||||
{
|
||||
|
@ -779,8 +779,8 @@ UM.PreferencesPage
|
|||
Cura.ComboBox
|
||||
{
|
||||
id: choiceOnProfileOverrideDropDownButton
|
||||
width: UM.Theme.getSize("setting_control").width
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
width: UM.Theme.getSize("combobox_wide").width
|
||||
height: UM.Theme.getSize("combobox_wide").height
|
||||
model: ListModel
|
||||
{
|
||||
id: discardOrKeepProfileListModel
|
||||
|
@ -849,6 +849,7 @@ UM.PreferencesPage
|
|||
hoverBackgroundColor: UM.Theme.getColor("secondary_button_hover")
|
||||
backgroundRadius: width / 2
|
||||
height: UM.Theme.getSize("small_button_icon").height
|
||||
color: UM.Theme.getColor("small_button_text")
|
||||
width: height
|
||||
}
|
||||
}
|
||||
|
@ -894,7 +895,7 @@ UM.PreferencesPage
|
|||
text: catalog.i18nc("@info:tooltip", "When checking for updates, only check for stable releases.")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
RadioButton
|
||||
Cura.RadioButton
|
||||
{
|
||||
id: checkUpdatesOptionStable
|
||||
text: catalog.i18nc("@option:radio", "Stable releases only")
|
||||
|
@ -910,7 +911,7 @@ UM.PreferencesPage
|
|||
text: catalog.i18nc("@info:tooltip", "When checking for updates, check for both stable and for beta releases.")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
RadioButton
|
||||
Cura.RadioButton
|
||||
{
|
||||
id: checkUpdatesOptionBeta
|
||||
text: catalog.i18nc("@option:radio", "Stable and Beta releases")
|
||||
|
|
|
@ -125,7 +125,7 @@ UM.ManagementPage
|
|||
}
|
||||
}
|
||||
|
||||
UM.RenameDialog
|
||||
Cura.RenameDialog
|
||||
{
|
||||
id: renameDialog
|
||||
object: base.currentItem && base.currentItem.name ? base.currentItem.name : ""
|
||||
|
|
|
@ -310,7 +310,7 @@ Item
|
|||
}
|
||||
|
||||
// Dialogs
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: confirmRemoveMaterialDialog
|
||||
title: catalog.i18nc("@title:window", "Confirm Remove")
|
||||
|
@ -337,7 +337,7 @@ Item
|
|||
{
|
||||
const result = Cura.ContainerManager.importMaterialContainer(fileUrl);
|
||||
|
||||
const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base);
|
||||
const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base);
|
||||
messageDialog.standardButtons = Dialog.Ok;
|
||||
messageDialog.title = catalog.i18nc("@title:window", "Import Material");
|
||||
switch (result.status)
|
||||
|
@ -365,7 +365,7 @@ Item
|
|||
{
|
||||
const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, fileUrl);
|
||||
|
||||
const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base);
|
||||
const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base);
|
||||
messageDialog.title = catalog.i18nc("@title:window", "Export Material");
|
||||
messageDialog.standardButtons = Dialog.Ok;
|
||||
switch (result.status)
|
||||
|
|
|
@ -266,7 +266,7 @@ Window
|
|||
border.color: UM.Theme.getColor("lining")
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
width: printerList.width - printerListScrollBar.width
|
||||
height: UM.Theme.getSize("card").height
|
||||
height: UM.Theme.getSize("machine_selector_icon").height + 2 * UM.Theme.getSize("default_margin").height
|
||||
|
||||
property string syncStatus:
|
||||
{
|
||||
|
|
|
@ -119,7 +119,7 @@ Item
|
|||
width: base.width
|
||||
property real rowHeight: brandTextField.height + UM.Theme.getSize("default_lining").height
|
||||
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: confirmDiameterChangeDialog
|
||||
|
||||
|
|
|
@ -137,14 +137,14 @@ UM.ManagementPage
|
|||
base.toActivateNewQuality = false;
|
||||
}
|
||||
}
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: messageDialog
|
||||
standardButtons: Dialog.Ok
|
||||
}
|
||||
|
||||
// Dialog to request a name when creating a new profile
|
||||
UM.RenameDialog
|
||||
Cura.RenameDialog
|
||||
{
|
||||
id: createQualityDialog
|
||||
title: catalog.i18nc("@title:window", "Create Profile")
|
||||
|
@ -233,7 +233,7 @@ UM.ManagementPage
|
|||
}
|
||||
|
||||
// Dialog to request a name when duplicating a new profile
|
||||
UM.RenameDialog
|
||||
Cura.RenameDialog
|
||||
{
|
||||
id: duplicateQualityDialog
|
||||
title: catalog.i18nc("@title:window", "Duplicate Profile")
|
||||
|
@ -245,7 +245,7 @@ UM.ManagementPage
|
|||
}
|
||||
|
||||
// Confirmation dialog for removing a profile
|
||||
UM.MessageDialog
|
||||
Cura.MessageDialog
|
||||
{
|
||||
id: confirmRemoveQualityDialog
|
||||
|
||||
|
@ -263,7 +263,7 @@ UM.ManagementPage
|
|||
}
|
||||
|
||||
// Dialog to rename a quality profile
|
||||
UM.RenameDialog
|
||||
Cura.RenameDialog
|
||||
{
|
||||
id: renameQualityDialog
|
||||
title: catalog.i18nc("@title:window", "Rename Profile")
|
||||
|
@ -293,11 +293,6 @@ UM.ManagementPage
|
|||
}
|
||||
}
|
||||
|
||||
SystemPalette
|
||||
{
|
||||
id: palette
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
id: detailsPanelHeaderColumn
|
||||
|
|
86
resources/qml/Preferences/RenameDialog.qml
Normal file
86
resources/qml/Preferences/RenameDialog.qml
Normal file
|
@ -0,0 +1,86 @@
|
|||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Window 2.1
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
UM.Dialog
|
||||
{
|
||||
id: base
|
||||
|
||||
buttonSpacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
property string object: ""
|
||||
|
||||
property alias newName: nameField.text
|
||||
property bool validName: true
|
||||
property string validationError
|
||||
property string dialogTitle: catalog.i18nc("@title:window", "Rename")
|
||||
property string explanation: catalog.i18nc("@info", "Please provide a new name.")
|
||||
|
||||
title: dialogTitle
|
||||
|
||||
minimumWidth: UM.Theme.getSize("small_popup_dialog").width
|
||||
minimumHeight: UM.Theme.getSize("small_popup_dialog").height
|
||||
width: minimumWidth
|
||||
height: minimumHeight
|
||||
|
||||
property variant catalog: UM.I18nCatalog { name: "cura" }
|
||||
|
||||
signal textChanged(string text)
|
||||
signal selectText()
|
||||
onSelectText:
|
||||
{
|
||||
nameField.selectAll();
|
||||
nameField.focus = true;
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: base.explanation + "\n" //Newline to make some space using system theming.
|
||||
width: parent.width
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Cura.TextField
|
||||
{
|
||||
id: nameField
|
||||
width: parent.width
|
||||
text: base.object
|
||||
maximumLength: 40
|
||||
selectByMouse: true
|
||||
onTextChanged: base.textChanged(text)
|
||||
}
|
||||
|
||||
UM.Label
|
||||
{
|
||||
visible: !base.validName
|
||||
text: base.validationError
|
||||
}
|
||||
}
|
||||
|
||||
rightButtons: [
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: cancelButton
|
||||
text: catalog.i18nc("@action:button","Cancel")
|
||||
onClicked: base.reject()
|
||||
},
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: okButton
|
||||
text: catalog.i18nc("@action:button", "OK")
|
||||
onClicked: base.accept()
|
||||
enabled: base.validName
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
|
||||
TextField
|
||||
Cura.TextField
|
||||
{
|
||||
id: filter
|
||||
|
||||
|
@ -105,7 +105,7 @@ UM.PreferencesPage
|
|||
Cura.ComboBox
|
||||
{
|
||||
id: visibilityPreset
|
||||
width: 150 * screenScaleFactor
|
||||
width: UM.Theme.getSize("action_button").width
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
|
@ -189,7 +189,6 @@ UM.PreferencesPage
|
|||
}
|
||||
|
||||
UM.I18nCatalog { name: "cura" }
|
||||
SystemPalette { id: palette }
|
||||
|
||||
Component
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ ToolButton
|
|||
{
|
||||
target: background
|
||||
color: UM.Theme.getColor("setting_control_disabled")
|
||||
border.color: UM.Theme.getColor("setting_control_disabled_border")
|
||||
liningColor: UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
},
|
||||
State
|
||||
|
@ -47,7 +47,7 @@ ToolButton
|
|||
{
|
||||
target: background
|
||||
color: UM.Theme.getColor("setting_validation_error_background")
|
||||
border.color: UM.Theme.getColor("setting_validation_error")
|
||||
liningColor: UM.Theme.getColor("setting_validation_error")
|
||||
}
|
||||
},
|
||||
State
|
||||
|
@ -58,7 +58,7 @@ ToolButton
|
|||
{
|
||||
target: background
|
||||
color: UM.Theme.getColor("setting_validation_warning_background")
|
||||
border.color: UM.Theme.getColor("setting_validation_warning")
|
||||
liningColor: UM.Theme.getColor("setting_validation_warning")
|
||||
}
|
||||
},
|
||||
State
|
||||
|
@ -69,7 +69,7 @@ ToolButton
|
|||
{
|
||||
target: background
|
||||
color: UM.Theme.getColor("setting_control")
|
||||
border.color: UM.Theme.getColor("setting_control_border_highlight")
|
||||
liningColor: UM.Theme.getColor("border_main_light")
|
||||
}
|
||||
},
|
||||
State
|
||||
|
@ -80,20 +80,15 @@ ToolButton
|
|||
{
|
||||
target: background
|
||||
color: UM.Theme.getColor("setting_control")
|
||||
border.color: UM.Theme.getColor("setting_control_border")
|
||||
liningColor: UM.Theme.getColor("border_field_light")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
background: Rectangle
|
||||
background: UM.UnderlineBackground
|
||||
{
|
||||
id: background
|
||||
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
color: UM.Theme.getColor("setting_control")
|
||||
border.color: UM.Theme.getColor("setting_control_border")
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: downArrow
|
||||
|
|
|
@ -126,13 +126,10 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
background: UM.UnderlineBackground
|
||||
{
|
||||
id: backgroundItem
|
||||
border.color: intentSelection.hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
radius: UM.Theme.getSize("default_radius").width
|
||||
color: UM.Theme.getColor("main_background")
|
||||
liningColor: intentSelection.hovered ? UM.Theme.getColor("border_main_light") : UM.Theme.getColor("border_field_light")
|
||||
}
|
||||
|
||||
UM.SimpleButton
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -87,10 +86,9 @@ Item
|
|||
width: parent.width
|
||||
height: UM.Theme.getSize("print_setup_slider_handle").height // The handle is the widest element of the slider
|
||||
|
||||
minimumValue: 0
|
||||
maximumValue: 100
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 1
|
||||
tickmarksEnabled: true
|
||||
|
||||
// disable slider when gradual support is enabled
|
||||
enabled: parseInt(infillSteps.properties.value) == 0
|
||||
|
@ -98,53 +96,37 @@ Item
|
|||
// set initial value from stack
|
||||
value: parseInt(infillDensity.properties.value)
|
||||
|
||||
style: SliderStyle
|
||||
//Draw line
|
||||
background: Rectangle
|
||||
{
|
||||
//Draw line
|
||||
groove: Item
|
||||
{
|
||||
Rectangle
|
||||
{
|
||||
height: UM.Theme.getSize("print_setup_slider_groove").height
|
||||
width: control.width - UM.Theme.getSize("print_setup_slider_handle").width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||
}
|
||||
}
|
||||
id: backgroundLine
|
||||
height: UM.Theme.getSize("print_setup_slider_groove").height
|
||||
width: infillSlider.width - UM.Theme.getSize("print_setup_slider_handle").width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||
|
||||
handle: Rectangle
|
||||
{
|
||||
id: handleButton
|
||||
color: control.enabled ? UM.Theme.getColor("primary") : UM.Theme.getColor("quality_slider_unavailable")
|
||||
implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width
|
||||
implicitHeight: implicitWidth
|
||||
radius: Math.round(implicitWidth / 2)
|
||||
border.color: UM.Theme.getColor("slider_groove_fill")
|
||||
border.width: UM.Theme.getSize("default_lining").height
|
||||
}
|
||||
|
||||
tickmarks: Repeater
|
||||
Repeater
|
||||
{
|
||||
id: repeater
|
||||
model: control.maximumValue / control.stepSize + 1
|
||||
anchors.fill: parent
|
||||
model: infillSlider.to / infillSlider.stepSize + 1
|
||||
|
||||
Rectangle
|
||||
{
|
||||
color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||
color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||
implicitWidth: UM.Theme.getSize("print_setup_slider_tickmarks").width
|
||||
implicitHeight: UM.Theme.getSize("print_setup_slider_tickmarks").height
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
// Do not use Math.round otherwise the tickmarks won't be aligned
|
||||
x: ((styleData.handleWidth / 2) - (implicitWidth / 2) + (index * ((repeater.width - styleData.handleWidth) / (repeater.count-1))))
|
||||
radius: Math.round(implicitWidth / 2)
|
||||
x: ((handleButton.width / 2) - (backgroundLine.implicitWidth / 2) + (index * ((repeater.width - handleButton.width) / (repeater.count-1))))
|
||||
radius: Math.round(backgroundLine.implicitWidth / 2)
|
||||
visible: (index % 10) == 0 // Only show steps of 10%
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: index
|
||||
font: UM.Theme.getFont("default")
|
||||
visible: (index % 20) == 0 // Only show steps of 20%
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: UM.Theme.getSize("thin_margin").height
|
||||
|
@ -155,29 +137,46 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
onValueChanged:
|
||||
handle: Rectangle
|
||||
{
|
||||
// Don't round the value if it's already the same
|
||||
if (parseInt(infillDensity.properties.value) == infillSlider.value)
|
||||
id: handleButton
|
||||
x: infillSlider.leftPadding + infillSlider.visualPosition * (infillSlider.availableWidth - width)
|
||||
y: infillSlider.topPadding + infillSlider.availableHeight / 2 - height / 2
|
||||
color: infillSlider.enabled ? UM.Theme.getColor("primary") : UM.Theme.getColor("quality_slider_unavailable")
|
||||
implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width
|
||||
implicitHeight: implicitWidth
|
||||
radius: Math.round(implicitWidth / 2)
|
||||
border.color: UM.Theme.getColor("slider_groove_fill")
|
||||
border.width: UM.Theme.getSize("default_lining").height
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: infillSlider
|
||||
function onValueChanged()
|
||||
{
|
||||
return
|
||||
}
|
||||
// Don't round the value if it's already the same
|
||||
if (parseInt(infillDensity.properties.value) == infillSlider.value)
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
// Round the slider value to the nearest multiple of 10 (simulate step size of 10)
|
||||
var roundedSliderValue = Math.round(infillSlider.value / 10) * 10
|
||||
// Round the slider value to the nearest multiple of 10 (simulate step size of 10)
|
||||
var roundedSliderValue = Math.round(infillSlider.value / 10) * 10
|
||||
|
||||
// Update the slider value to represent the rounded value
|
||||
infillSlider.value = roundedSliderValue
|
||||
// Update the slider value to represent the rounded value
|
||||
infillSlider.value = roundedSliderValue
|
||||
|
||||
// Update value only if the Recommended mode is Active,
|
||||
// Otherwise if I change the value in the Custom mode the Recommended view will try to repeat
|
||||
// same operation
|
||||
var active_mode = UM.Preferences.getValue("cura/active_mode")
|
||||
// Update value only if the Recommended mode is Active,
|
||||
// Otherwise if I change the value in the Custom mode the Recommended view will try to repeat
|
||||
// same operation
|
||||
const active_mode = UM.Preferences.getValue("cura/active_mode")
|
||||
|
||||
if (active_mode == 0 || active_mode == "simple")
|
||||
{
|
||||
Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue)
|
||||
Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance")
|
||||
if (active_mode == 0 || active_mode == "simple")
|
||||
{
|
||||
Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue)
|
||||
Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls 2.3 as Controls2
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.6 as Cura
|
||||
|
@ -29,7 +28,7 @@ Item
|
|||
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
Controls2.ButtonGroup
|
||||
ButtonGroup
|
||||
{
|
||||
id: activeProfileButtonGroup
|
||||
exclusive: true
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
//Copyright (c) 2019 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.Layouts 1.1
|
||||
import QtQuick.Controls 2.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -35,17 +34,17 @@ Item
|
|||
id: background
|
||||
anchors.fill: parent
|
||||
|
||||
Label //Extruder name.
|
||||
// Extruder name.
|
||||
UM.Label
|
||||
{
|
||||
text: Cura.MachineManager.activeMachine.extruderList[position].name !== "" ? Cura.MachineManager.activeMachine.extruderList[position].name : catalog.i18nc("@label", "Extruder")
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("default")
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
Label //Target temperature.
|
||||
// Target temperature.
|
||||
UM.Label
|
||||
{
|
||||
id: extruderTargetTemperature
|
||||
text: Math.round(extruderModel.targetHotendTemperature) + "°C"
|
||||
|
@ -55,7 +54,8 @@ Item
|
|||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.bottom: extruderCurrentTemperature.bottom
|
||||
|
||||
MouseArea //For tooltip.
|
||||
//For tooltip.
|
||||
MouseArea
|
||||
{
|
||||
id: extruderTargetTemperatureTooltipArea
|
||||
hoverEnabled: true
|
||||
|
@ -77,17 +77,20 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
Label //Temperature indication.
|
||||
|
||||
//Temperature indication.
|
||||
UM.Label
|
||||
{
|
||||
id: extruderCurrentTemperature
|
||||
text: Math.round(extruderModel.hotendTemperature) + "°C"
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
anchors.right: extruderTargetTemperature.left
|
||||
anchors.top: parent.top
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
MouseArea //For tooltip.
|
||||
|
||||
//For tooltip.
|
||||
MouseArea
|
||||
{
|
||||
id: extruderCurrentTemperatureTooltipArea
|
||||
hoverEnabled: true
|
||||
|
@ -110,7 +113,8 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle //Input field for pre-heat temperature.
|
||||
//Input field for pre-heat temperature.
|
||||
Rectangle
|
||||
{
|
||||
id: preheatTemperatureControl
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok")
|
||||
|
@ -152,14 +156,16 @@ Item
|
|||
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
||||
height: UM.Theme.getSize("monitor_preheat_temperature_control").height
|
||||
visible: extruderModel != null ? enabled && extruderModel.canPreHeatHotends && !extruderModel.isPreheating : true
|
||||
Rectangle //Highlight of input field.
|
||||
//Highlight of input field.
|
||||
Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
anchors.margins: UM.Theme.getSize("default_lining").width
|
||||
color: UM.Theme.getColor("setting_control_highlight")
|
||||
opacity: preheatTemperatureControl.hovered ? 1.0 : 0
|
||||
}
|
||||
MouseArea //Change cursor on hovering.
|
||||
//Change cursor on hovering.
|
||||
MouseArea
|
||||
{
|
||||
id: preheatTemperatureInputMouseArea
|
||||
hoverEnabled: true
|
||||
|
@ -182,7 +188,7 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: unit
|
||||
anchors.right: parent.right
|
||||
|
@ -191,7 +197,6 @@ Item
|
|||
|
||||
text: "°C";
|
||||
color: UM.Theme.getColor("setting_unit")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
TextInput
|
||||
{
|
||||
|
@ -299,7 +304,8 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle //Material colour indication.
|
||||
//Material colour indication.
|
||||
Rectangle
|
||||
{
|
||||
id: materialColor
|
||||
width: Math.floor(materialName.height * 0.75)
|
||||
|
@ -313,7 +319,8 @@ Item
|
|||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.verticalCenter: materialName.verticalCenter
|
||||
|
||||
MouseArea //For tooltip.
|
||||
//For tooltip.
|
||||
MouseArea
|
||||
{
|
||||
id: materialColorTooltipArea
|
||||
hoverEnabled: true
|
||||
|
@ -335,17 +342,17 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
Label //Material name.
|
||||
//Material name.
|
||||
UM.Label
|
||||
{
|
||||
id: materialName
|
||||
text: extruderModel.activeMaterial != null ? extruderModel.activeMaterial.type : ""
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
anchors.left: materialColor.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
MouseArea //For tooltip.
|
||||
//For tooltip.
|
||||
MouseArea
|
||||
{
|
||||
id: materialNameTooltipArea
|
||||
hoverEnabled: true
|
||||
|
@ -367,17 +374,18 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
Label //Variant name.
|
||||
|
||||
//Variant name.
|
||||
UM.Label
|
||||
{
|
||||
id: variantName
|
||||
text: extruderModel.hotendID
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
MouseArea //For tooltip.
|
||||
//For tooltip.
|
||||
MouseArea
|
||||
{
|
||||
id: variantNameTooltipArea
|
||||
hoverEnabled: true
|
||||
|
@ -388,7 +396,7 @@ Item
|
|||
{
|
||||
base.showTooltip(
|
||||
base,
|
||||
{x: 0, y: parent.mapToItem(base, 0, -parent.height / 4).y},
|
||||
{ x: 0, y: parent.mapToItem(base, 0, -parent.height / 4).y },
|
||||
catalog.i18nc("@tooltip", "The nozzle inserted in this extruder.")
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// Copyright (c) 2017 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls 2.4
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -20,17 +19,17 @@ Item
|
|||
color: UM.Theme.getColor("main_background")
|
||||
anchors.fill: parent
|
||||
|
||||
Label //Build plate label.
|
||||
// Build plate label.
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Build plate")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
Label //Target temperature.
|
||||
// Target temperature.
|
||||
UM.Label
|
||||
{
|
||||
id: bedTargetTemperature
|
||||
text: printerModel != null ? printerModel.targetBedTemperature + "°C" : ""
|
||||
|
@ -40,7 +39,8 @@ Item
|
|||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.bottom: bedCurrentTemperature.bottom
|
||||
|
||||
MouseArea //For tooltip.
|
||||
// For tooltip.
|
||||
MouseArea
|
||||
{
|
||||
id: bedTargetTemperatureTooltipArea
|
||||
hoverEnabled: true
|
||||
|
@ -62,17 +62,18 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
Label //Current temperature.
|
||||
// Current temperature.
|
||||
UM.Label
|
||||
{
|
||||
id: bedCurrentTemperature
|
||||
text: printerModel != null ? printerModel.bedTemperature + "°C" : ""
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
anchors.right: bedTargetTemperature.left
|
||||
anchors.top: parent.top
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
MouseArea //For tooltip.
|
||||
//For tooltip.
|
||||
MouseArea
|
||||
{
|
||||
id: bedTemperatureTooltipArea
|
||||
hoverEnabled: true
|
||||
|
@ -94,7 +95,8 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
Rectangle //Input field for pre-heat temperature.
|
||||
//Input field for pre-heat temperature.
|
||||
Rectangle
|
||||
{
|
||||
id: preheatTemperatureControl
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok")
|
||||
|
@ -166,7 +168,7 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: unit
|
||||
anchors.right: parent.right
|
||||
|
@ -175,7 +177,6 @@ Item
|
|||
|
||||
text: "°C";
|
||||
color: UM.Theme.getColor("setting_unit")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
TextInput
|
||||
{
|
||||
|
@ -213,7 +214,8 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Cura.SecondaryButton // The pre-heat button.
|
||||
// The pre-heat button.
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: preheatButton
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
|
@ -248,14 +250,15 @@ Item
|
|||
|
||||
text:
|
||||
{
|
||||
if(printerModel == null)
|
||||
if (printerModel == null)
|
||||
{
|
||||
return ""
|
||||
}
|
||||
if(printerModel.isPreheating )
|
||||
if (printerModel.isPreheating )
|
||||
{
|
||||
return catalog.i18nc("@button Cancel pre-heating", "Cancel")
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
return catalog.i18nc("@button", "Pre-heat")
|
||||
}
|
||||
|
@ -279,7 +282,7 @@ Item
|
|||
{
|
||||
base.showTooltip(
|
||||
base,
|
||||
{x: 0, y: preheatButton.mapToItem(base, 0, 0).y},
|
||||
{ x: 0, y: preheatButton.mapToItem(base, 0, 0).y },
|
||||
catalog.i18nc("@tooltip of pre-heat", "Heat the bed in advance before printing. You can continue adjusting your print while it is heating, and you won't have to wait for the bed to heat up when you're ready to print.")
|
||||
);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
// Copyright (c) 2017 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.Layouts 1.1
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
// 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.Layouts 1.1
|
||||
import QtQuick.Controls 2.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -27,7 +29,7 @@ Item
|
|||
height: childrenRect.height
|
||||
color: UM.Theme.getColor("setting_category")
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: outputDeviceNameLabel
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
|
@ -38,7 +40,7 @@ Item
|
|||
text: outputDevice != null ? outputDevice.activePrinter.name : ""
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: outputDeviceAddressLabel
|
||||
text: (outputDevice != null && outputDevice.address != null) ? outputDevice.address : ""
|
||||
|
@ -49,11 +51,10 @@ Item
|
|||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: outputDevice != null ? "" : catalog.i18nc("@info:status", "The printer is not connected.")
|
||||
color: outputDevice != null && outputDevice.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||
font: UM.Theme.getFont("default")
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
|
|
|
@ -11,7 +11,7 @@ Cura.ActionButton
|
|||
{
|
||||
color: UM.Theme.getColor("secondary_button")
|
||||
textColor: UM.Theme.getColor("secondary_button_text")
|
||||
outlineColor: UM.Theme.getColor("secondary_button_text")
|
||||
outlineColor: UM.Theme.getColor("border_accent_1")
|
||||
disabledColor: UM.Theme.getColor("action_button_disabled")
|
||||
textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
|
||||
hoverColor: UM.Theme.getColor("secondary_button_hover")
|
||||
|
|
|
@ -5,14 +5,14 @@ import QtQuick 2.7
|
|||
import QtQuick.Controls 2.0
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
import Cura 1.5 as Cura
|
||||
|
||||
SettingItem
|
||||
{
|
||||
id: base
|
||||
property var focusItem: control
|
||||
|
||||
contents: ComboBox
|
||||
contents: Cura.ComboBox
|
||||
{
|
||||
id: control
|
||||
anchors.fill: parent
|
||||
|
@ -113,7 +113,7 @@ SettingItem
|
|||
color: UM.Theme.getColor("setting_control_button");
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
background: UM.UnderlineBackground
|
||||
{
|
||||
color:
|
||||
{
|
||||
|
@ -127,9 +127,7 @@ SettingItem
|
|||
}
|
||||
return UM.Theme.getColor("setting_control")
|
||||
}
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color:
|
||||
liningColor:
|
||||
{
|
||||
if (!enabled)
|
||||
{
|
||||
|
@ -137,9 +135,9 @@ SettingItem
|
|||
}
|
||||
if (control.hovered || control.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
return UM.Theme.getColor("border_main_light")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
return UM.Theme.getColor("border_field_light")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,7 +225,6 @@ SettingItem
|
|||
background: Rectangle
|
||||
{
|
||||
color: parent.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent"
|
||||
border.color: parent.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import QtQuick 2.7
|
|||
import QtQuick.Controls 2.0
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
import Cura 1.5 as Cura
|
||||
|
||||
SettingItem
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ SettingItem
|
|||
// this extra property to keep the ExtrudersModel and use this in the rest of the code.
|
||||
property var extrudersWithOptionalModel: CuraApplication.getExtrudersModelWithOptional()
|
||||
|
||||
contents: ComboBox
|
||||
contents: Cura.ComboBox
|
||||
{
|
||||
id: control
|
||||
anchors.fill: parent
|
||||
|
@ -111,26 +111,24 @@ SettingItem
|
|||
sourceSize.width: width + 5 * screenScaleFactor
|
||||
sourceSize.height: width + 5 * screenScaleFactor
|
||||
|
||||
color: UM.Theme.getColor("setting_control_button");
|
||||
color: UM.Theme.getColor("setting_control_button")
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
background: UM.UnderlineBackground
|
||||
{
|
||||
color:
|
||||
{
|
||||
if (!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled");
|
||||
return UM.Theme.getColor("setting_control_disabled")
|
||||
}
|
||||
if (control.hovered || control.activeFocus)
|
||||
if (control.hovered || base.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_highlight");
|
||||
return UM.Theme.getColor("setting_control_highlight")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control");
|
||||
return UM.Theme.getColor("setting_control")
|
||||
}
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color:
|
||||
liningColor:
|
||||
{
|
||||
if (!enabled)
|
||||
{
|
||||
|
@ -138,9 +136,9 @@ SettingItem
|
|||
}
|
||||
if (control.hovered || control.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
return UM.Theme.getColor("border_main_light")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
return UM.Theme.getColor("border_field_light")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,7 +212,7 @@ SettingItem
|
|||
if (model.enabled) {
|
||||
UM.Theme.getColor("setting_control_text")
|
||||
} else {
|
||||
UM.Theme.getColor("action_button_disabled_text");
|
||||
UM.Theme.getColor("action_button_disabled_text")
|
||||
}
|
||||
}
|
||||
elide: Text.ElideRight
|
||||
|
@ -237,7 +235,6 @@ SettingItem
|
|||
background: Rectangle
|
||||
{
|
||||
color: parent.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent"
|
||||
border.color: parent.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,15 +26,13 @@ SettingItem
|
|||
}
|
||||
}
|
||||
|
||||
contents: Rectangle
|
||||
contents: UM.UnderlineBackground
|
||||
{
|
||||
id: control
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color:
|
||||
liningColor:
|
||||
{
|
||||
if(!enabled)
|
||||
{
|
||||
|
@ -54,9 +52,9 @@ SettingItem
|
|||
//Validation is OK.
|
||||
if(hovered || input.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
return UM.Theme.getColor("border_main_light")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
return UM.Theme.getColor("border_field_light")
|
||||
}
|
||||
|
||||
color: {
|
||||
|
|
|
@ -409,7 +409,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Menu
|
||||
Cura.Menu
|
||||
{
|
||||
id: contextMenu
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.5 as Cura
|
||||
|
||||
// This component extends the funtionality of QtControls 2.x Spinboxes to
|
||||
// - be able to contain fractional values
|
||||
// - hava a "prefix" and a "suffix". A validator is added that recognizes this pre-, suf-fix combo. When adding a custom
|
||||
|
@ -33,11 +36,15 @@ Item
|
|||
signal editingFinished()
|
||||
implicitWidth: spinBox.implicitWidth
|
||||
implicitHeight: spinBox.implicitHeight
|
||||
|
||||
SpinBox
|
||||
{
|
||||
id: spinBox
|
||||
anchors.fill: base
|
||||
editable: base.editable
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
padding: UM.Theme.getSize("narrow_margin").width
|
||||
|
||||
// The stepSize of the SpinBox is intentionally set to be always `1`
|
||||
// As SpinBoxes can only contain integer values the `base.stepSize` is concidered the precision/resolution
|
||||
|
@ -65,20 +72,60 @@ Item
|
|||
base.value = value * base.stepSize;
|
||||
}
|
||||
|
||||
contentItem: TextField
|
||||
background: Item {}
|
||||
|
||||
contentItem: Cura.TextField
|
||||
{
|
||||
text: spinBox.textFromValue(spinBox.value, spinBox.locale)
|
||||
selectByMouse: base.editable
|
||||
background: Item {}
|
||||
validator: base.validator
|
||||
|
||||
onActiveFocusChanged:
|
||||
{
|
||||
if(!activeFocus)
|
||||
if (!activeFocus)
|
||||
{
|
||||
base.editingFinished();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
down.indicator: Rectangle
|
||||
{
|
||||
x: spinBox.mirrored ? parent.width - width : 0
|
||||
height: parent.height
|
||||
width: height
|
||||
|
||||
UM.UnderlineBackground {
|
||||
color: spinBox.down.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background")
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
height: parent.height / 2.5
|
||||
width: height
|
||||
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
|
||||
source: UM.Theme.getIcon("Minus")
|
||||
}
|
||||
}
|
||||
|
||||
up.indicator: Rectangle
|
||||
{
|
||||
x: spinBox.mirrored ? 0 : parent.width - width
|
||||
height: parent.height
|
||||
width: height
|
||||
|
||||
UM.UnderlineBackground {
|
||||
color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background")
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
height: parent.height / 2.5
|
||||
width: height
|
||||
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
|
||||
source: UM.Theme.getIcon("Plus")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,29 +26,18 @@ ComboBox
|
|||
{
|
||||
name: "disabled"
|
||||
when: !control.enabled
|
||||
PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_disabled_border")}
|
||||
PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_disabled")}
|
||||
PropertyChanges { target: background; color: UM.Theme.getColor("setting_control_disabled")}
|
||||
PropertyChanges { target: contentLabel; color: UM.Theme.getColor("setting_control_disabled_text")}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "highlighted"
|
||||
when: control.hovered || control.activeFocus
|
||||
PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_border_highlight") }
|
||||
PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_highlight")}
|
||||
PropertyChanges { target: background; liningColor: UM.Theme.getColor("border_main_light")}
|
||||
}
|
||||
]
|
||||
|
||||
background: Rectangle
|
||||
{
|
||||
id: backgroundRectangle
|
||||
color: UM.Theme.getColor("setting_control")
|
||||
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: UM.Theme.getColor("setting_control_border")
|
||||
|
||||
}
|
||||
background: UM.UnderlineBackground{}
|
||||
|
||||
indicator: UM.RecolorImage
|
||||
{
|
||||
|
@ -157,7 +146,6 @@ ComboBox
|
|||
Rectangle
|
||||
{
|
||||
color: delegateItem.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent"
|
||||
border.color: delegateItem.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent"
|
||||
anchors.fill: parent
|
||||
}
|
||||
text: delegateLabel.truncated ? delegateItem.text : ""
|
||||
|
|
|
@ -21,7 +21,7 @@ UM.Menu
|
|||
delegate: Cura.MenuItem {}
|
||||
background: Rectangle
|
||||
{
|
||||
color: UM.Theme.getColor("setting_control")
|
||||
border.color: UM.Theme.getColor("setting_control_border")
|
||||
color: UM.Theme.getColor("main_background")
|
||||
border.color: UM.Theme.getColor("lining")
|
||||
}
|
||||
}
|
|
@ -48,7 +48,6 @@ UM.MenuItem
|
|||
y: UM.Theme.getSize("default_lining").width
|
||||
width: menuItem.width - 2 * UM.Theme.getSize("default_lining").width
|
||||
height: menuItem.height - 2 * UM.Theme.getSize("default_lining").height
|
||||
|
||||
color: menuItem.highlighted ? UM.Theme.getColor("secondary"): UM.Theme.getColor("setting_control_highlight")
|
||||
color: menuItem.highlighted ? UM.Theme.getColor("background_2"): UM.Theme.getColor("background_1")
|
||||
}
|
||||
}
|
|
@ -17,6 +17,31 @@ RadioButton
|
|||
|
||||
font: UM.Theme.getFont("default")
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "checked"
|
||||
when: radioButton.checked
|
||||
PropertyChanges
|
||||
{
|
||||
target: indicator
|
||||
color: UM.Theme.getColor("accent_1")
|
||||
border.width: 0
|
||||
}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "disabled"
|
||||
when: !radioButton.enabled
|
||||
PropertyChanges { target: indicator; color: UM.Theme.getColor("background_1")}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "highlighted"
|
||||
when: radioButton.hovered || radioButton.activeFocus
|
||||
PropertyChanges { target: indicator; border.color: UM.Theme.getColor("border_main_light")}
|
||||
}
|
||||
]
|
||||
|
||||
background: Item
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
@ -29,8 +54,9 @@ RadioButton
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.alignWhenCentered: false
|
||||
radius: width / 2
|
||||
color: UM.Theme.getColor("background_2")
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: radioButton.hovered ? UM.Theme.getColor("small_button_text") : UM.Theme.getColor("small_button_text_hover")
|
||||
border.color: UM.Theme.getColor("text_disabled")
|
||||
|
||||
Rectangle
|
||||
{
|
||||
|
@ -38,7 +64,7 @@ RadioButton
|
|||
height: width
|
||||
anchors.centerIn: parent
|
||||
radius: width / 2
|
||||
color: radioButton.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("primary_button")
|
||||
color: radioButton.enabled ? UM.Theme.getColor("background_2") : UM.Theme.getColor("background_1")
|
||||
visible: radioButton.checked
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
|
||||
|
@ -17,11 +17,14 @@ TextField
|
|||
|
||||
property alias leftIcon: iconLeft.source
|
||||
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
|
||||
hoverEnabled: true
|
||||
selectByMouse: true
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
selectionColor: UM.Theme.getColor("text_selection")
|
||||
leftPadding: iconLeft.visible ? iconLeft.width + UM.Theme.getSize("default_margin").width * 2 : UM.Theme.getSize("thin_margin").width
|
||||
|
||||
states: [
|
||||
|
@ -29,45 +32,25 @@ TextField
|
|||
{
|
||||
name: "disabled"
|
||||
when: !textField.enabled
|
||||
PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_disabled_border")}
|
||||
PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_disabled")}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "invalid"
|
||||
when: !textField.acceptableInput
|
||||
PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_validation_error")}
|
||||
PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_validation_error_background")}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "hovered"
|
||||
when: textField.hovered || textField.activeFocus
|
||||
PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_border_highlight") }
|
||||
PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("border_main_light")}
|
||||
}
|
||||
]
|
||||
|
||||
background: Rectangle
|
||||
background: UM.UnderlineBackground
|
||||
{
|
||||
id: backgroundRectangle
|
||||
|
||||
color: UM.Theme.getColor("main_background")
|
||||
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
|
||||
border.color:
|
||||
{
|
||||
if (!textField.enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
if (textField.hovered || textField.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
|
||||
//Optional icon added on the left hand side.
|
||||
UM.RecolorImage
|
||||
{
|
||||
|
|
|
@ -47,3 +47,4 @@ GcodeTextArea 1.0 GcodeTextArea.qml
|
|||
NumericTextFieldWithUnit 1.0 NumericTextFieldWithUnit.qml
|
||||
PrintHeadMinMaxTextField 1.0 PrintHeadMinMaxTextField.qml
|
||||
SimpleCheckBox 1.0 SimpleCheckBox.qml
|
||||
RenameDialog 1.0 RenameDialog.qml
|
||||
|
|
|
@ -4,41 +4,70 @@
|
|||
"inherits": "cura-light"
|
||||
},
|
||||
|
||||
"base_colors":
|
||||
{
|
||||
"background_1": [31, 31, 32, 255],
|
||||
"background_2": [57, 57, 58, 255],
|
||||
"background_3": [85, 85, 87, 255],
|
||||
"background_4": [23, 23, 23, 255],
|
||||
|
||||
"accent_1": [25, 110, 240, 255],
|
||||
"accent_2": [16, 70, 156, 255],
|
||||
"border_main": [212, 212, 212, 255],
|
||||
"border_accent_1": [255, 255, 255, 255],
|
||||
"border_accent_2": [16, 70, 156, 255],
|
||||
"border_field": [57, 57, 58, 255],
|
||||
|
||||
"text_default": [255, 255, 255, 255],
|
||||
"text_disabled": [118, 118, 118, 255],
|
||||
"text_primary_button": [255, 255, 255, 255],
|
||||
"text_secondary_button": [255, 255, 255, 255],
|
||||
"text_link_hover": [156, 195, 255, 255],
|
||||
"text_lighter": [243, 243, 243, 255]
|
||||
},
|
||||
|
||||
"colors": {
|
||||
"main_background": [39, 44, 48, 255],
|
||||
"detail_background": [63, 63, 63, 255],
|
||||
"message_background": [39, 44, 48, 255],
|
||||
"main_background": "background_1",
|
||||
"detail_background": "background_2",
|
||||
"message_background": "background_1",
|
||||
"wide_lining": [31, 36, 39, 255],
|
||||
"thick_lining": [255, 255, 255, 60],
|
||||
"lining": [64, 69, 72, 255],
|
||||
"viewport_overlay": [30, 36, 39, 255],
|
||||
"lining": "border_main",
|
||||
"viewport_overlay": "background_1",
|
||||
|
||||
"primary": [12, 169, 227, 255],
|
||||
"primary_text": [255, 255, 255, 204],
|
||||
"primary_text": "text_default",
|
||||
"secondary": [95, 95, 95, 255],
|
||||
|
||||
"secondary_button": [39, 44, 48, 255],
|
||||
"secondary_button_hover": [85, 85, 87, 255],
|
||||
"expandable_active": "background_2",
|
||||
"expandable_hover": "background_2",
|
||||
|
||||
"secondary_button": "background_1",
|
||||
"secondary_button_hover": "background_3",
|
||||
"secondary_button_text": [255, 255, 255, 255],
|
||||
|
||||
"icon": [255, 255, 255, 255],
|
||||
"toolbar_background": [39, 44, 48, 255],
|
||||
"toolbar_button_active": [57, 57, 58, 255],
|
||||
"toolbar_button_hover": [57, 57, 58, 255],
|
||||
"toolbar_button_active_hover": [57, 57, 58, 255],
|
||||
"icon": "text_default",
|
||||
"toolbar_background": "background_1",
|
||||
"toolbar_button_active": "background_3",
|
||||
"toolbar_button_hover": "background_3",
|
||||
"toolbar_button_active_hover": "background_3",
|
||||
|
||||
"main_window_header_button_text_inactive": [128, 128, 128, 255],
|
||||
"main_window_header_background": [14, 14, 14, 255],
|
||||
"main_window_header_background_gradient": [32, 32, 32, 255],
|
||||
"main_window_header_button_background_inactive": "background_4",
|
||||
"main_window_header_button_text_inactive": "text_primary_button",
|
||||
"main_window_header_button_text_active": "background_4",
|
||||
"main_window_header_background": "background_4",
|
||||
"main_window_header_background_gradient": "background_4",
|
||||
"main_window_header_button_background_hovered": [46, 46, 46, 255],
|
||||
|
||||
"secondary_button_text": "text_secondary_button",
|
||||
|
||||
"account_sync_state_icon": [255, 255, 255, 204],
|
||||
|
||||
"machine_selector_printer_icon": [204, 204, 204, 255],
|
||||
|
||||
"text": [255, 255, 255, 204],
|
||||
"text": "text_default",
|
||||
"text_detail": [255, 255, 255, 172],
|
||||
"text_link": [25, 110, 240, 255],
|
||||
"text_link": "accent_1",
|
||||
"text_inactive": [255, 255, 255, 88],
|
||||
"text_hover": [255, 255, 255, 204],
|
||||
"text_scene": [255, 255, 255, 162],
|
||||
|
@ -51,7 +80,7 @@
|
|||
|
||||
"button": [39, 44, 48, 255],
|
||||
"button_hover": [39, 44, 48, 255],
|
||||
"button_text": [255, 255, 255, 197],
|
||||
"button_text": "text_default",
|
||||
"button_disabled": [39, 44, 48, 255],
|
||||
"button_disabled_text": [255, 255, 255, 101],
|
||||
|
||||
|
@ -74,28 +103,37 @@
|
|||
"tab_active_text": [255, 255, 255, 255],
|
||||
"tab_background": [39, 44, 48, 255],
|
||||
|
||||
"action_button": [39, 44, 48, 255],
|
||||
"action_button": "background_1",
|
||||
"action_button_text": [255, 255, 255, 200],
|
||||
"action_button_border": "border_main",
|
||||
"action_button_hovered": [79, 85, 89, 255],
|
||||
"action_button_disabled": [85, 85, 87, 255],
|
||||
"action_button_disabled_text": [103, 103, 104, 255],
|
||||
"action_button_hovered_text": "text_default",
|
||||
"action_button_hovered_border": "border_main",
|
||||
"action_button_active": [39, 44, 48, 30],
|
||||
"action_button_active_text": "text_default",
|
||||
"action_button_active_border": [255, 255, 255, 100],
|
||||
"action_button_disabled": "background_3",
|
||||
"action_button_disabled_text": "text_disabled",
|
||||
"action_button_disabled_border": [255, 255, 255, 30],
|
||||
|
||||
"scrollbar_background": [39, 44, 48, 0],
|
||||
"scrollbar_handle": [255, 255, 255, 105],
|
||||
"scrollbar_handle_hover": [255, 255, 255, 255],
|
||||
"scrollbar_handle_down": [255, 255, 255, 255],
|
||||
|
||||
"setting_category": [75, 80, 83, 255],
|
||||
"setting_category": "background_3",
|
||||
"setting_category_disabled": [75, 80, 83, 255],
|
||||
"setting_category_hover": [75, 80, 83, 255],
|
||||
"setting_category_hover": "background_3",
|
||||
"setting_category_text": [255, 255, 255, 152],
|
||||
"setting_category_disabled_text": [255, 255, 255, 101],
|
||||
"setting_category_active_text": [255, 255, 255, 204],
|
||||
|
||||
"setting_control": [43, 48, 52, 255],
|
||||
"setting_control_highlight": [43, 48, 52, 255],
|
||||
"setting_control": "background_2",
|
||||
"setting_control_selected": [34, 39, 42, 38],
|
||||
"setting_control_highlight": "background_3",
|
||||
"setting_control_border": [255, 255, 255, 38],
|
||||
"setting_control_border_highlight": [12, 169, 227, 255],
|
||||
"setting_control_text": [255, 255, 255, 181],
|
||||
"setting_control_text": "text_default",
|
||||
"setting_control_button": [255, 255, 255, 127],
|
||||
"setting_control_button_hover": [255, 255, 255, 204],
|
||||
"setting_control_disabled": [34, 39, 42, 255],
|
||||
|
@ -106,7 +144,7 @@
|
|||
"setting_validation_error": [212, 31, 53, 255],
|
||||
"setting_validation_warning_background": [62, 54, 46, 255],
|
||||
"setting_validation_warning": [245, 166, 35, 255],
|
||||
"setting_validation_ok": [43, 48, 52, 255],
|
||||
"setting_validation_ok": "background_2",
|
||||
|
||||
"progressbar_background": [255, 255, 255, 48],
|
||||
"progressbar_control": [255, 255, 255, 197],
|
||||
|
@ -117,19 +155,23 @@
|
|||
"slider_handle": [255, 255, 255, 255],
|
||||
"slider_handle_active": [68, 192, 255, 255],
|
||||
|
||||
"checkbox": [43, 48, 52, 255],
|
||||
"checkbox": "background_1",
|
||||
"checkbox_hover": [43, 48, 52, 255],
|
||||
"checkbox_border": [255, 255, 255, 38],
|
||||
"checkbox_border_hover": [255, 255, 255, 38],
|
||||
"checkbox_mark": [255, 255, 255, 181],
|
||||
"checkbox_text": [255, 255, 255, 181],
|
||||
"checkbox_border": "text_disabled",
|
||||
"checkbox_border_hover": "border_main",
|
||||
"checkbox_mark": "text_default",
|
||||
"checkbox_square": "text_disabled",
|
||||
"checkbox_text": "text_default",
|
||||
"checkbox_disabled": "background_2",
|
||||
|
||||
"tooltip": [39, 44, 48, 255],
|
||||
"tooltip_text": [255, 255, 255, 204],
|
||||
"category_background": "background_3",
|
||||
|
||||
"tool_panel_background": [39, 44, 48, 255],
|
||||
"tooltip": "background_2",
|
||||
"tooltip_text": "text_default",
|
||||
|
||||
"viewport_background": [31, 36, 39, 255],
|
||||
"tool_panel_background": "background_1",
|
||||
|
||||
"viewport_background": "background_1",
|
||||
"volume_outline": [12, 169, 227, 128],
|
||||
"buildplate": [169, 169, 169, 255],
|
||||
"buildplate_grid_minor": [154, 154, 155, 255],
|
||||
|
@ -153,8 +195,8 @@
|
|||
"monitor_card_background": [51, 53, 54, 255],
|
||||
"monitor_card_hover": [84, 89, 95, 255],
|
||||
|
||||
"monitor_stage_background": [30, 36, 39, 255],
|
||||
"monitor_stage_background_fade": [30, 36, 39, 102],
|
||||
"monitor_stage_background": "background_1",
|
||||
"monitor_stage_background_fade": "background_1",
|
||||
|
||||
"monitor_progress_bar_deactive": [102, 102, 102, 255],
|
||||
"monitor_progress_bar_empty": [67, 67, 67, 255],
|
||||
|
|
|
@ -170,9 +170,31 @@
|
|||
}
|
||||
},
|
||||
|
||||
"base_colors": {
|
||||
"background_1": [255, 255, 255, 255],
|
||||
"background_2": [243, 243, 243, 255],
|
||||
"background_3": [232, 240, 253, 255],
|
||||
"background_4": [3, 12, 66, 255],
|
||||
|
||||
"accent_1": [25, 110, 240, 255],
|
||||
"accent_2": [16, 70, 156, 255],
|
||||
"border_main": [212, 212, 212, 255],
|
||||
"border_accent_1": [25, 110, 240, 255],
|
||||
"border_accent_2": [16, 70, 156, 255],
|
||||
"border_field": [180, 180, 180, 255],
|
||||
|
||||
"text_default": [0, 14, 26, 255],
|
||||
"text_disabled": [180, 180, 180, 255],
|
||||
"text_primary_button": [255, 255, 255, 255],
|
||||
"text_secondary_button": [25, 110, 240, 255],
|
||||
"text_link_hover": [16, 70, 156, 255],
|
||||
"text_lighter": [108, 108, 108, 255]
|
||||
},
|
||||
|
||||
"colors": {
|
||||
"main_background": [255, 255, 255, 255],
|
||||
"detail_background": [243, 243, 243, 255],
|
||||
|
||||
"main_background": "background_1",
|
||||
"detail_background": "background_2",
|
||||
"wide_lining": [245, 245, 245, 255],
|
||||
"thick_lining": [180, 180, 180, 255],
|
||||
"lining": [192, 193, 194, 255],
|
||||
|
@ -182,18 +204,23 @@
|
|||
"primary_hover": [48, 182, 231, 255],
|
||||
"primary_text": [255, 255, 255, 255],
|
||||
"text_selection": [156, 195, 255, 127],
|
||||
"border": [127, 127, 127, 255],
|
||||
"border_field": [180, 180, 180, 255],
|
||||
"secondary": [240, 240, 240, 255],
|
||||
|
||||
"expandable_active": [240, 240, 240, 255],
|
||||
"expandable_hover": [232, 242, 252, 255],
|
||||
|
||||
"icon": [8, 7, 63, 255],
|
||||
|
||||
"primary_button": [25, 110, 240, 255],
|
||||
"primary_button": "accent_1",
|
||||
"primary_button_hover": [16, 70, 156, 255],
|
||||
"primary_button_text": [255, 255, 255, 255],
|
||||
|
||||
"secondary_button": [255, 255, 255, 255],
|
||||
"secondary_button": "background_1",
|
||||
"secondary_button_shadow": [216, 216, 216, 255],
|
||||
"secondary_button_hover": [232, 240, 253, 255],
|
||||
"secondary_button_text": [25, 110, 240, 255],
|
||||
"secondary_button_text": "accent_1",
|
||||
|
||||
"main_window_header_background": [8, 7, 63, 255],
|
||||
"main_window_header_background_gradient": [25, 23, 91, 255],
|
||||
|
@ -209,7 +236,7 @@
|
|||
|
||||
"machine_selector_printer_icon": [8, 7, 63, 255],
|
||||
|
||||
"action_panel_secondary": [25, 110, 240, 255],
|
||||
"action_panel_secondary": "accent_1",
|
||||
|
||||
"first_run_shadow": [50, 50, 50, 255],
|
||||
|
||||
|
@ -222,6 +249,7 @@
|
|||
"window_disabled_background": [0, 0, 0, 255],
|
||||
|
||||
"text": [25, 25, 25, 255],
|
||||
"text_disabled": [180, 180, 180, 255],
|
||||
"text_detail": [174, 174, 174, 128],
|
||||
"text_link": [25, 110, 240, 255],
|
||||
"text_inactive": [174, 174, 174, 255],
|
||||
|
@ -265,8 +293,8 @@
|
|||
"setting_category_disabled_text": [24, 41, 77, 101],
|
||||
"setting_category_active_text": [35, 35, 35, 255],
|
||||
|
||||
"setting_control": [255, 255, 255, 255],
|
||||
"setting_control_highlight": [255, 255, 255, 255],
|
||||
"setting_control": "background_2",
|
||||
"setting_control_highlight": "background_3",
|
||||
"setting_control_border": [199, 199, 199, 255],
|
||||
"setting_control_border_highlight": [50, 130, 255, 255],
|
||||
"setting_control_text": [35, 35, 35, 255],
|
||||
|
@ -280,7 +308,7 @@
|
|||
"setting_validation_error": [127, 127, 127, 255],
|
||||
"setting_validation_warning_background": [255, 145, 62, 255],
|
||||
"setting_validation_warning": [127, 127, 127, 255],
|
||||
"setting_validation_ok": [255, 255, 255, 255],
|
||||
"setting_validation_ok": "background_2",
|
||||
|
||||
"material_compatibility_warning": [243, 166, 59, 255],
|
||||
|
||||
|
@ -297,13 +325,15 @@
|
|||
"quality_slider_available": [0, 0, 0, 255],
|
||||
|
||||
"checkbox": [255, 255, 255, 255],
|
||||
"checkbox_hover": [255, 255, 255, 255],
|
||||
"checkbox_hover": "border_main",
|
||||
"checkbox_border": [180, 180, 180, 255],
|
||||
"checkbox_border_hover": [25, 110, 240, 255],
|
||||
"checkbox_mark": [35, 35, 35, 255],
|
||||
"checkbox_disabled": [223, 223, 223, 255],
|
||||
"checkbox_disabled": "background_2",
|
||||
"checkbox_text": [0, 12, 26, 255],
|
||||
|
||||
"category_background": "background_2",
|
||||
|
||||
"tooltip": [25, 25, 25, 255],
|
||||
"tooltip_text": [255, 255, 255, 255],
|
||||
|
||||
|
@ -397,7 +427,10 @@
|
|||
"cloud_unavailable": [153, 153, 153, 255],
|
||||
"connection_badge_background": [255, 255, 255, 255],
|
||||
"warning_badge_background": [0, 0, 0, 255],
|
||||
"error_badge_background": [255, 255, 255, 255]
|
||||
"error_badge_background": [255, 255, 255, 255],
|
||||
|
||||
"border_field_light": [180, 180, 180, 255],
|
||||
"border_main_light": [212, 212, 212, 255]
|
||||
},
|
||||
|
||||
"sizes": {
|
||||
|
@ -489,6 +522,8 @@
|
|||
"medium_button": [2.5, 2.5],
|
||||
"medium_button_icon": [2, 2],
|
||||
|
||||
"context_menu": [20, 2],
|
||||
|
||||
"favorites_row": [2, 2],
|
||||
"favorites_button": [2, 2],
|
||||
"favorites_button_icon": [1.2, 1.2],
|
||||
|
@ -519,6 +554,9 @@
|
|||
"checkbox_mark": [1, 1],
|
||||
"checkbox_radius": [0.25, 0.25],
|
||||
|
||||
"spinbox": [6.0, 3.0],
|
||||
"combobox_wide": [14, 2],
|
||||
|
||||
"tooltip": [20.0, 10.0],
|
||||
"tooltip_margins": [1.0, 1.0],
|
||||
"tooltip_arrow_margins": [2.0, 2.0],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue