mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-30 15:54:32 +08:00
Fix size of ColorDialog
CURA-9997
This commit is contained in:
parent
6ead64049b
commit
7e8eca3b03
@ -28,8 +28,11 @@ UM.Dialog
|
|||||||
// however with the current implementation of the dialog this is not possible, so instead we calculate
|
// however with the current implementation of the dialog this is not possible, so instead we calculate
|
||||||
// the size of the dialog ourselves.
|
// the size of the dialog ourselves.
|
||||||
// Ugly workaround for windows having overlapping elements due to incorrect dialog width
|
// Ugly workaround for windows having overlapping elements due to incorrect dialog width
|
||||||
minimumWidth: content.width + (Qt.platform.os == "windows" ? 4 * margin : 2 * margin)
|
minimumWidth: content.width + (Qt.platform.os === "windows" ? 4 * margin : 2 * margin)
|
||||||
minimumHeight: content.height + footer.height + (Qt.platform.os == "windows" ? 5 * margin : 3 * margin)
|
minimumHeight: {
|
||||||
|
const footerHeight = Math.max(okButton.height, cancelButton.height);
|
||||||
|
return content.height + footerHeight + (Qt.platform.os === "windows" ? 5 * margin : 3 * margin);
|
||||||
|
}
|
||||||
|
|
||||||
property alias color: colorInput.text
|
property alias color: colorInput.text
|
||||||
property var swatchColors: [
|
property var swatchColors: [
|
||||||
@ -136,10 +139,12 @@ UM.Dialog
|
|||||||
rightButtons:
|
rightButtons:
|
||||||
[
|
[
|
||||||
Cura.TertiaryButton {
|
Cura.TertiaryButton {
|
||||||
|
id: cancelButton
|
||||||
text: catalog.i18nc("@action:button", "Cancel")
|
text: catalog.i18nc("@action:button", "Cancel")
|
||||||
onClicked: base.close()
|
onClicked: base.close()
|
||||||
},
|
},
|
||||||
Cura.PrimaryButton {
|
Cura.PrimaryButton {
|
||||||
|
id: okButton
|
||||||
text: catalog.i18nc("@action:button", "OK")
|
text: catalog.i18nc("@action:button", "OK")
|
||||||
onClicked: base.accept()
|
onClicked: base.accept()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user