MenuBar.qml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (C) 2017 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. // Qt-Security score:significant reason:default
  4. import QtQuick
  5. import QtQuick.Templates as T
  6. import QtQuick.Controls.impl
  7. import QtQuick.Controls.Universal
  8. T.MenuBar {
  9. id: control
  10. implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
  11. implicitContentWidth + leftPadding + rightPadding)
  12. implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
  13. implicitContentHeight + topPadding + bottomPadding)
  14. topPadding: SafeArea.margins.top
  15. leftPadding: SafeArea.margins.left
  16. rightPadding: SafeArea.margins.right
  17. bottomPadding: SafeArea.margins.bottom
  18. delegate: MenuBarItem { }
  19. contentItem: Row {
  20. spacing: control.spacing
  21. Repeater {
  22. model: control.contentModel
  23. }
  24. }
  25. background: Rectangle {
  26. implicitHeight: 40
  27. color: control.Universal.chromeMediumColor
  28. }
  29. }