Label.qml 990 B

12345678910111213141516171819202122232425262728293031
  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.Imagine
  7. import QtQuick.Controls.Imagine.impl
  8. T.Label {
  9. id: control
  10. topInset: background ? -background.topInset || 0 : 0
  11. leftInset: background ? -background.leftInset || 0 : 0
  12. rightInset: background ? -background.rightInset || 0 : 0
  13. bottomInset: background ? -background.bottomInset || 0 : 0
  14. color: control.palette.windowText
  15. linkColor: control.palette.link
  16. background: NinePatchImage {
  17. source: Imagine.url + "label-background"
  18. NinePatchImageSelector on source {
  19. states: [
  20. {"disabled": !control.enabled},
  21. {"mirrored": control.mirrored},
  22. {"hovered": control.enabled && control.hovered}
  23. ]
  24. }
  25. }
  26. }