TabBar.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. T.TabBar {
  7. id: control
  8. implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
  9. implicitContentWidth + leftPadding + rightPadding)
  10. implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
  11. implicitContentHeight + topPadding + bottomPadding)
  12. spacing: 1
  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: 0
  22. highlightRangeMode: ListView.ApplyRange
  23. preferredHighlightBegin: 40
  24. preferredHighlightEnd: width - 40
  25. }
  26. background: Rectangle {
  27. color: control.palette.window
  28. }
  29. }