T_Rectangle.qml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. import QtQuick
  2. import QtQuick.Layouts
  3. import QtQuick.Controls
  4. import QtQuick.Window
  5. import FluentUI
  6. import "../component"
  7. FluScrollablePage{
  8. title:"Rectangle"
  9. leftPadding:10
  10. rightPadding:10
  11. bottomPadding:20
  12. spacing: 0
  13. FluArea{
  14. Layout.fillWidth: true
  15. Layout.topMargin: 20
  16. height: 480
  17. paddings: 10
  18. Column{
  19. spacing: 15
  20. anchors{
  21. verticalCenter: parent.verticalCenter
  22. left: parent.left
  23. }
  24. RowLayout{
  25. Layout.topMargin: 20
  26. FluRectangle{
  27. width: 50
  28. height: 50
  29. color:"#0078d4"
  30. radius:[0,0,0,0]
  31. }
  32. FluRectangle{
  33. width: 50
  34. height: 50
  35. color:"#744da9"
  36. radius:[15,15,15,15]
  37. }
  38. FluRectangle{
  39. width: 50
  40. height: 50
  41. color:"#ffeb3b"
  42. radius:[15,0,0,0]
  43. }
  44. FluRectangle{
  45. width: 50
  46. height: 50
  47. color:"#f7630c"
  48. radius:[0,15,0,0]
  49. }
  50. FluRectangle{
  51. width: 50
  52. height: 50
  53. color:"#e71123"
  54. radius:[0,0,15,0]
  55. }
  56. FluRectangle{
  57. width: 50
  58. height: 50
  59. color:"#b4009e"
  60. radius:[0,0,0,15]
  61. }
  62. }
  63. FluText{
  64. text:"配合图片使用"
  65. font: FluTextStyle.SubTitle
  66. Layout.topMargin: 20
  67. }
  68. RowLayout{
  69. spacing: 14
  70. FluRectangle{
  71. width: 50
  72. height: 50
  73. radius:[25,0,25,25]
  74. Image {
  75. asynchronous: true
  76. anchors.fill: parent
  77. source: "qrc:/example/res/svg/avatar_1.svg"
  78. sourceSize: Qt.size(width,height)
  79. }
  80. }
  81. FluRectangle{
  82. width: 50
  83. height: 50
  84. radius:[10,10,10,10]
  85. Image {
  86. asynchronous: true
  87. anchors.fill: parent
  88. sourceSize: Qt.size(width,height)
  89. source: "qrc:/example/res/svg/avatar_2.svg"
  90. }
  91. }
  92. FluRectangle{
  93. width: 50
  94. height: 50
  95. radius:[25,25,25,25]
  96. Image {
  97. asynchronous: true
  98. anchors.fill: parent
  99. sourceSize: Qt.size(width,height)
  100. source: "qrc:/example/res/svg/avatar_3.svg"
  101. }
  102. }
  103. FluRectangle{
  104. width: 50
  105. height: 50
  106. radius:[0,25,25,25]
  107. Image {
  108. asynchronous: true
  109. anchors.fill: parent
  110. sourceSize: Qt.size(width,height)
  111. source: "qrc:/example/res/svg/avatar_4.svg"
  112. }
  113. }
  114. }
  115. FluRectangle{
  116. width: 1080/5
  117. height: 1439/5
  118. radius:[25,25,25,25]
  119. Image {
  120. asynchronous: true
  121. source: "qrc:/example/res/image/image_huoyin.webp"
  122. anchors.fill: parent
  123. sourceSize: Qt.size(width,height)
  124. }
  125. Layout.topMargin: 10
  126. }
  127. }
  128. }
  129. CodeExpander{
  130. Layout.fillWidth: true
  131. Layout.topMargin: -1
  132. code:'FluRectangle{
  133. radius: [25,25,25,25]
  134. width: 50
  135. height: 50
  136. Image{
  137. asynchronous: true
  138. anchors.fill: parent
  139. source: "qrc:/example/res/svg/avatar_4.svg"
  140. sourceSize: Qt.size(width,height)
  141. }
  142. }'
  143. }
  144. }