diff --git a/src/Qt5/imports/FluentUI/Controls/FluContentDialog.qml b/src/Qt5/imports/FluentUI/Controls/FluContentDialog.qml index 681f30df..1a49ddad 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluContentDialog.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluContentDialog.qml @@ -102,9 +102,9 @@ FluPopup { Item{ Layout.fillWidth: true Layout.fillHeight: true - visible: control.buttonFlags&FluContentDialogType.NeutralButton FluButton{ id:neutral_btn + visible: control.buttonFlags&FluContentDialogType.NeutralButton text: neutralText width: parent.width anchors.centerIn: parent @@ -121,9 +121,9 @@ FluPopup { Item{ Layout.fillWidth: true Layout.fillHeight: true - visible: control.buttonFlags&FluContentDialogType.NegativeButton FluButton{ id:negative_btn + visible: control.buttonFlags&FluContentDialogType.NegativeButton width: parent.width anchors.centerIn: parent text: negativeText @@ -140,9 +140,9 @@ FluPopup { Item{ Layout.fillWidth: true Layout.fillHeight: true - visible: control.buttonFlags&FluContentDialogType.PositiveButton FluFilledButton{ id:positive_btn + visible: control.buttonFlags&FluContentDialogType.PositiveButton text: positiveText width: parent.width anchors.centerIn: parent diff --git a/src/Qt5/imports/FluentUI/Controls/FluPopup.qml b/src/Qt5/imports/FluentUI/Controls/FluPopup.qml index 764a4c3e..e9a9a227 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluPopup.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluPopup.qml @@ -8,7 +8,9 @@ Popup { id: popup padding: 0 modal:true - anchors.centerIn: Overlay.overlay + parent: Overlay.overlay + x: Math.round((parent.width - width) / 2) + y: Math.round((parent.height - height) / 2) closePolicy: Popup.CloseOnEscape enter: Transition { NumberAnimation { diff --git a/src/Qt6/imports/FluentUI/Controls/FluContentDialog.qml b/src/Qt6/imports/FluentUI/Controls/FluContentDialog.qml index 58e3adc8..0ca3b277 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluContentDialog.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluContentDialog.qml @@ -102,9 +102,9 @@ FluPopup { Item{ Layout.fillWidth: true Layout.fillHeight: true - visible: control.buttonFlags&FluContentDialogType.NeutralButton FluButton{ id:neutral_btn + visible: control.buttonFlags&FluContentDialogType.NeutralButton text: neutralText width: parent.width anchors.centerIn: parent @@ -121,9 +121,9 @@ FluPopup { Item{ Layout.fillWidth: true Layout.fillHeight: true - visible: control.buttonFlags&FluContentDialogType.NegativeButton FluButton{ id:negative_btn + visible: control.buttonFlags&FluContentDialogType.NegativeButton width: parent.width anchors.centerIn: parent text: negativeText @@ -140,9 +140,9 @@ FluPopup { Item{ Layout.fillWidth: true Layout.fillHeight: true - visible: control.buttonFlags&FluContentDialogType.PositiveButton FluFilledButton{ id:positive_btn + visible: control.buttonFlags&FluContentDialogType.PositiveButton text: positiveText width: parent.width anchors.centerIn: parent diff --git a/src/Qt6/imports/FluentUI/Controls/FluPopup.qml b/src/Qt6/imports/FluentUI/Controls/FluPopup.qml index 355aea92..66700ae7 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluPopup.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluPopup.qml @@ -8,7 +8,9 @@ Popup { id: popup padding: 0 modal:true - anchors.centerIn: Overlay.overlay + parent: Overlay.overlay + x: Math.round((parent.width - width) / 2) + y: Math.round((parent.height - height) / 2) closePolicy: Popup.CloseOnEscape enter: Transition { NumberAnimation {