This commit is contained in:
zhuzihcu
2023-03-02 12:20:16 +08:00
parent 744102e034
commit 91be0e4da2
16 changed files with 230 additions and 22 deletions

View File

@ -35,22 +35,11 @@ FluWindow {
Layout.leftMargin: 30
}
Rectangle{
color: FluApp.isDark ? "#323232" : "#FFFFFF"
radius: 4
FluTextBox{
Layout.preferredHeight: 40
Layout.fillWidth: true
height: 40
border.width: 1
border.color: FluApp.isDark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(238/255,238/255,238/255,1)
FluText{
text:"C:\\Program Files\\RustDesk"
anchors{
verticalCenter: parent.verticalCenter
left:parent.left
leftMargin: 14
}
}
text:"C:\\Program Files\\RustDesk"
readOnly:true
}
FluButton{

View File

@ -24,6 +24,10 @@ FluWindow {
text:"Buttons"
page:"qrc:/T_Buttons.qml"
}
ListElement{
text:"TextBox"
page:"qrc:/T_TextBox.qml"
}
ListElement{
text:"ToggleSwitch"
page:"qrc:/T_ToggleSwitch.qml"
@ -44,6 +48,10 @@ FluWindow {
text:"Rectangle"
page:"qrc:/T_Rectangle.qml"
}
ListElement{
text:"Awesome"
page:"qrc:/T_Awesome.qml"
}
ListElement{
text:"Typography"
page:"qrc:/T_Typography.qml"

64
example/T_Awesome.qml Normal file
View File

@ -0,0 +1,64 @@
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Window 2.15
import FluentUI 1.0
Item {
FluText{
id:title
text:"Awesome"
fontStyle: FluText.TitleLarge
}
FluTextBox{
id:text_box
placeholderText: "搜索"
anchors{
topMargin: 20
top:title.bottom
}
}
GridView{
cellWidth: 120
cellHeight: 60
clip: true
model:FluApp.awesomelist()
anchors{
topMargin: 10
top:text_box.bottom
left: parent.left
right: parent.right
bottom: parent.bottom
}
delegate: Item {
width: 120
height: 60
FluIconButton{
id:item_icon
icon:modelData.icon
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
var text ="FluentIcons."+modelData.name;
FluApp.clipText(text)
showSuccess("您复制了 "+text)
}
}
FluText {
id:item_name
font.pixelSize: 10;
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: item_icon.bottom
text: modelData.name
}
}
}
}

28
example/T_TextBox.qml Normal file
View File

@ -0,0 +1,28 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Window 2.15
import QtGraphicalEffects 1.15
import FluentUI 1.0
Item {
ColumnLayout{
spacing: 5
FluText{
text:"TextBox"
fontStyle: FluText.TitleLarge
}
FluTextBox{
Layout.topMargin: 20
placeholderText: "单行输入框"
Layout.preferredWidth: 300
}
FluMultiLineTextBox{
Layout.topMargin: 20
Layout.preferredWidth: 300
placeholderText: "多行输入框"
}
}
}

View File

@ -25,5 +25,7 @@
<file>res/svg/avatar_11.svg</file>
<file>res/svg/avatar_12.svg</file>
<file>Installer.qml</file>
<file>T_Awesome.qml</file>
<file>T_TextBox.qml</file>
</qresource>
</RCC>