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:
authorKostas Karmas <konskarm@gmail.com>2020-08-21 15:50:00 +0300
committerKostas Karmas <konskarm@gmail.com>2020-08-21 15:50:00 +0300
commit4e87f37791a4e472f421bab011f68f07d86b8c94 (patch)
tree106008c376755bb5f9d394a1741d3bff40a502f8 /plugins/3MFReader
parent37855e7d19cf690b0666477e4d24a43f20c35b7a (diff)
Fix visual issues with long labels in the open project dialog
The following issues are fixed: * Printer/Quality/Material names will be wrapped if they are too long * The width of the window is determined based on the content of the dialog. With that there will not longer be overlap between the dialog content and the buttons.
Diffstat (limited to 'plugins/3MFReader')
-rw-r--r--plugins/3MFReader/WorkspaceDialog.qml27
1 files changed, 22 insertions, 5 deletions
diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml
index 5f67f54c39..685d15308b 100644
--- a/plugins/3MFReader/WorkspaceDialog.qml
+++ b/plugins/3MFReader/WorkspaceDialog.qml
@@ -16,7 +16,7 @@ UM.Dialog
minimumWidth: UM.Theme.getSize("popup_dialog").width
minimumHeight: UM.Theme.getSize("popup_dialog").height
width: minimumWidth
- height: minimumHeight
+ 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
@@ -35,7 +35,9 @@ UM.Dialog
Item
{
- anchors.fill: parent
+ id: dialogSummaryItem
+ width: parent.width
+ height: childrenRect.height
anchors.margins: 10 * screenScaleFactor
UM.I18nCatalog
@@ -63,7 +65,8 @@ UM.Dialog
Column
{
- anchors.fill: parent
+ width: parent.width
+ height: childrenRect.height
spacing: 2 * screenScaleFactor
Label
{
@@ -182,6 +185,7 @@ UM.Dialog
{
text: manager.machineName
width: (parent.width / 3) | 0
+ wrapMode: Text.WordWrap
}
}
@@ -239,6 +243,7 @@ UM.Dialog
{
text: manager.qualityName
width: (parent.width / 3) | 0
+ wrapMode: Text.WordWrap
}
}
Row
@@ -254,6 +259,7 @@ UM.Dialog
{
text: manager.intentName
width: (parent.width / 3) | 0
+ wrapMode: Text.WordWrap
}
}
Row
@@ -285,6 +291,7 @@ UM.Dialog
{
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
}
@@ -346,6 +353,7 @@ UM.Dialog
{
text: modelData
width: (parent.width / 3) | 0
+ wrapMode: Text.WordWrap
}
}
}
@@ -419,6 +427,14 @@ UM.Dialog
}
}
}
+ }
+ Item
+ {
+ id: buttonsItem
+ width: parent.width
+ height: childrenRect.height
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
Button
{
id: cancel_button
@@ -432,13 +448,14 @@ UM.Dialog
Button
{
id: ok_button
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
text: catalog.i18nc("@action:button","Open");
onClicked: { manager.closeBackend(); manager.onOkButtonClicked() }
- anchors.bottom: parent.bottom
- anchors.right: parent.right
}
}
+
function accept() {
manager.closeBackend();
manager.onOkButtonClicked();