mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-27 05:38:37 +08:00
update
This commit is contained in:
parent
ee3ddf7732
commit
51a206e583
15
example/T_Carousel.qml
Normal file
15
example/T_Carousel.qml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
import QtQuick.Window 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtGraphicalEffects 1.15
|
||||||
|
import FluentUI 1.0
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Carousel"
|
||||||
|
|
||||||
|
FluCarousel{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -97,12 +97,22 @@ FluWindow {
|
|||||||
nav_view.push("qrc:/T_Progress.qml")
|
nav_view.push("qrc:/T_Progress.qml")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"Rectangle"
|
title:"Rectangle"
|
||||||
onTap:{
|
onTap:{
|
||||||
nav_view.push("qrc:/T_Rectangle.qml")
|
nav_view.push("qrc:/T_Rectangle.qml")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Carousel"
|
||||||
|
onTap:{
|
||||||
|
nav_view.push("qrc:/T_Carousel.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"Expander"
|
title:"Expander"
|
||||||
onTap:{
|
onTap:{
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
|
|
||||||
<file>App.qml</file>
|
<file>App.qml</file>
|
||||||
|
|
||||||
<file>res/image/image_huoyin.webp</file>
|
<file>res/image/image_huoyin.webp</file>
|
||||||
<file>res/svg/avatar_1.svg</file>
|
<file>res/svg/avatar_1.svg</file>
|
||||||
<file>res/svg/avatar_2.svg</file>
|
<file>res/svg/avatar_2.svg</file>
|
||||||
@ -16,11 +14,9 @@
|
|||||||
<file>res/svg/avatar_10.svg</file>
|
<file>res/svg/avatar_10.svg</file>
|
||||||
<file>res/svg/avatar_11.svg</file>
|
<file>res/svg/avatar_11.svg</file>
|
||||||
<file>res/svg/avatar_12.svg</file>
|
<file>res/svg/avatar_12.svg</file>
|
||||||
|
|
||||||
<file>page/AboutPage.qml</file>
|
<file>page/AboutPage.qml</file>
|
||||||
<file>page/MainPage.qml</file>
|
<file>page/MainPage.qml</file>
|
||||||
<file>page/LoginPage.qml</file>
|
<file>page/LoginPage.qml</file>
|
||||||
|
|
||||||
<file>T_ToggleSwitch.qml</file>
|
<file>T_ToggleSwitch.qml</file>
|
||||||
<file>T_Typography.qml</file>
|
<file>T_Typography.qml</file>
|
||||||
<file>T_Awesome.qml</file>
|
<file>T_Awesome.qml</file>
|
||||||
@ -38,5 +34,6 @@
|
|||||||
<file>T_DatePicker.qml</file>
|
<file>T_DatePicker.qml</file>
|
||||||
<file>T_MultiWindow.qml</file>
|
<file>T_MultiWindow.qml</file>
|
||||||
<file>T_Menu.qml</file>
|
<file>T_Menu.qml</file>
|
||||||
|
<file>T_Carousel.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -47,6 +47,7 @@ void Fluent::registerTypes(const char *uri){
|
|||||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluDatePicker.qml"),uri,major,minor,"FluDatePicker");
|
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluDatePicker.qml"),uri,major,minor,"FluDatePicker");
|
||||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTimePicker.qml"),uri,major,minor,"FluTimePicker");
|
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTimePicker.qml"),uri,major,minor,"FluTimePicker");
|
||||||
|
|
||||||
|
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluCarousel.qml"),uri,major,minor,"FluCarousel");
|
||||||
|
|
||||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluAutoSuggestBox.qml"),uri,major,minor,"FluAutoSuggestBox");
|
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluAutoSuggestBox.qml"),uri,major,minor,"FluAutoSuggestBox");
|
||||||
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluExpander.qml"),uri,major,minor,"FluExpander");
|
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluExpander.qml"),uri,major,minor,"FluExpander");
|
||||||
|
@ -152,6 +152,7 @@ TextField{
|
|||||||
boundsBehavior: ListView.StopAtBounds
|
boundsBehavior: ListView.StopAtBounds
|
||||||
clip: true
|
clip: true
|
||||||
currentIndex: -1
|
currentIndex: -1
|
||||||
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
header: Item{
|
header: Item{
|
||||||
width: input.width
|
width: input.width
|
||||||
height: visible ? 38 : 0
|
height: visible ? 38 : 0
|
||||||
@ -165,7 +166,6 @@ TextField{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScrollBar.vertical: ScrollBar { }
|
|
||||||
delegate:Control{
|
delegate:Control{
|
||||||
width: input.width
|
width: input.width
|
||||||
padding:10
|
padding:10
|
||||||
|
7
src/controls/FluCarousel.qml
Normal file
7
src/controls/FluCarousel.qml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
|
||||||
|
Item {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -202,7 +202,7 @@ Rectangle {
|
|||||||
width: 100
|
width: 100
|
||||||
height: parent.height
|
height: parent.height
|
||||||
boundsBehavior:Flickable.StopAtBounds
|
boundsBehavior:Flickable.StopAtBounds
|
||||||
ScrollBar.vertical: ScrollBar { }
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
model: generateYearArray(1924,2048)
|
model: generateYearArray(1924,2048)
|
||||||
clip: true
|
clip: true
|
||||||
visible: showYear
|
visible: showYear
|
||||||
@ -228,7 +228,7 @@ Rectangle {
|
|||||||
width: showYear ? 100 : 150
|
width: showYear ? 100 : 150
|
||||||
height: parent.height
|
height: parent.height
|
||||||
clip: true
|
clip: true
|
||||||
ScrollBar.vertical: ScrollBar { }
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
boundsBehavior:Flickable.StopAtBounds
|
boundsBehavior:Flickable.StopAtBounds
|
||||||
delegate: Loader{
|
delegate: Loader{
|
||||||
property var model: modelData
|
property var model: modelData
|
||||||
@ -252,7 +252,7 @@ Rectangle {
|
|||||||
width: showYear ? 100 : 150
|
width: showYear ? 100 : 150
|
||||||
height: parent.height
|
height: parent.height
|
||||||
clip: true
|
clip: true
|
||||||
ScrollBar.vertical: ScrollBar { }
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
boundsBehavior:Flickable.StopAtBounds
|
boundsBehavior:Flickable.StopAtBounds
|
||||||
delegate: Loader{
|
delegate: Loader{
|
||||||
|
@ -135,12 +135,11 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id:nav_app_bar
|
id:nav_app_bar
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 38
|
height: 38
|
||||||
|
z:999
|
||||||
RowLayout{
|
RowLayout{
|
||||||
height:parent.height
|
height:parent.height
|
||||||
spacing: 0
|
spacing: 0
|
||||||
@ -232,7 +231,7 @@ Item {
|
|||||||
id:layout_list
|
id:layout_list
|
||||||
width: 300
|
width: 300
|
||||||
anchors{
|
anchors{
|
||||||
top: nav_app_bar.bottom
|
top: parent.top
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
x: {
|
x: {
|
||||||
@ -264,6 +263,7 @@ Item {
|
|||||||
Item{
|
Item{
|
||||||
id:layout_header
|
id:layout_header
|
||||||
width: layout_list.width
|
width: layout_list.width
|
||||||
|
y:nav_app_bar.height
|
||||||
height: 50
|
height: 50
|
||||||
|
|
||||||
FluAutoSuggestBox{
|
FluAutoSuggestBox{
|
||||||
@ -322,6 +322,8 @@ Item {
|
|||||||
stackIndex.push(currentIndex)
|
stackIndex.push(currentIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
|
|
||||||
model:{
|
model:{
|
||||||
if(items){
|
if(items){
|
||||||
return items.children
|
return items.children
|
||||||
|
@ -17,10 +17,12 @@ Item {
|
|||||||
fontStyle: FluText.TitleLarge
|
fontStyle: FluText.TitleLarge
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView{
|
Flickable{
|
||||||
clip: true
|
clip: true
|
||||||
width: parent.width
|
width: parent.width
|
||||||
contentWidth: parent.width
|
contentWidth: parent.width
|
||||||
|
contentHeight: container.height
|
||||||
|
ScrollBar.vertical: ScrollBar { }
|
||||||
anchors{
|
anchors{
|
||||||
top: text_title.bottom
|
top: text_title.bottom
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
|
@ -201,7 +201,7 @@ Rectangle {
|
|||||||
width: isH ? 100 : 150
|
width: isH ? 100 : 150
|
||||||
height: parent.height
|
height: parent.height
|
||||||
boundsBehavior:Flickable.StopAtBounds
|
boundsBehavior:Flickable.StopAtBounds
|
||||||
ScrollBar.vertical: ScrollBar { }
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
model: isH ? generateArray(1,12) : generateArray(0,23)
|
model: isH ? generateArray(1,12) : generateArray(0,23)
|
||||||
clip: true
|
clip: true
|
||||||
delegate: Loader{
|
delegate: Loader{
|
||||||
@ -225,7 +225,7 @@ Rectangle {
|
|||||||
height: parent.height
|
height: parent.height
|
||||||
model: generateArray(0,59)
|
model: generateArray(0,59)
|
||||||
clip: true
|
clip: true
|
||||||
ScrollBar.vertical: ScrollBar { }
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
boundsBehavior:Flickable.StopAtBounds
|
boundsBehavior:Flickable.StopAtBounds
|
||||||
delegate: Loader{
|
delegate: Loader{
|
||||||
property var model: modelData
|
property var model: modelData
|
||||||
@ -250,7 +250,7 @@ Rectangle {
|
|||||||
model: ["上午","下午"]
|
model: ["上午","下午"]
|
||||||
clip: true
|
clip: true
|
||||||
visible: isH
|
visible: isH
|
||||||
ScrollBar.vertical: ScrollBar { }
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
boundsBehavior:Flickable.StopAtBounds
|
boundsBehavior:Flickable.StopAtBounds
|
||||||
delegate: Loader{
|
delegate: Loader{
|
||||||
|
@ -276,8 +276,8 @@ Item {
|
|||||||
model: tree_model
|
model: tree_model
|
||||||
flickableDirection: Flickable.HorizontalAndVerticalFlick
|
flickableDirection: Flickable.HorizontalAndVerticalFlick
|
||||||
clip: true
|
clip: true
|
||||||
ScrollBar.vertical: ScrollBar { }
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
ScrollBar.horizontal: ScrollBar { }
|
ScrollBar.horizontal: FluScrollBar { }
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateData(items){
|
function updateData(items){
|
||||||
|
@ -47,5 +47,6 @@
|
|||||||
<file>controls/FluCalenderView.qml</file>
|
<file>controls/FluCalenderView.qml</file>
|
||||||
<file>controls/FluCalendarDatePicker.qml</file>
|
<file>controls/FluCalendarDatePicker.qml</file>
|
||||||
<file>controls/FluFocusRectangle.qml</file>
|
<file>controls/FluFocusRectangle.qml</file>
|
||||||
|
<file>controls/FluCarousel.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Loading…
Reference in New Issue
Block a user