Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcasper <c.lamboo@ultimaker.com>2022-02-28 17:59:56 +0300
committercasper <c.lamboo@ultimaker.com>2022-02-28 17:59:56 +0300
commitf31b8051df321369ca47f279e0db49275c8ceb13 (patch)
tree1c0990b38a502274b27d0940e50721e4ba2f8f29 /plugins/3MFReader/WorkspaceDialog.qml
parent6159ccbdc791f628260d416f56cc0076c8fff824 (diff)
Fix darkmode issues in the Workspace dialog
CURA-8688
Diffstat (limited to 'plugins/3MFReader/WorkspaceDialog.qml')
-rw-r--r--plugins/3MFReader/WorkspaceDialog.qml455
1 files changed, 232 insertions, 223 deletions
diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml
index 781c12ad84..898b1ea993 100644
--- a/plugins/3MFReader/WorkspaceDialog.qml
+++ b/plugins/3MFReader/WorkspaceDialog.qml
@@ -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
- {
- 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
- }
+ spacing: UM.Theme.getSize("default_margin").height
- Row
+ Column
{
- height: childrenRect.height
width: parent.width
- Label
+ height: cildrenRect.height
+
+ UM.Label
{
- text: catalog.i18nc("@action:label", "Printer settings")
- font.bold: true
- width: (parent.width / 3) | 0
+ id: titleLabel
+ text: catalog.i18nc("@action:title", "Summary - Cura Project")
+ font: UM.Theme.getFont("large")
}
- Item
+
+ Rectangle
{
- // spacer
- height: spacerHeight
- width: (parent.width / 3) | 0
+ id: separator
+ color: UM.Theme.getColor("text")
+ width: parent.width
+ height: UM.Theme.getSize("default_lining").height
}
+ }
+
+ Item
+ {
+ width: parent.width
+ 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
- {
- text: catalog.i18nc("@action:label", "Type")
- width: (parent.width / 3) | 0
- }
- Label
+
+ Column
{
- 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
}
}
}
- }
- Row
- {
- 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
+
+ Column
{
- text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings)
- width: (parent.width / 3) | 0
+ 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
+ }
+ }
}
- visible: manager.numUserSettings != 0
}
- Row
+
+ Item
{
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
}
}
}
- }
- Repeater
- {
- model: manager.materialLabels
- delegate: Row
+ Column
{
width: parent.width
- height: childrenRect.height
- Label
+ height: cildrenRect.height
+ Row
{
- text: catalog.i18nc("@action:label", "Name")
- width: (parent.width / 3) | 0
+ 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
+ }
}
- Label
+
+ Repeater
{
- text: modelData
- width: (parent.width / 3) | 0
- wrapMode: Text.WordWrap
+ 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
+ }
+ }
}
}
}
- Item // Spacer
- {
- height: doubleSpacerHeight
- width: height
- }
-
- Label
- {
- text: catalog.i18nc("@action:label", "Setting visibility")
- font.bold: true
- }
- Row
+ Column
{
width: parent.width
- height: childrenRect.height
- Label
+ height: cildrenRect.height
+
+ UM.Label
{
- text: catalog.i18nc("@action:label", "Mode")
- width: (parent.width / 3) | 0
+ text: catalog.i18nc("@action:label", "Setting visibility")
+ font: UM.Theme.getFont("default_bold")
}
- Label
+ Row
{
- 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
+ width: parent.width
+ height: childrenRect.height
+ UM.Label
+ {
+ text: catalog.i18nc("@action:label", "Mode")
+ width: (parent.width / 3) | 0
+ }
+ UM.Label
+ {
+ text: manager.activeMode
+ width: (parent.width / 3) | 0
+ }
}
- Label
+ Row
{
- text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings)
- width: (parent.width / 3) | 0
+ 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
+ }
}
}
- 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.")
@@ -438,13 +449,11 @@ UM.Dialog
rightButtons: [
Cura.TertiaryButton
{
- id: cancel_button
text: catalog.i18nc("@action:button", "Cancel")
onClicked: reject()
},
Cura.PrimaryButton
{
- id: ok_button
text: catalog.i18nc("@action:button", "Open")
onClicked: accept()
}