FluentUI/example/qml/page/T_Typography.qml

84 lines
2.0 KiB
QML
Raw Normal View History

2023-08-24 15:50:37 +08:00
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import FluentUI 1.0
2023-02-26 23:47:07 +08:00
2023-03-10 18:08:32 +08:00
FluContentPage {
2023-03-09 23:11:59 +08:00
2023-05-10 00:27:53 +08:00
property real textScale: 1
2023-05-11 18:24:58 +08:00
2024-03-09 15:35:48 +08:00
title: qsTr("Typography")
2023-05-16 12:49:20 +08:00
rightPadding: 10
2023-03-09 23:11:59 +08:00
2024-03-29 16:56:09 +08:00
FluFrame{
2023-04-06 17:32:21 +08:00
anchors{
top:parent.top
left: parent.left
right: parent.right
bottom: parent.bottom
}
2024-03-29 16:23:16 +08:00
padding: 10
2023-03-06 18:08:01 +08:00
ColumnLayout{
2023-03-09 23:11:59 +08:00
spacing: 0
2023-05-10 00:27:53 +08:00
scale: textScale
transformOrigin: Item.TopLeft
2023-03-06 18:08:01 +08:00
FluText{
2023-05-10 00:27:53 +08:00
id:text_Display
2023-03-06 18:08:01 +08:00
text:"Display"
2023-03-09 23:11:59 +08:00
padding: 0
2023-05-10 00:27:53 +08:00
font: FluTextStyle.Display
2023-03-06 18:08:01 +08:00
}
FluText{
2023-05-10 00:27:53 +08:00
id:text_TitleLarge
2023-03-06 18:08:01 +08:00
text:"Title Large"
2023-03-09 23:11:59 +08:00
padding: 0
2023-05-10 00:27:53 +08:00
font: FluTextStyle.TitleLarge
2023-03-06 18:08:01 +08:00
}
FluText{
2023-05-10 00:27:53 +08:00
id:text_Title
2023-03-06 18:08:01 +08:00
text:"Title"
2023-03-09 23:11:59 +08:00
padding: 0
2023-05-10 00:27:53 +08:00
font: FluTextStyle.Title
2023-03-06 18:08:01 +08:00
}
FluText{
2023-05-10 00:27:53 +08:00
id:text_Subtitle
2023-03-06 18:08:01 +08:00
text:"Subtitle"
2023-03-09 23:11:59 +08:00
padding: 0
2023-05-10 00:27:53 +08:00
font: FluTextStyle.Subtitle
2023-03-06 18:08:01 +08:00
}
FluText{
2023-05-10 00:27:53 +08:00
id:text_BodyStrong
2023-03-06 18:08:01 +08:00
text:"Body Strong"
2023-03-09 23:11:59 +08:00
padding: 0
2023-05-10 00:27:53 +08:00
font: FluTextStyle.BodyStrong
2023-03-06 18:08:01 +08:00
}
FluText{
2023-05-10 00:27:53 +08:00
id:text_Body
2023-03-06 18:08:01 +08:00
text:"Body"
2023-03-09 23:11:59 +08:00
padding: 0
2023-05-10 00:27:53 +08:00
font: FluTextStyle.Body
2023-03-06 18:08:01 +08:00
}
FluText{
2023-05-10 00:27:53 +08:00
id:text_Caption
2023-03-06 18:08:01 +08:00
text:"Caption"
2023-03-09 23:11:59 +08:00
padding: 0
2023-05-10 00:27:53 +08:00
font: FluTextStyle.Caption
2023-03-06 18:08:01 +08:00
}
2023-02-26 23:47:07 +08:00
}
2023-03-09 23:11:59 +08:00
2023-04-06 17:32:21 +08:00
FluSlider{
id:slider
2023-06-19 09:50:11 +08:00
orientation: Qt.Vertical
2023-04-06 17:32:21 +08:00
anchors{
right: parent.right
rightMargin: 45
top: parent.top
topMargin: 30
}
onValueChanged:{
2023-05-10 00:27:53 +08:00
textScale = 1+value/100
2023-04-06 17:32:21 +08:00
}
2023-03-09 23:11:59 +08:00
}
}
2023-02-26 23:47:07 +08:00
}