diff options
Diffstat (limited to 'src/quickcontrols/basic/Popup.qml')
-rw-r--r-- | src/quickcontrols/basic/Popup.qml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/quickcontrols/basic/Popup.qml b/src/quickcontrols/basic/Popup.qml new file mode 100644 index 0000000000..f4b787c311 --- /dev/null +++ b/src/quickcontrols/basic/Popup.qml @@ -0,0 +1,30 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +import QtQuick +import QtQuick.Controls.impl +import QtQuick.Templates as T + +T.Popup { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + contentHeight + topPadding + bottomPadding) + + padding: 12 + + background: Rectangle { + color: control.palette.window + border.color: control.palette.dark + } + + T.Overlay.modal: Rectangle { + color: Color.transparent(control.palette.shadow, 0.5) + } + + T.Overlay.modeless: Rectangle { + color: Color.transparent(control.palette.shadow, 0.12) + } +} |