FluentUI/example/qml/page/T_Acrylic.qml

65 lines
1.4 KiB
QML
Raw Normal View History

2023-05-22 16:17:51 +08:00
import QtQuick
2023-05-12 19:26:49 +08:00
import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls
import FluentUI
import "../component"
FluScrollablePage{
title:"Acrylic"
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
2023-05-12 22:22:55 +08:00
height: 1200/5+20
2023-05-12 19:26:49 +08:00
paddings: 10
FluRectangle{
2023-05-12 22:22:55 +08:00
width: 1920/5
height: 1200/5
radius:[15,15,15,15]
2023-05-12 19:26:49 +08:00
Image {
2023-05-14 13:05:06 +08:00
id:image
2023-05-12 19:26:49 +08:00
asynchronous: true
2023-05-12 22:22:55 +08:00
source: "qrc:/example/res/image/banner_3.jpg"
2023-05-12 19:26:49 +08:00
anchors.fill: parent
2023-05-17 11:42:03 +08:00
sourceSize: Qt.size(2*width,2*height)
2023-05-14 13:05:06 +08:00
}
FluAcrylic {
sourceItem:image
anchors.bottom: parent.bottom
anchors.right: parent.right
width: 100
height: 100
FluText {
anchors.centerIn: parent
text: "Acrylic"
color: "#FFFFFF"
font.bold: true
2023-05-12 19:26:49 +08:00
}
}
2023-05-12 22:22:55 +08:00
Layout.topMargin: 20
2023-05-12 19:26:49 +08:00
}
2023-05-12 22:22:55 +08:00
2023-05-12 19:26:49 +08:00
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'Image{
2023-05-14 13:05:06 +08:00
id:image
2023-05-12 19:26:49 +08:00
width: 800
height: 600
source: "qrc:/example/res/image/image_huoyin.webp"
radius: 8
2023-05-14 13:05:06 +08:00
}
2023-05-12 19:26:49 +08:00
FluAcrylic{
2023-05-14 13:05:06 +08:00
sourceItem:image
2023-05-12 19:26:49 +08:00
width: 100
height: 100
anchors.centerIn: parent
}'
}
}