From cac9d67352ae0613fe3ddadad76230c46666d042 Mon Sep 17 00:00:00 2001 From: Joey de l'Arago Date: Tue, 15 Nov 2022 13:49:55 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Casper Lamboo --- plugins/3MFReader/WorkspaceRow.qml | 4 ++-- plugins/3MFReader/WorkspaceSection.qml | 2 +- plugins/PrepareStage/PrepareMenu.qml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/3MFReader/WorkspaceRow.qml b/plugins/3MFReader/WorkspaceRow.qml index 72cea7b5bd..8d9f1f25b3 100644 --- a/plugins/3MFReader/WorkspaceRow.qml +++ b/plugins/3MFReader/WorkspaceRow.qml @@ -21,14 +21,14 @@ Row { id: leftLabel text: catalog.i18nc("@action:label", "Type") - width: (parent.width / 4) | 0 + width: Math.round(parent.width / 4) wrapMode: Text.WordWrap } UM.Label { id: rightLabel text: manager.machineType - width: (parent.width / 3) | 0 + width: Math.round(parent.width / 3) wrapMode: Text.WordWrap } } \ No newline at end of file diff --git a/plugins/3MFReader/WorkspaceSection.qml b/plugins/3MFReader/WorkspaceSection.qml index b11cc04cd7..6eb8f50bdf 100644 --- a/plugins/3MFReader/WorkspaceSection.qml +++ b/plugins/3MFReader/WorkspaceSection.qml @@ -50,7 +50,7 @@ Item Item { id: comboboxTooltip - width: (parent.width / 2.5) | 0 + width: Math.round(parent.width / 2.5) height: visible ? UM.Theme.getSize("default_margin").height : 0 anchors.top: parent.top anchors.right: parent.right diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index 12db91635b..ab9b9b1b3d 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -91,7 +91,7 @@ Item fixedWidthMode: true // The maximum width of the button is half of the total space, minus the padding of the parent, the right // padding of the component and half the spacing because of the space between buttons. - width: parent.width / 2 - rightPadding * 1.5 + width: Math.round(parent.width / 2 - rightPadding * 1.5) onClicked: { machineSelection.toggleContent()