From 9b06849955bc30b2ab552d06845fa6f8fa93d0f6 Mon Sep 17 00:00:00 2001 From: casper Date: Thu, 24 Feb 2022 15:43:22 +0100 Subject: [PATCH] Let the content of the color dialog determine the size of the dialog CURA-8938 --- resources/qml/ColorDialog.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/qml/ColorDialog.qml b/resources/qml/ColorDialog.qml index afb7b324a3..1f83f0ceda 100644 --- a/resources/qml/ColorDialog.qml +++ b/resources/qml/ColorDialog.qml @@ -17,7 +17,14 @@ UM.Dialog property variant catalog: UM.I18nCatalog { name: "cura" } - margin: UM.Theme.getSize("wide_margin").width + // 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 + 2 * margin + minimumHeight: + content.height // content height + + buttonRow.height // button row height + + 3 * margin // top and bottom margin and margin between buttons and content property alias color: colorInput.text property var swatchColors: [