T_Typography.qml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import QtQuick
  2. import QtQuick.Layouts
  3. import QtQuick.Controls
  4. import FluentUI
  5. FluContentPage {
  6. title: "Typography"
  7. property real textScale: 1
  8. leftPadding:10
  9. rightPadding:10
  10. bottomPadding:20
  11. Component.onCompleted: {
  12. slider.seek(0)
  13. }
  14. FluArea{
  15. anchors{
  16. top:parent.top
  17. left: parent.left
  18. right: parent.right
  19. bottom: parent.bottom
  20. topMargin: 20
  21. }
  22. paddings: 10
  23. ColumnLayout{
  24. spacing: 0
  25. scale: textScale
  26. transformOrigin: Item.TopLeft
  27. FluText{
  28. id:text_Display
  29. text:"Display"
  30. padding: 0
  31. font: FluTextStyle.Display
  32. }
  33. FluText{
  34. id:text_TitleLarge
  35. text:"Title Large"
  36. padding: 0
  37. font: FluTextStyle.TitleLarge
  38. }
  39. FluText{
  40. id:text_Title
  41. text:"Title"
  42. padding: 0
  43. font: FluTextStyle.Title
  44. }
  45. FluText{
  46. id:text_Subtitle
  47. text:"Subtitle"
  48. padding: 0
  49. font: FluTextStyle.Subtitle
  50. }
  51. FluText{
  52. id:text_BodyStrong
  53. text:"Body Strong"
  54. padding: 0
  55. font: FluTextStyle.BodyStrong
  56. }
  57. FluText{
  58. id:text_Body
  59. text:"Body"
  60. padding: 0
  61. font: FluTextStyle.Body
  62. }
  63. FluText{
  64. id:text_Caption
  65. text:"Caption"
  66. padding: 0
  67. font: FluTextStyle.Caption
  68. }
  69. }
  70. FluSlider{
  71. id:slider
  72. vertical:true
  73. anchors{
  74. right: parent.right
  75. rightMargin: 45
  76. top: parent.top
  77. topMargin: 30
  78. }
  79. onValueChanged:{
  80. textScale = 1+value/100
  81. }
  82. }
  83. }
  84. }