InsetSection.qml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // Copyright (C) 2020 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 HelperWidgets
  6. import QtQuick.Layouts
  7. Section {
  8. caption: qsTr("Inset")
  9. SectionLayout {
  10. Label {
  11. text: qsTr("Vertical")
  12. }
  13. SecondColumnLayout {
  14. Label {
  15. text: qsTr("Top")
  16. tooltip: qsTr("Top inset for the background.")
  17. width: 42
  18. }
  19. SpinBox {
  20. maximumValue: 10000
  21. minimumValue: -10000
  22. realDragRange: 5000
  23. decimals: 0
  24. backendValue: backendValues.topInset
  25. Layout.fillWidth: true
  26. }
  27. Item {
  28. width: 4
  29. height: 4
  30. }
  31. Label {
  32. text: qsTr("Bottom")
  33. tooltip: qsTr("Bottom inset for the background.")
  34. width: 42
  35. }
  36. SpinBox {
  37. maximumValue: 10000
  38. minimumValue: -10000
  39. realDragRange: 5000
  40. decimals: 0
  41. backendValue: backendValues.bottomInset
  42. Layout.fillWidth: true
  43. }
  44. }
  45. Label {
  46. text: qsTr("Horizontal")
  47. }
  48. SecondColumnLayout {
  49. Label {
  50. text: qsTr("Left")
  51. tooltip: qsTr("Left inset for the background.")
  52. width: 42
  53. }
  54. SpinBox {
  55. maximumValue: 10000
  56. minimumValue: -10000
  57. realDragRange: 5000
  58. decimals: 0
  59. backendValue: backendValues.leftInset
  60. Layout.fillWidth: true
  61. }
  62. Item {
  63. width: 4
  64. height: 4
  65. }
  66. Label {
  67. text: qsTr("Right")
  68. tooltip: qsTr("Right inset for the background.")
  69. width: 42
  70. }
  71. SpinBox {
  72. maximumValue: 10000
  73. minimumValue: -10000
  74. realDragRange: 5000
  75. decimals: 0
  76. backendValue: backendValues.rightInset
  77. Layout.fillWidth: true
  78. }
  79. }
  80. }
  81. }