TabBar.qml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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.Universal
  7. T.TabBar {
  8. id: control
  9. implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
  10. implicitContentWidth + leftPadding + rightPadding)
  11. implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
  12. implicitContentHeight + topPadding + bottomPadding)
  13. contentItem: ListView {
  14. model: control.contentModel
  15. currentIndex: control.currentIndex
  16. spacing: control.spacing
  17. orientation: ListView.Horizontal
  18. boundsBehavior: Flickable.StopAtBounds
  19. flickableDirection: Flickable.AutoFlickIfNeeded
  20. snapMode: ListView.SnapToItem
  21. highlightMoveDuration: 100
  22. highlightRangeMode: ListView.ApplyRange
  23. preferredHighlightBegin: 48
  24. preferredHighlightEnd: width - 48
  25. }
  26. background: Rectangle {
  27. implicitWidth: 200
  28. implicitHeight: 48
  29. color: control.Universal.background
  30. }
  31. }