SplitView.qml 1.1 KB

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.SplitView {
  9. id: control
  10. implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
  11. implicitContentWidth + leftPadding + rightPadding)
  12. implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
  13. implicitContentHeight + topPadding + bottomPadding)
  14. handle: NinePatchImage {
  15. source: Imagine.url + "splitview-handle"
  16. NinePatchImageSelector on source {
  17. states: [
  18. {"vertical": control.orientation === Qt.Vertical},
  19. {"horizontal":control.orientation === Qt.Horizontal},
  20. {"disabled": !control.enabled},
  21. {"pressed": T.SplitHandle.pressed},
  22. {"mirrored": control.mirrored},
  23. {"hovered": T.SplitHandle.hovered}
  24. ]
  25. }
  26. }
  27. }