mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 05:37:50 -06:00
Fix darkmode issues in the Workspace dialog
CURA-8688
This commit is contained in:
parent
6159ccbdc7
commit
f31b8051df
1 changed files with 239 additions and 230 deletions
|
@ -6,7 +6,7 @@ import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
|
|
||||||
import UM 1.1 as UM
|
import UM 1.5 as UM
|
||||||
import Cura 1.1 as Cura
|
import Cura 1.1 as Cura
|
||||||
|
|
||||||
UM.Dialog
|
UM.Dialog
|
||||||
|
@ -19,9 +19,7 @@ UM.Dialog
|
||||||
width: minimumWidth
|
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
|
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 comboboxHeight: UM.Theme.getSize("default_margin").height
|
||||||
property int spacerHeight: 10 * screenScaleFactor
|
|
||||||
property int doubleSpacerHeight: 20 * screenScaleFactor
|
|
||||||
|
|
||||||
onClosing: manager.notifyClosed()
|
onClosing: manager.notifyClosed()
|
||||||
onVisibleChanged:
|
onVisibleChanged:
|
||||||
|
@ -46,10 +44,6 @@ UM.Dialog
|
||||||
id: catalog
|
id: catalog
|
||||||
name: "cura"
|
name: "cura"
|
||||||
}
|
}
|
||||||
SystemPalette
|
|
||||||
{
|
|
||||||
id: palette
|
|
||||||
}
|
|
||||||
|
|
||||||
ListModel
|
ListModel
|
||||||
{
|
{
|
||||||
|
@ -68,45 +62,39 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
spacing: 2 * screenScaleFactor
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
Label
|
|
||||||
|
Column
|
||||||
{
|
{
|
||||||
id: titleLabel
|
|
||||||
text: catalog.i18nc("@action:title", "Summary - Cura Project")
|
|
||||||
font.pointSize: 18
|
|
||||||
}
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
id: separator
|
|
||||||
color: palette.text
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 1
|
height: cildrenRect.height
|
||||||
}
|
|
||||||
Item // Spacer
|
UM.Label
|
||||||
{
|
{
|
||||||
height: doubleSpacerHeight
|
id: titleLabel
|
||||||
width: height
|
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
|
width: parent.width
|
||||||
Label
|
height: childrenRect.height
|
||||||
{
|
|
||||||
text: catalog.i18nc("@action:label", "Printer settings")
|
|
||||||
font.bold: true
|
|
||||||
width: (parent.width / 3) | 0
|
|
||||||
}
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
// spacer
|
|
||||||
height: spacerHeight
|
|
||||||
width: (parent.width / 3) | 0
|
|
||||||
}
|
|
||||||
UM.TooltipArea
|
UM.TooltipArea
|
||||||
{
|
{
|
||||||
id: machineResolveStrategyTooltip
|
id: machineResolveStrategyTooltip
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
width: (parent.width / 3) | 0
|
width: (parent.width / 3) | 0
|
||||||
height: visible ? comboboxHeight : 0
|
height: visible ? comboboxHeight : 0
|
||||||
visible: base.visible && machineResolveComboBox.model.count > 1
|
visible: base.visible && machineResolveComboBox.model.count > 1
|
||||||
|
@ -157,64 +145,65 @@ UM.Dialog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Row
|
Column
|
||||||
{
|
|
||||||
width: parent.width
|
|
||||||
height: childrenRect.height
|
|
||||||
Label
|
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:label", "Type")
|
width: parent.width
|
||||||
width: (parent.width / 3) | 0
|
height: cildrenRect.height
|
||||||
}
|
|
||||||
Label
|
UM.Label
|
||||||
{
|
{
|
||||||
text: manager.machineType
|
id: printer_settings_label
|
||||||
width: (parent.width / 3) | 0
|
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
|
width: parent.width
|
||||||
height: childrenRect.height
|
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
|
UM.TooltipArea
|
||||||
{
|
{
|
||||||
id: qualityChangesResolveTooltip
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
width: (parent.width / 3) | 0
|
width: (parent.width / 3) | 0
|
||||||
height: visible ? comboboxHeight : 0
|
height: visible ? comboboxHeight : 0
|
||||||
visible: manager.qualityChangesConflict
|
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
|
width: parent.width
|
||||||
height: childrenRect.height
|
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
|
UM.TooltipArea
|
||||||
{
|
{
|
||||||
id: materialResolveTooltip
|
id: materialResolveTooltip
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
width: (parent.width / 3) | 0
|
width: (parent.width / 3) | 0
|
||||||
height: visible ? comboboxHeight : 0
|
height: visible ? comboboxHeight : 0
|
||||||
visible: manager.materialConflict
|
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
|
width: parent.width
|
||||||
delegate: Row
|
height: cildrenRect.height
|
||||||
|
|
||||||
|
UM.Label
|
||||||
|
{
|
||||||
|
text: catalog.i18nc("@action:label", "Setting visibility")
|
||||||
|
font: UM.Theme.getFont("default_bold")
|
||||||
|
}
|
||||||
|
Row
|
||||||
{
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
Label
|
UM.Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:label", "Name")
|
text: catalog.i18nc("@action:label", "Mode")
|
||||||
width: (parent.width / 3) | 0
|
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
|
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
|
Row
|
||||||
{
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
@ -418,12 +431,10 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
width: warningLabel.height
|
width: warningLabel.height
|
||||||
height: width
|
height: width
|
||||||
|
|
||||||
source: UM.Theme.getIcon("Information")
|
source: UM.Theme.getIcon("Information")
|
||||||
color: palette.text
|
color: UM.Theme.getColor("text")
|
||||||
|
|
||||||
}
|
}
|
||||||
Label
|
UM.Label
|
||||||
{
|
{
|
||||||
id: warningLabel
|
id: warningLabel
|
||||||
text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.")
|
text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.")
|
||||||
|
@ -438,13 +449,11 @@ UM.Dialog
|
||||||
rightButtons: [
|
rightButtons: [
|
||||||
Cura.TertiaryButton
|
Cura.TertiaryButton
|
||||||
{
|
{
|
||||||
id: cancel_button
|
|
||||||
text: catalog.i18nc("@action:button", "Cancel")
|
text: catalog.i18nc("@action:button", "Cancel")
|
||||||
onClicked: reject()
|
onClicked: reject()
|
||||||
},
|
},
|
||||||
Cura.PrimaryButton
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
id: ok_button
|
|
||||||
text: catalog.i18nc("@action:button", "Open")
|
text: catalog.i18nc("@action:button", "Open")
|
||||||
onClicked: accept()
|
onClicked: accept()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue