From f4bf830ae7af5979255b383920980bf4d3a4b251 Mon Sep 17 00:00:00 2001 From: Khushboo-dev-cpp <60327365+Khushboo-dev-cpp@users.noreply.github.com> Date: Wed, 3 Aug 2022 09:27:28 +0200 Subject: [PATCH] feat(StatusDialog): Add DIalog Background componentto make the dialog background customizable (#809) --- src/StatusQ/Popups/Dialog/StatusDialog.qml | 5 +---- src/StatusQ/Popups/Dialog/StatusDialogBackground.qml | 7 +++++++ src/StatusQ/Popups/Dialog/qmldir | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 src/StatusQ/Popups/Dialog/StatusDialogBackground.qml diff --git a/src/StatusQ/Popups/Dialog/StatusDialog.qml b/src/StatusQ/Popups/Dialog/StatusDialog.qml index ffd3a717..feed4032 100644 --- a/src/StatusQ/Popups/Dialog/StatusDialog.qml +++ b/src/StatusQ/Popups/Dialog/StatusDialog.qml @@ -22,10 +22,7 @@ Dialog { color: Theme.palette.backdropColor } - background: Rectangle { - color: Theme.palette.statusModal.backgroundColor - radius: 8 - } + background: StatusDialogBackground {} header: StatusDialogHeader { visible: root.title diff --git a/src/StatusQ/Popups/Dialog/StatusDialogBackground.qml b/src/StatusQ/Popups/Dialog/StatusDialogBackground.qml new file mode 100644 index 00000000..1da98cda --- /dev/null +++ b/src/StatusQ/Popups/Dialog/StatusDialogBackground.qml @@ -0,0 +1,7 @@ +import QtQuick 2.14 +import StatusQ.Core.Theme 0.1 + +Rectangle { + color: Theme.palette.statusModal.backgroundColor + radius: 8 +} diff --git a/src/StatusQ/Popups/Dialog/qmldir b/src/StatusQ/Popups/Dialog/qmldir index f06e149e..a2e232eb 100644 --- a/src/StatusQ/Popups/Dialog/qmldir +++ b/src/StatusQ/Popups/Dialog/qmldir @@ -6,3 +6,4 @@ StatusDialogFooter 0.1 StatusDialogFooter.qml StatusDialogHeader 0.1 StatusDialogHeader.qml StatusHeaderActions 0.1 StatusHeaderActions.qml StatusTitleSubtitle 0.1 StatusTitleSubtitle.qml +StatusDialogBackground 0.1 StatusDialogBackground.qml