DayOfWeekRow.qml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (C) 2022 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.AbstractDayOfWeekRow {
  7. id: control
  8. implicitWidth: Math.max(background ? background.implicitWidth : 0,
  9. contentItem.implicitWidth + leftPadding + rightPadding)
  10. implicitHeight: Math.max(background ? background.implicitHeight : 0,
  11. contentItem.implicitHeight + topPadding + bottomPadding)
  12. spacing: 6
  13. topPadding: 6
  14. bottomPadding: 6
  15. font.bold: true
  16. //! [delegate]
  17. delegate: Text {
  18. text: shortName
  19. font: control.font
  20. color: control.palette.text
  21. horizontalAlignment: Text.AlignHCenter
  22. verticalAlignment: Text.AlignVCenter
  23. required property string shortName
  24. }
  25. //! [delegate]
  26. //! [contentItem]
  27. contentItem: Row {
  28. spacing: control.spacing
  29. Repeater {
  30. model: control.source
  31. delegate: control.delegate
  32. }
  33. }
  34. //! [contentItem]
  35. }