diff options
author | Remco Burema <41987080+rburema@users.noreply.github.com> | 2022-03-16 17:29:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 17:29:32 +0300 |
commit | f4e57b82f83391f96cd2918124046bfd2e9bf1b9 (patch) | |
tree | d37ad4c553e082d8922c0ac0dc66273b7292f178 | |
parent | 51752d162c192625ec8f35fd4773640ec2dd18f4 (diff) | |
parent | 8a182b1f3f2d6ad510ee30a8a61c56ad36035e47 (diff) |
Merge pull request #11664 from Ultimaker/CURA-8921
[CURA-8921] Workaround for windows not giving dialogs the correct width.
-rw-r--r-- | resources/qml/ColorDialog.qml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/resources/qml/ColorDialog.qml b/resources/qml/ColorDialog.qml index 3818ea5cb4..6877ef34b6 100644 --- a/resources/qml/ColorDialog.qml +++ b/resources/qml/ColorDialog.qml @@ -24,13 +24,9 @@ UM.Dialog // In this case we would like to let the content of the dialog determine the size of the dialog // however with the current implementation of the dialog this is not possible, so instead we calculate // the size of the dialog ourselves. - minimumWidth: content.width + 4 * margin - minimumHeight: - content.height // content height - + buttonRow.height // button row height - + 5 * margin // top and bottom margin and margin between buttons and content - width: minimumWidth - height: minimumHeight + // Ugly workaround for windows having overlapping elements due to incorrect dialog width + minimumWidth: content.width + (Qt.platform.os == "windows" ? 4 * margin : 2 * margin) + minimumHeight: content.height + buttonRow.height + (Qt.platform.os == "windows" ? 5 * margin : 3 * margin) property alias color: colorInput.text property var swatchColors: [ |