SelectionRectangle.qml 835 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2021 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.Controls.impl
  6. import QtQuick.Shapes
  7. import QtQuick.Templates as T
  8. T.SelectionRectangle {
  9. id: control
  10. topLeftHandle: Handle {}
  11. bottomRightHandle: Handle {}
  12. component Handle : Rectangle {
  13. id: handle
  14. width: 28
  15. height: width
  16. radius: width / 2
  17. color: SelectionRectangle.dragging ? control.palette.light : control.palette.window
  18. border.width: 1
  19. border.color: control.enabled ? control.palette.mid : control.palette.midlight
  20. visible: SelectionRectangle.control.active
  21. property Item control: SelectionRectangle.control
  22. }
  23. }