diff options
Diffstat (limited to 'src/quickcontrols/macos/DialogButtonBox.qml')
-rw-r--r-- | src/quickcontrols/macos/DialogButtonBox.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/quickcontrols/macos/DialogButtonBox.qml b/src/quickcontrols/macos/DialogButtonBox.qml new file mode 100644 index 0000000000..b99de3354c --- /dev/null +++ b/src/quickcontrols/macos/DialogButtonBox.qml @@ -0,0 +1,40 @@ +// Copyright (C) 2022 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.Templates as T +import QtQuick.Controls.impl + +T.DialogButtonBox { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + contentHeight + topPadding + bottomPadding) + + spacing: 6 + padding: 6 + alignment: Qt.AlignRight + + delegate: Button { } + + contentItem: ListView { + implicitWidth: contentWidth + model: control.contentModel + spacing: control.spacing + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + snapMode: ListView.SnapToItem + } + + background: Rectangle { + x: 1 + y: 1 + implicitHeight: 32 + width: parent.width - 2 + height: parent.height - 2 + color: control.palette.window + radius: 2 + } +} |