MenuBar.qml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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.Material
  8. import QtQuick.Controls.Material.impl
  9. T.MenuBar {
  10. id: control
  11. implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
  12. implicitContentWidth + leftPadding + rightPadding)
  13. implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
  14. implicitContentHeight + topPadding + bottomPadding)
  15. topPadding: SafeArea.margins.top
  16. leftPadding: SafeArea.margins.left
  17. rightPadding: SafeArea.margins.right
  18. bottomPadding: SafeArea.margins.bottom
  19. delegate: MenuBarItem { }
  20. contentItem: Row {
  21. spacing: control.spacing
  22. Repeater {
  23. model: control.contentModel
  24. }
  25. }
  26. background: Rectangle {
  27. implicitHeight: 40
  28. color: control.Material.dialogColor
  29. }
  30. }