diff options
Diffstat (limited to 'src/quickcontrols/windows/MenuBar.qml')
-rw-r--r-- | src/quickcontrols/windows/MenuBar.qml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/quickcontrols/windows/MenuBar.qml b/src/quickcontrols/windows/MenuBar.qml new file mode 100644 index 0000000000..ec998abde7 --- /dev/null +++ b/src/quickcontrols/windows/MenuBar.qml @@ -0,0 +1,35 @@ +// Copyright (C) 2024 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.MenuBar { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + contentHeight + topPadding + bottomPadding) + + leftPadding: 3 + rightPadding: 3 + topPadding: 3 + bottomPadding: 3 + spacing: 10 + + delegate: MenuBarItem { } + + contentItem: Row { + spacing: control.spacing + Repeater { + model: control.contentModel + } + } + + background: Rectangle { + implicitHeight: 20 + color: "white" // window title bar color + } +} |