Compare commits

..

43 Commits

Author SHA1 Message Date
d5ca38dec2 update framelesshelper 2023-07-17 10:12:57 +08:00
cb50c31e1e update 2023-07-17 09:25:12 +08:00
561b4ec8c0 update 2023-07-15 00:20:33 +08:00
4df6800ea4 update 2023-07-14 23:56:08 +08:00
1ecc1bd569 update 2023-07-14 18:18:46 +08:00
0810572e27 update 2023-07-14 16:15:25 +08:00
5ac0ba7463 update 2023-07-13 12:18:38 +08:00
596457cf59 Merge branch 'main' of https://github.com/zhuzichu520/FluentUI 2023-07-13 10:21:13 +08:00
8595b2fdec update 2023-07-13 10:20:45 +08:00
2337680aaf Merge pull request #200 from mentalfl0w/dev
Add Svg module to resolve unsupported image format error.
2023-07-12 08:37:49 +08:00
ba06480436 Add Svg module to resolve unsupported image format error. 2023-07-11 23:38:36 +08:00
0d87dadc61 update 2023-07-11 17:16:21 +08:00
7290b98fdb update 2023-07-11 16:43:28 +08:00
78815224fe update 2023-07-11 10:46:57 +08:00
6275c161fe Merge pull request #195 from mentalfl0w/main
Fix the bug of static resources didn't imported by engine.
2023-07-10 21:37:40 +08:00
9f24cdaebd Fix the bug of static resources didn't imported by engine. 2023-07-10 19:09:50 +08:00
e2ff752ed9 Merge pull request #193 from mentalfl0w/main
Add Build static lib option and fix the bug of static lib build.
2023-07-10 09:18:55 +08:00
ea88707366 Add Build static lib option and fix the bug of static lib build. 2023-07-10 00:03:41 +08:00
112bb6e07a update 2023-07-07 17:58:00 +08:00
26ad581072 update 2023-07-07 16:56:29 +08:00
03771cd7c9 update 2023-07-07 16:04:17 +08:00
9223d5f937 update 2023-07-07 11:47:03 +08:00
a273aa4588 Merge branch 'main' of https://github.com/zhuzichu520/FluentUI 2023-07-07 09:04:58 +08:00
fbcb65f549 update 2023-07-07 09:04:43 +08:00
082fd79c51 update 2023-07-06 18:50:15 +08:00
80619f6974 update 2023-07-06 18:17:52 +08:00
ad4d077480 update 2023-07-05 21:34:08 +08:00
ff93a6204a update 2023-07-05 19:18:32 +08:00
5a7dfeea6e update 2023-07-04 22:47:55 +08:00
0240244bba update 2023-07-04 22:39:57 +08:00
887fd2c02b update 2023-07-04 22:38:56 +08:00
e625b91b08 update 2023-07-04 16:08:04 +08:00
a5cf6f734b updatre 2023-07-04 15:45:50 +08:00
414bc14996 updatre 2023-07-04 15:43:29 +08:00
7276eb5f2f update 2023-07-04 15:15:58 +08:00
b6c689e0ec update 2023-07-04 15:09:48 +08:00
a48bc51edc update 2023-07-03 21:25:26 +08:00
b2d0975ed7 update 2023-07-03 18:44:43 +08:00
7dea573069 update 2023-07-03 18:08:25 +08:00
0d4dd483da update 2023-07-03 11:50:26 +08:00
d1656cfb63 update 2023-07-01 11:37:58 +08:00
73cc5bccc8 update 2023-07-01 11:37:08 +08:00
9ff81251c8 update 2023-07-01 07:54:43 +08:00
78 changed files with 1268 additions and 689 deletions

View File

@ -4,6 +4,13 @@ project(FluentUI VERSION 0.1 LANGUAGES CXX)
option(FLUENTUI_BUILD_EXAMPLES "Build FluentUI demo applications." ON) option(FLUENTUI_BUILD_EXAMPLES "Build FluentUI demo applications." ON)
option(FLUENTUI_BUILD_FRAMELESSHEPLER "Build FramelessHelper." ON) option(FLUENTUI_BUILD_FRAMELESSHEPLER "Build FramelessHelper." ON)
option(FLUENTUI_BUILD_STATIC_LIB "Build static library." OFF)
#设置QML插件输出目录可以通过外部设置如果外部没有设置就默认到<QT_SDK_DIR_PATH>\qml\FluentUI目录下
set(FLUENTUI_QML_PLUGIN_DIRECTORY "" CACHE PATH "Path to FluentUI plugin")
if(NOT FLUENTUI_QML_PLUGIN_DIRECTORY)
set(FLUENTUI_QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI)
endif()
add_subdirectory(src) add_subdirectory(src)
@ -12,11 +19,15 @@ if (FLUENTUI_BUILD_EXAMPLES)
endif () endif ()
if (FLUENTUI_BUILD_FRAMELESSHEPLER) if (FLUENTUI_BUILD_FRAMELESSHEPLER)
add_definitions(-DFRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT) set(FRAMELESSHELPER_BUILD_STATIC ON)
add_definitions(-DFRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT) set(FRAMELESSHELPER_NO_SUMMARY OFF)
set(FRAMELESSHELPER_NO_DEBUG_OUTPUT OFF)
set(FRAMELESSHELPER_BUILD_WIDGETS OFF)
add_subdirectory(framelesshelper) add_subdirectory(framelesshelper)
endif () endif ()
message("------------------------ FluentUI ------------------------") message("------------------------ FluentUI ------------------------")
message("Build FluentUI demo applications.: ${FLUENTUI_BUILD_EXAMPLES}") message("Build FluentUI demo applications.: ${FLUENTUI_BUILD_EXAMPLES}")
message("Build FramelessHelper.: ${FLUENTUI_BUILD_FRAMELESSHEPLER}") message("Build FramelessHelper.: ${FLUENTUI_BUILD_FRAMELESSHEPLER}")
message("Build static library.: ${FLUENTUI_BUILD_STATIC_LIB}")
message("Path to FluentUI plugin.: ${FLUENTUI_QML_PLUGIN_DIRECTORY}")

View File

@ -8,6 +8,11 @@ if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
endif() endif()
#判断FluentUI库类型
if(FLUENTUI_BUILD_STATIC_LIB)
add_definitions(-DFLUENTUI_BUILD_STATIC_LIB)
endif()
#设置可执行文件输出目录 #设置可执行文件输出目录
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/debug) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/debug)
@ -19,9 +24,9 @@ endif()
file(TO_CMAKE_PATH "/" PATH_SEPARATOR) file(TO_CMAKE_PATH "/" PATH_SEPARATOR)
#设置版本号 #设置版本号
add_definitions(-DVERSION=1,3,7,1) add_definitions(-DVERSION=1,3,7,4)
find_package(Qt6 REQUIRED COMPONENTS Quick) find_package(Qt6 REQUIRED COMPONENTS Quick Svg)
if(QT_VERSION VERSION_GREATER_EQUAL "6.3") if(QT_VERSION VERSION_GREATER_EQUAL "6.3")
qt_standard_project_setup() qt_standard_project_setup()
@ -98,12 +103,24 @@ set_target_properties(example PROPERTIES
) )
#链接库 #链接库
target_link_libraries(example PRIVATE if (FLUENTUI_BUILD_STATIC_LIB)
Qt6::Quick target_link_libraries(example PRIVATE
fluentuiplugin Qt6::Quick
FramelessHelper::Core Qt::Svg
FramelessHelper::Quick fluentui
) fluentuiplugin
FramelessHelper::Core
FramelessHelper::Quick
)
else()
target_link_libraries(example PRIVATE
Qt6::Quick
Qt::Svg
fluentuiplugin
FramelessHelper::Core
FramelessHelper::Quick
)
endif()
#安装 #安装
install(TARGETS example install(TARGETS example

View File

@ -10,10 +10,12 @@ Window {
Component.onCompleted: { Component.onCompleted: {
FluApp.init(app) FluApp.init(app)
FluTheme.darkMode = FluDarkMode.System FluTheme.darkMode = FluDarkMode.System
FluTheme.enableAnimation = true
FluApp.routes = { FluApp.routes = {
"/":"qrc:/example/qml/window/MainWindow.qml", "/":"qrc:/example/qml/window/MainWindow.qml",
"/about":"qrc:/example/qml/window/AboutWindow.qml", "/about":"qrc:/example/qml/window/AboutWindow.qml",
"/login":"qrc:/example/qml/window/LoginWindow.qml", "/login":"qrc:/example/qml/window/LoginWindow.qml",
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml", "/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml", "/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml" "/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml"

View File

@ -37,11 +37,6 @@ FluExpander{
rightMargin: 5 rightMargin: 5
topMargin: 5 topMargin: 5
} }
onActiveFocusChanged: {
if(activeFocus){
control.expand = true
}
}
onClicked:{ onClicked:{
FluTools.clipText(content.text) FluTools.clipText(content.text)
showSuccess("复制成功") showSuccess("复制成功")

View File

@ -333,6 +333,12 @@ FluObject{
navigationView.push("qrc:/example/qml/page/T_RemoteLoader.qml") navigationView.push("qrc:/example/qml/page/T_RemoteLoader.qml")
} }
} }
FluPaneItem{
title:"HotLoader"
tapFunc:function(){
FluApp.navigate("/hotload")
}
}
} }
function getRecentlyAddedData(){ function getRecentlyAddedData(){

View File

@ -33,6 +33,7 @@ FluContentPage {
cellWidth: 80 cellWidth: 80
cellHeight: 80 cellHeight: 80
clip: true clip: true
boundsBehavior: GridView.StopAtBounds
model:FluApp.awesomelist() model:FluApp.awesomelist()
ScrollBar.vertical: FluScrollBar {} ScrollBar.vertical: FluScrollBar {}
anchors{ anchors{

View File

@ -24,6 +24,7 @@ FluScrollablePage{
FluTextButton{ FluTextButton{
disabled:text_button_switch.checked disabled:text_button_switch.checked
text:"Text Button" text:"Text Button"
contentDescription: "文本按钮"
onClicked: { onClicked: {
showInfo("点击Text Button") showInfo("点击Text Button")
} }
@ -222,7 +223,7 @@ FluScrollablePage{
FluMenuItem{ FluMenuItem{
text:"Menu_4" text:"Menu_4"
onClicked: { onClicked: {
console.debug(parent.height)
} }
} }
} }
@ -240,20 +241,18 @@ FluScrollablePage{
Layout.topMargin: -1 Layout.topMargin: -1
code:'FluDropDownButton{ code:'FluDropDownButton{
text:"DropDownButton" text:"DropDownButton"
items:[ FluMenuItem{
FluMenuItem{ text:"Menu_1"
text:"Menu_1" },
}, FluMenuItem{
FluMenuItem{ text:"Menu_2"
text:"Menu_2" },
}, FluMenuItem{
FluMenuItem{ text:"Menu_3"
text:"Menu_3" },
}, FluMenuItem{
FluMenuItem{ text:"Menu_4"
text:"Menu_4" }
}
]
}' }'
} }

View File

@ -23,8 +23,6 @@ FluScrollablePage{
text:"此颜色组件是Github上的开源项目" text:"此颜色组件是Github上的开源项目"
} }
FluTextButton{ FluTextButton{
leftPadding: 0
rightPadding: 0
text:"https://github.com/rshest/qml-colorpicker" text:"https://github.com/rshest/qml-colorpicker"
onClicked: { onClicked: {
Qt.openUrlExternally(text) Qt.openUrlExternally(text)

View File

@ -46,6 +46,7 @@ FluScrollablePage{
} }
FluComboBox { FluComboBox {
editable: true editable: true
font:FluTextStyle.BodyStrong
model: ListModel { model: ListModel {
id: model_2 id: model_2
ListElement { text: "Banana" } ListElement { text: "Banana" }

View File

@ -76,7 +76,6 @@ FluScrollablePage{
Image{ Image{
source: "qrc:/example/res/image/banner_1.jpg" source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true asynchronous: true
sourceSize: Qt.size(400,300)
fillMode:Image.PreserveAspectCrop fillMode:Image.PreserveAspectCrop
} }
Image{ Image{

View File

@ -7,7 +7,8 @@ import FluentUI
FluScrollablePage{ FluScrollablePage{
pageMode: FluNavigationView.SingleTask launchMode: FluPage.SingleTask
animDisabled: true
ListModel{ ListModel{
id:model_header id:model_header

View File

@ -11,7 +11,7 @@ FluScrollablePage{
FluArea{ FluArea{
Layout.fillWidth: true Layout.fillWidth: true
height: 300 height: 260
paddings: 10 paddings: 10
Layout.topMargin: 20 Layout.topMargin: 20
Column{ Column{

View File

@ -12,7 +12,7 @@ FluScrollablePage{
FluArea{ FluArea{
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 20 Layout.topMargin: 20
height: 200 height: 240
paddings: 10 paddings: 10
ColumnLayout{ ColumnLayout{
spacing: 14 spacing: 14
@ -44,6 +44,12 @@ FluScrollablePage{
showSuccess("这是一个Success样式的InfoBar这是一个Success样式的InfoBar") showSuccess("这是一个Success样式的InfoBar这是一个Success样式的InfoBar")
} }
} }
FluButton{
text:"Loading"
onClicked: {
showLoading()
}
}
} }
} }
CodeExpander{ CodeExpander{

View File

@ -12,32 +12,71 @@ FluScrollablePage{
FluArea{ FluArea{
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 20 Layout.topMargin: 20
height: 260 height: 110
paddings: 10 paddings: 10
ColumnLayout{ ColumnLayout{
spacing: 20 spacing: 10
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
left: parent.left left: parent.left
} }
FluText{
text: "indeterminate = true"
}
FluProgressBar{ FluProgressBar{
} }
FluProgressRing{ FluProgressRing{
} }
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluProgressBar{
}
FluProgressRing{
}
'
}
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 230
paddings: 10
ColumnLayout{
spacing: 10
anchors{
verticalCenter: parent.verticalCenter
left: parent.left
}
FluText{
text: "indeterminate = false"
}
FluProgressBar{ FluProgressBar{
id:progress_bar
indeterminate: false indeterminate: false
progress: slider.value/100
} }
FluProgressRing{ FluProgressRing{
id:progress_ring
indeterminate: false indeterminate: false
progress: slider.value/100
}
FluProgressBar{
indeterminate: false
progressVisible: true
progress: slider.value/100
}
FluProgressRing{
indeterminate: false
progressVisible: true
progress: slider.value/100
} }
FluSlider{ FluSlider{
onValueChanged:{ id:slider
var progress = value/100
progress_bar.progress = progress
progress_ring.progress = progress
}
Component.onCompleted: { Component.onCompleted: {
value = 50 value = 50
} }
@ -48,22 +87,14 @@ FluScrollablePage{
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: -1 Layout.topMargin: -1
code:'FluProgressBar{ code:'FluProgressBar{
}
FluProgressRing{
}
FluProgressBar{
indeterminate: false indeterminate: false
} }
FluProgressRing{ FluProgressRing{
indeterminate: false indeterminate: false
}' progressVisible: true
}
'
} }
} }

View File

@ -12,7 +12,7 @@ FluScrollablePage{
FluArea{ FluArea{
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 20 Layout.topMargin: 20
height: 480 height: 460
paddings: 10 paddings: 10
Column{ Column{

View File

@ -6,7 +6,7 @@ import FluentUI
import "qrc:///example/qml/component" import "qrc:///example/qml/component"
FluPage{ FluPage{
pageMode: FluNavigationView.SingleTop launchMode: FluPage.SingleTop
FluRemoteLoader{ FluRemoteLoader{
anchors.fill: parent anchors.fill: parent
source: "https://zhu-zichu.gitee.io/T_RemoteLoader.qml" source: "https://zhu-zichu.gitee.io/T_RemoteLoader.qml"

View File

@ -64,8 +64,8 @@ FluContentPage{
address: getRandomAddresses(), address: getRandomAddresses(),
nickname: getRandomNickname(), nickname: getRandomNickname(),
longstring:"你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好", longstring:"你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好",
height:44, height:42,
minimumHeight:44, minimumHeight:42,
maximumHeight:300, maximumHeight:300,
action:com_action action:com_action
}) })

View File

@ -7,7 +7,7 @@ import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{
pageMode: FluNavigationView.SingleInstance launchMode: FluPage.SingleInstance
title:"TextBox" title:"TextBox"
FluArea{ FluArea{
@ -174,7 +174,7 @@ FluScrollablePage{
FluSpinBox{ FluSpinBox{
Layout.topMargin: 20 Layout.topMargin: 20
// disabled: spin_box_switch.checked disabled: spin_box_switch.checked
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
left: parent.left left: parent.left

View File

@ -12,7 +12,7 @@ FluScrollablePage{
FluArea{ FluArea{
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 20 Layout.topMargin: 20
height: 210 height: 270
paddings: 10 paddings: 10
ColumnLayout{ ColumnLayout{
spacing:0 spacing:0
@ -72,6 +72,17 @@ FluScrollablePage{
FluTheme.nativeText = !FluTheme.nativeText FluTheme.nativeText = !FluTheme.nativeText
} }
} }
FluText{
text:"开启动画效果"
Layout.topMargin: 20
}
FluToggleSwitch{
Layout.topMargin: 5
checked: FluTheme.enableAnimation
onClicked: {
FluTheme.enableAnimation = !FluTheme.enableAnimation
}
}
} }
} }
CodeExpander{ CodeExpander{

View File

@ -8,7 +8,7 @@ import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{
title:"TimePicker" title:"TimePicker"
launchMode: FluPage.SingleInstance
FluArea{ FluArea{
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 20 Layout.topMargin: 20
@ -60,10 +60,10 @@ FluScrollablePage{
} }
FluTimePicker{ FluTimePicker{
hourFormat:FluTimePicker.HH hourFormat:FluTimePicker.HH
onCurrentChanged: { onCurrentChanged: {
showSuccess(current.toLocaleTimeString(Qt.locale("de_DE"))) showSuccess(current.toLocaleTimeString(Qt.locale("de_DE")))
} }
} }
} }

View File

@ -0,0 +1,85 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import FluentUI
import example
import "qrc:///example/qml/component"
CustomWindow {
id:window
title:"热加载"
width: 800
height: 600
minimumWidth: 520
minimumHeight: 200
launchMode: FluWindow.SingleTask
FileWatcher{
id:watcher
onFileChanged: {
loader.reload()
}
}
FluArea{
anchors.fill: parent
FluRemoteLoader{
id:loader
anchors.fill: parent
statusMode: FluStatusView.Success
lazy: true
errorItem: Item{
FluText{
text:loader.itemLodaer().sourceComponent.errorString()
color:"red"
anchors.fill: parent
wrapMode: Text.WrapAnywhere
padding: 20
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignHCenter
}
}
}
FluText{
text:"拖入qml文件"
font.pixelSize: 26
anchors.centerIn: parent
visible: !loader.itemLodaer().item && loader.statusMode === FluStatusView.Success
}
Rectangle{
radius: 4
anchors.fill: parent
color: "#33333333"
visible: drop_area.containsDrag
}
DropArea{
id:drop_area
anchors.fill: parent
onEntered:
(event)=>{
if(!event.hasUrls){
event.accepted = false
return
}
if (event.urls.length !== 1) {
event.accepted = false
return
}
var url = event.urls[0].toString()
var fileExtension = url.substring(url.lastIndexOf(".") + 1)
if (fileExtension !== "qml") {
event.accepted = false
return
}
return true
}
onDropped:
(event)=>{
var path = event.urls[0].toString()
loader.source = path
watcher.path = path
loader.reload()
}
}
}
}

View File

@ -16,15 +16,19 @@ CustomWindow {
height: 640 height: 640
closeDestory:false closeDestory:false
minimumWidth: 520 minimumWidth: 520
minimumHeight: 460 minimumHeight: 200
appBarVisible: false appBarVisible: false
launchMode: FluWindow.SingleTask launchMode: FluWindow.SingleTask
closeFunc:function(event){ closeFunc:function(event){
close_app.open() dialog_close.open()
event.accepted = false event.accepted = false
} }
Component.onCompleted: {
FluTools.setQuitOnLastWindowClosed(false)
}
Connections{ Connections{
target: appInfo target: appInfo
function onActiveWindow(){ function onActiveWindow(){
@ -59,7 +63,7 @@ CustomWindow {
} }
FluContentDialog{ FluContentDialog{
id:close_app id:dialog_close
title:"退出" title:"退出"
message:"确定要退出程序吗?" message:"确定要退出程序吗?"
negativeText:"最小化" negativeText:"最小化"
@ -95,7 +99,7 @@ CustomWindow {
when: flipable.flipped when: flipable.flipped
} }
transitions: Transition { transitions: Transition {
NumberAnimation { target: flipable; property: "flipAngle"; duration: 1000 ; easing.type: Easing.OutQuad} NumberAnimation { target: flipable; property: "flipAngle"; duration: 1000 ; easing.type: Easing.OutCubic}
} }
back: Item{ back: Item{
anchors.fill: flipable anchors.fill: flipable
@ -168,19 +172,17 @@ CustomWindow {
width: parent.width width: parent.width
height: parent.height height: parent.height
z:999 z:999
//Stack模式每次切换都会将页面压入栈中随着栈的页面增多消耗的内存也越多内存消耗多就会卡顿这时候就需要按返回将页面pop掉释放内存。该模式可以配合FluPage中的launchMode属性设置页面的启动模式
// pageMode: FluNavigationView.Stack
//NoStack模式每次切换都会销毁之前的页面然后创建一个新的页面只需消耗少量内存推荐
// pageMode: FluNavigationView.NoStack
items: ItemsOriginal items: ItemsOriginal
footerItems:ItemsFooter footerItems:ItemsFooter
topPadding:FluTools.isMacos() ? 20 : 5 topPadding:FluTools.isMacos() ? 20 : 5
displayMode:MainEvent.displayMode displayMode:MainEvent.displayMode
logo: "qrc:/example/res/image/favicon.ico" logo: "qrc:/example/res/image/favicon.ico"
title:"FluentUI" title:"FluentUI"
Behavior on rotation { onLogoClicked:{
NumberAnimation{
duration: 167
}
}
transformOrigin: Item.Center
onLoginClicked:{
clickCount += 1 clickCount += 1
if(clickCount === 1){ if(clickCount === 1){
loader.reload() loader.reload()
@ -222,7 +224,7 @@ CustomWindow {
} }
function handleDarkChanged(button){ function handleDarkChanged(button){
if(FluTools.isMacos()){ if(FluTools.isMacos() || !FluTheme.enableAnimation){
changeDark() changeDark()
}else{ }else{
var target = window.contentItem var target = window.contentItem

View File

@ -5,6 +5,7 @@
CircularReveal::CircularReveal(QQuickItem* parent) : QQuickPaintedItem(parent) CircularReveal::CircularReveal(QQuickItem* parent) : QQuickPaintedItem(parent)
{ {
setVisible(false);
_anim = new QPropertyAnimation(this, "radius", this); _anim = new QPropertyAnimation(this, "radius", this);
_anim->setDuration(333); _anim->setDuration(333);
_anim->setEasingCurve(QEasingCurve::OutCubic); _anim->setEasingCurve(QEasingCurve::OutCubic);
@ -19,6 +20,7 @@ CircularReveal::CircularReveal(QQuickItem* parent) : QQuickPaintedItem(parent)
void CircularReveal::paint(QPainter* painter) void CircularReveal::paint(QPainter* painter)
{ {
painter->save(); painter->save();
painter->eraseRect(boundingRect());
painter->drawImage(QRect(0, 0, static_cast<int>(width()), static_cast<int>(height())), _source); painter->drawImage(QRect(0, 0, static_cast<int>(width()), static_cast<int>(height())), _source);
QPainterPath path; QPainterPath path;
path.moveTo(_center.x(),_center.y()); path.moveTo(_center.x(),_center.y());

View File

@ -0,0 +1,24 @@
#include "FileWatcher.h"
FileWatcher::FileWatcher(QObject *parent)
: QObject{parent}
{
connect(&_watcher, &QFileSystemWatcher::fileChanged, this, [=](const QString &path){
Q_EMIT fileChanged();
clean();
_watcher.addPath(_path);
});
connect(this,&FileWatcher::pathChanged,this,[=](){
clean();
_watcher.addPath(_path.replace("file:///",""));
});
if(!_path.isEmpty()){
_watcher.addPath(_path);
}
}
void FileWatcher::clean(){
foreach (const QString &item, _watcher.files()) {
_watcher.removePath(item);
}
}

View File

@ -0,0 +1,21 @@
#ifndef FILEWATCHER_H
#define FILEWATCHER_H
#include <QObject>
#include <QFileSystemWatcher>
#include "src/stdafx.h"
class FileWatcher : public QObject
{
Q_OBJECT
Q_PROPERTY_AUTO(QString,path);
public:
explicit FileWatcher(QObject *parent = nullptr);
Q_SIGNAL void fileChanged();
private:
void clean();
private:
QFileSystemWatcher _watcher;
};
#endif // FILEWATCHER_H

View File

@ -7,11 +7,12 @@
#include <FramelessHelper/Quick/framelessquickmodule.h> #include <FramelessHelper/Quick/framelessquickmodule.h>
#include <FramelessHelper/Core/private/framelessconfig_p.h> #include <FramelessHelper/Core/private/framelessconfig_p.h>
#include "src/component/CircularReveal.h" #include "src/component/CircularReveal.h"
#include "src/component/FileWatcher.h"
#include "AppInfo.h" #include "AppInfo.h"
FRAMELESSHELPER_USE_NAMESPACE FRAMELESSHELPER_USE_NAMESPACE
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
//将样式设置为Basic不然会导致组件显示异常 //将样式设置为Basic不然会导致组件显示异常
qputenv("QT_QUICK_CONTROLS_STYLE","Basic"); qputenv("QT_QUICK_CONTROLS_STYLE","Basic");
@ -35,11 +36,13 @@ int main(int argc, char *argv[])
if(!appInfo->isOwnerProcess(&ipc)){ if(!appInfo->isOwnerProcess(&ipc)){
return 0; return 0;
} }
app.setQuitOnLastWindowClosed(false);
QQmlApplicationEngine engine; QQmlApplicationEngine engine;
FramelessHelper::Quick::registerTypes(&engine); FramelessHelper::Quick::registerTypes(&engine);
#ifdef FLUENTUI_BUILD_STATIC_LIB
engine.addImportPath("qrc:/"); // 让静态资源可以被QML引擎搜索到
#endif
qmlRegisterType<CircularReveal>("example", 1, 0, "CircularReveal"); qmlRegisterType<CircularReveal>("example", 1, 0, "CircularReveal");
qmlRegisterType<FileWatcher>("example", 1, 0, "FileWatcher");
appInfo->init(&engine); appInfo->init(&engine);
const QUrl url(QStringLiteral("qrc:/example/qml/App.qml")); const QUrl url(QStringLiteral("qrc:/example/qml/App.qml"));
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,

View File

@ -1,18 +1,18 @@
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
project(fluentuiplugin LANGUAGES CXX) if (FLUENTUI_BUILD_STATIC_LIB)
project(fluentui LANGUAGES CXX)
else()
project(fluentuiplugin LANGUAGES CXX)
endif()
#配置通用编译 #配置通用编译
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(APPLE) if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
endif() endif()
#设置QML插件输出目录->D:\Qt\6.4.3\msvc2019_64\qml\FluentUI
set(QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI)
#设置版本号 #设置版本号
add_definitions(-DVERSION=1,3,7,1) add_definitions(-DVERSION=1,3,7,4)
find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml) find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml)
@ -39,7 +39,7 @@ foreach(filepath ${QML_PATHS})
endforeach(filepath) endforeach(filepath)
#遍历所有资源文件 #遍历所有资源文件
file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp) file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp qmldir)
foreach(filepath ${RES_PATHS}) foreach(filepath ${RES_PATHS})
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath}) string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
list(APPEND resource_files ${filename}) list(APPEND resource_files ${filename})
@ -52,26 +52,44 @@ foreach(filepath IN LISTS qml_files resource_files)
endforeach() endforeach()
#添加qml模块 #添加qml模块
qt_add_library(fluentuiplugin SHARED) if (FLUENTUI_BUILD_STATIC_LIB)
qt_add_qml_module(fluentuiplugin set(LIB_TYPE "STATIC")
#没有下面这行代码就会生成fluentuiplugin.dll与fluentuipluginplugin.dll两个动态库 else()
PLUGIN_TARGET fluentuiplugin set(LIB_TYPE "SHARED")
OUTPUT_DIRECTORY ${QML_PLUGIN_DIRECTORY} endif()
VERSION 1.0 qt_add_library(${PROJECT_NAME} ${LIB_TYPE})
URI "FluentUI" if (FLUENTUI_BUILD_STATIC_LIB)
#修改qmltypes文件名称。默认fluentuiplugin.qmltypes使用默认名称有时候import FluentUI会爆红所以修改成plugins.qmltypes qt_add_qml_module(${PROJECT_NAME}
TYPEINFO "plugins.qmltypes" #在静态库编译中使用PLUGIN_TARGET会导致链接失败
SOURCES ${sources_files} fluentui.rc OUTPUT_DIRECTORY ${FLUENTUI_QML_PLUGIN_DIRECTORY}
QML_FILES ${qml_files} VERSION 1.0
RESOURCES ${resource_files} URI "FluentUI"
) TYPEINFO "plugins.qmltypes"
SOURCES ${sources_files} fluentui.rc
QML_FILES ${qml_files}
RESOURCES ${resource_files}
)
else()
qt_add_qml_module(${PROJECT_NAME}
#没有下面这行代码就会生成fluentuiplugin.dll与fluentuipluginplugin.dll两个动态库
PLUGIN_TARGET fluentuiplugin
OUTPUT_DIRECTORY ${FLUENTUI_QML_PLUGIN_DIRECTORY}
VERSION 1.0
URI "FluentUI"
#修改qmltypes文件名称。默认fluentuiplugin.qmltypes使用默认名称有时候import FluentUI会爆红所以修改成plugins.qmltypes
TYPEINFO "plugins.qmltypes"
SOURCES ${sources_files} fluentui.rc
QML_FILES ${qml_files}
RESOURCES ${resource_files}
)
endif()
#链接库 #链接库
target_link_libraries(fluentuiplugin PUBLIC target_link_libraries(${PROJECT_NAME} PUBLIC
Qt::CorePrivate Qt::CorePrivate
Qt::QuickPrivate Qt::QuickPrivate
Qt::QmlPrivate Qt::QmlPrivate
) )
#安装 #安装
install(DIRECTORY ${QML_PLUGIN_DIRECTORY} DESTINATION ${CMAKE_INSTALL_PREFIX}/imports) install(DIRECTORY ${FLUENTUI_QML_PLUGIN_DIRECTORY} DESTINATION ${CMAKE_INSTALL_PREFIX}/imports)

View File

@ -7,9 +7,9 @@
namespace Fluent_DarkMode { namespace Fluent_DarkMode {
Q_NAMESPACE Q_NAMESPACE
enum Fluent_DarkModeType { enum Fluent_DarkModeType {
System = 0x0, System = 0x0,
Light = 0x1, Light = 0x1,
Dark = 0x2, Dark = 0x2,
}; };
Q_ENUM_NS(Fluent_DarkModeType) Q_ENUM_NS(Fluent_DarkModeType)
QML_NAMED_ELEMENT(FluDarkMode) QML_NAMED_ELEMENT(FluDarkMode)

View File

@ -12,7 +12,7 @@ FluTextStyle::FluTextStyle(QObject *parent)
Body(body); Body(body);
QFont bodyStrong; QFont bodyStrong;
bodyStrong.setPixelSize(14); bodyStrong.setPixelSize(13);
bodyStrong.setBold(true); bodyStrong.setBold(true);
BodyStrong(bodyStrong); BodyStrong(bodyStrong);

View File

@ -31,6 +31,7 @@ FluTheme::FluTheme(QObject *parent)
}); });
primaryColor(FluColors::getInstance()->Blue()); primaryColor(FluColors::getInstance()->Blue());
nativeText(false); nativeText(false);
enableAnimation(false);
darkMode(Fluent_DarkMode::Fluent_DarkModeType::Light); darkMode(Fluent_DarkMode::Fluent_DarkModeType::Light);
_systemDark = systemDark(); _systemDark = systemDark();
qApp->installEventFilter(this); qApp->installEventFilter(this);

View File

@ -32,6 +32,11 @@ class FluTheme : public QObject
*/ */
Q_PROPERTY_AUTO(bool,nativeText); Q_PROPERTY_AUTO(bool,nativeText);
/**
* @brief 是否开启动画效果
*/
Q_PROPERTY_AUTO(bool,enableAnimation);
QML_NAMED_ELEMENT(FluTheme) QML_NAMED_ELEMENT(FluTheme)
QML_SINGLETON QML_SINGLETON
private: private:

View File

@ -19,6 +19,9 @@ Rectangle{
property color closeNormalColor: Qt.rgba(0,0,0,0) property color closeNormalColor: Qt.rgba(0,0,0,0)
property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1) property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1)
property bool showDark: false property bool showDark: false
property bool showClose: true
property bool showMinimize: true
property bool showMaximize: true
property bool titleVisible: true property bool titleVisible: true
property bool isMac: FluTools.isMacos() property bool isMac: FluTools.isMacos()
property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
@ -96,7 +99,7 @@ Rectangle{
iconSize: 11 iconSize: 11
text:minimizeText text:minimizeText
radius: 0 radius: 0
visible: !isMac visible: !isMac && showMinimize
iconColor: root.textColor iconColor: root.textColor
color: hovered ? minimizeHoverColor : minimizeNormalColor color: hovered ? minimizeHoverColor : minimizeNormalColor
onClicked: minClickListener() onClicked: minClickListener()
@ -108,7 +111,7 @@ Rectangle{
iconSource : d.isRestore ? FluentIcons.ChromeRestore : FluentIcons.ChromeMaximize iconSource : d.isRestore ? FluentIcons.ChromeRestore : FluentIcons.ChromeMaximize
color: hovered ? maximizeHoverColor : maximizeNormalColor color: hovered ? maximizeHoverColor : maximizeNormalColor
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
visible: d.resizable && !isMac visible: d.resizable && !isMac && showMaximize
radius: 0 radius: 0
iconColor: root.textColor iconColor: root.textColor
text:d.isRestore?restoreText:maximizeText text:d.isRestore?restoreText:maximizeText
@ -122,7 +125,7 @@ Rectangle{
text:closeText text:closeText
width: 40 width: 40
height: 30 height: 30
visible: !isMac visible: !isMac && showClose
radius: 0 radius: 0
iconSize: 10 iconSize: 10
iconColor: hovered ? Qt.rgba(1,1,1,1) : root.textColor iconColor: hovered ? Qt.rgba(1,1,1,1) : root.textColor

View File

@ -22,33 +22,29 @@ FluTextBox{
id:control_popup id:control_popup
y:control.height y:control.height
focus: false focus: false
// modal: true
// Overlay.modal: Item{}
padding: 0
enter: Transition { enter: Transition {
NumberAnimation { NumberAnimation {
property: "opacity" property: "opacity"
from:0 from:0
to:1 to:1
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
onVisibleChanged: { contentItem: FluRectangle{
if(visible){ radius: [4,4,4,4]
list_view.currentIndex = -1
}
}
background: Rectangle{
id:container
width: control.width
radius: 4
FluShadow{ FluShadow{
radius: 4 radius: 4
} }
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1) color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
height: 38*Math.min(Math.max(list_view.count,1),8)
ListView{ ListView{
id:list_view id:list_view
anchors.fill: parent anchors.fill: parent
clip: true clip: true
currentIndex: -1 boundsBehavior: ListView.StopAtBounds
ScrollBar.vertical: FluScrollBar {} ScrollBar.vertical: FluScrollBar {}
header: Item{ header: Item{
width: control.width width: control.width
@ -63,53 +59,39 @@ FluTextBox{
} }
} }
} }
delegate:Control{ delegate:FluControl{
id:item_control
height: 38
width: control.width width: control.width
padding:10 onClicked:{
handleClick(modelData)
}
background: Rectangle{ background: Rectangle{
FluFocusRectangle{
visible: item_control.activeFocus
radius:4
}
color: { color: {
if(list_view.currentIndex === index){
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
}
if(hovered){ if(hovered){
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1) return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
} }
return FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(0,0,0,0) return FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(0,0,0,0)
} }
MouseArea{
id:mouse_area
anchors.fill: parent
Connections{
target: control
function onHandleClicked(){
if((list_view.currentIndex === index)){
handleClick(modelData)
}
}
}
onClicked: handleClick(modelData)
}
Rectangle{
width: 3
color:FluTheme.primaryColor.dark
visible: list_view.currentIndex === index
radius: 3
height: 20
anchors{
left: parent.left
verticalCenter: parent.verticalCenter
}
}
} }
contentItem: FluText{ contentItem: FluText{
text:modelData.title text:modelData.title
anchors{ leftPadding: 10
verticalCenter: parent.verticalCenter rightPadding: 10
} verticalAlignment : Qt.AlignVCenter
} }
} }
} }
} }
background: Item{
id:container
implicitWidth: control.width
implicitHeight: 38*Math.min(Math.max(list_view.count,1),8)
}
} }
onTextChanged: { onTextChanged: {
loadData() loadData()

View File

@ -33,7 +33,7 @@ Item {
properties: "opacity" properties: "opacity"
from: 1 from: 1
to: 0 to: 0
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
add: Transition { add: Transition {
@ -41,7 +41,7 @@ Item {
properties: "opacity" properties: "opacity"
from: 0 from: 0
to: 1 to: 1
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
delegate: Item{ delegate: Item{

View File

@ -65,7 +65,7 @@ Rectangle {
property: "opacity" property: "opacity"
from:0 from:0
to:1 to:1
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
exit:Transition { exit:Transition {
@ -73,7 +73,7 @@ Rectangle {
property: "opacity" property: "opacity"
from:1 from:1
to:0 to:0
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
contentItem: Item{ contentItem: Item{

View File

@ -87,6 +87,7 @@ Button {
return normalColor return normalColor
} }
Behavior on color { Behavior on color {
enabled: FluTheme.enableAnimation
ColorAnimation{ ColorAnimation{
duration: 83 duration: 83
} }
@ -98,6 +99,7 @@ Button {
visible: checked visible: checked
iconColor: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1) iconColor: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
Behavior on visible { Behavior on visible {
enabled: FluTheme.enableAnimation
NumberAnimation{ NumberAnimation{
duration: 83 duration: 83
} }

View File

@ -50,7 +50,7 @@ Button{
property: "opacity" property: "opacity"
from:0 from:0
to:1 to:1
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
@ -59,7 +59,7 @@ Button{
property: "opacity" property: "opacity"
from:1 from:1
to:0 to:0
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
function showPopup() { function showPopup() {

View File

@ -16,7 +16,7 @@ ComboBox {
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding, implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding) implicitIndicatorHeight + topPadding + bottomPadding)
font: FluTextStyle.Body
leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
enabled: !disabled enabled: !disabled
@ -24,6 +24,7 @@ ComboBox {
width: ListView.view.width width: ListView.view.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
palette.text: control.palette.text palette.text: control.palette.text
font: control.font
palette.highlightedText: control.palette.highlightedText palette.highlightedText: control.palette.highlightedText
highlighted: control.highlightedIndex === index highlighted: control.highlightedIndex === index
hoverEnabled: control.hoverEnabled hoverEnabled: control.hoverEnabled
@ -39,8 +40,8 @@ ComboBox {
} }
contentItem: T.TextField { contentItem: T.TextField {
property bool disabled: !control.editable property bool disabled: !control.editable
leftPadding: !control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1 leftPadding: !control.mirrored ? 10 : control.editable && activeFocus ? 3 : 1
rightPadding: control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1 rightPadding: control.mirrored ? 10 : control.editable && activeFocus ? 3 : 1
topPadding: 6 - control.padding topPadding: 6 - control.padding
bottomPadding: 6 - control.padding bottomPadding: 6 - control.padding
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
@ -49,7 +50,7 @@ ComboBox {
text: control.editable ? control.editText : control.displayText text: control.editable ? control.editText : control.displayText
enabled: control.editable enabled: control.editable
autoScroll: control.editable autoScroll: control.editable
font:FluTextStyle.Body font:control.font
readOnly: control.down readOnly: control.down
color: FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1) color: FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1)
inputMethodHints: control.inputMethodHints inputMethodHints: control.inputMethodHints
@ -113,7 +114,7 @@ ComboBox {
property: "opacity" property: "opacity"
from:0 from:0
to:1 to:1
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
exit:Transition { exit:Transition {
@ -121,7 +122,7 @@ ComboBox {
property: "opacity" property: "opacity"
from:1 from:1
to:0 to:0
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
background:Rectangle{ background:Rectangle{

View File

@ -11,6 +11,7 @@ FluPopup {
property string neutralText: "Neutral" property string neutralText: "Neutral"
property string negativeText: "Negative" property string negativeText: "Negative"
property string positiveText: "Positive" property string positiveText: "Positive"
property int delayTime: 100
signal neutralClicked signal neutralClicked
signal negativeClicked signal negativeClicked
signal positiveClicked signal positiveClicked
@ -88,7 +89,8 @@ FluPopup {
text: neutralText text: neutralText
onClicked: { onClicked: {
popup.close() popup.close()
neutralClicked() timer_delay.targetFlags = FluContentDialog.NeutralButton
timer_delay.restart()
} }
} }
FluButton{ FluButton{
@ -99,7 +101,8 @@ FluPopup {
text: negativeText text: negativeText
onClicked: { onClicked: {
popup.close() popup.close()
negativeClicked() timer_delay.targetFlags = FluContentDialog.NegativeButton
timer_delay.restart()
} }
} }
FluFilledButton{ FluFilledButton{
@ -110,10 +113,27 @@ FluPopup {
text: positiveText text: positiveText
onClicked: { onClicked: {
popup.close() popup.close()
positiveClicked() timer_delay.targetFlags = FluContentDialog.PositiveButton
timer_delay.restart()
} }
} }
} }
} }
} }
Timer{
property int targetFlags
id:timer_delay
interval: popup.delayTime
onTriggered: {
if(targetFlags === FluContentDialog.NegativeButton){
negativeClicked()
}
if(targetFlags === FluContentDialog.NeutralButton){
neutralClicked()
}
if(targetFlags === FluContentDialog.PositiveButton){
positiveClicked()
}
}
}
} }

View File

@ -101,7 +101,7 @@ Rectangle {
property: "opacity" property: "opacity"
from:0 from:0
to:1 to:1
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
exit:Transition { exit:Transition {
@ -109,7 +109,7 @@ Rectangle {
property: "opacity" property: "opacity"
from:1 from:1
to:0 to:0
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
background:Item{ background:Item{

View File

@ -3,5 +3,5 @@ import QtQuick.Window
import FluentUI import FluentUI
Rectangle { Rectangle {
color: FluTheme.dark ? Qt.rgba(60/255,60/255,60/255,1) : Qt.rgba(210/255,210/255,210/255,1) color: FluTheme.dark ? Qt.rgba(80/255,80/255,80/255,1) : Qt.rgba(210/255,210/255,210/255,1)
} }

View File

@ -75,7 +75,7 @@ Button {
color: control.textColor color: control.textColor
} }
onClicked: { onClicked: {
if(items && menu.count !==0){ if(menu.count !==0){
var pos = control.mapToItem(null, 0, 0) var pos = control.mapToItem(null, 0, 0)
var containerHeight = menu.count*36 var containerHeight = menu.count*36
if(window.height>pos.y+control.height+containerHeight){ if(window.height>pos.y+control.height+containerHeight){

View File

@ -9,10 +9,8 @@ Item {
property int contentHeight : 300 property int contentHeight : 300
default property alias content: container.data default property alias content: container.data
id:control id:control
height: layout_header.height + container.height implicitHeight: Math.max((layout_header.height + container.height),layout_header.height)
width: 400 implicitWidth: 400
implicitWidth: width
implicitHeight: height
Rectangle{ Rectangle{
id:layout_header id:layout_header
width: parent.width width: parent.width
@ -56,31 +54,69 @@ Item {
iconSource:FluentIcons.ChevronUp iconSource:FluentIcons.ChevronUp
iconSize: 15 iconSize: 15
Behavior on rotation { Behavior on rotation {
enabled: FluTheme.enableAnimation
NumberAnimation{ NumberAnimation{
duration: 167 duration: 167
easing.type: Easing.OutCubic
} }
} }
} }
} }
} }
Rectangle{ Item{
id:container
width: parent.width
clip: true
anchors{ anchors{
top: layout_header.bottom top: layout_header.bottom
topMargin: -1 topMargin: -1
left: layout_header.left left: layout_header.left
} }
radius: 4 width: parent.width
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) clip: true
border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) visible: contentHeight+container.y !== 0
height: expand ? contentHeight : 0 height: contentHeight+container.y
Behavior on height { Rectangle{
NumberAnimation{ id:container
duration: 167 width: parent.width
easing.type: Easing.InCubic height: parent.height
} radius: 4
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
y: -contentHeight
states: [
State{
name:"expand"
when: control.expand
PropertyChanges {
target: container
y:0
}
},
State{
name:"collapsed"
when: !control.expand
PropertyChanges {
target: container
y:-contentHeight
}
}
]
transitions: [
Transition {
to:"expand"
NumberAnimation {
properties: "y"
duration: FluTheme.enableAnimation ? 167 : 0
easing.type: Easing.OutCubic
}
},
Transition {
to:"collapsed"
NumberAnimation {
properties: "y"
duration: FluTheme.enableAnimation ? 167 : 0
easing.type: Easing.OutCubic
}
}
]
} }
} }
} }

View File

@ -2,43 +2,47 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
Item { Image {
property alias sourceSize : image.sourceSize
property alias fillMode : image.fillMode
property url source
property string errorButtonText: "重新加载" property string errorButtonText: "重新加载"
property var status
property var clickErrorListener : function(){ property var clickErrorListener : function(){
image.source = "" image.source = ""
image.source = control.source image.source = control.source
} }
property Component errorItem : com_error
property Component loadingItem: com_loading
id: control id: control
Image{ Loader{
id:image
anchors.fill: parent anchors.fill: parent
source: control.source sourceComponent: {
opacity: control.status === Image.Ready if(control.status === Image.Loading){
onStatusChanged:{ return com_loading
control.status = image.status }else if(control.status == Image.Error){
} return com_error
Behavior on opacity { }else{
NumberAnimation{ return undefined
duration: 83
} }
} }
} }
Rectangle{ Component{
anchors.fill: parent id:com_loading
color: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) Rectangle{
FluProgressRing{ color: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
anchors.centerIn: parent FluProgressRing{
visible: control.status === Image.Loading anchors.centerIn: parent
visible: control.status === Image.Loading
}
} }
FluFilledButton{ }
text: control.errorButtonText Component{
anchors.centerIn: parent id:com_error
visible: control.status === Image.Error Rectangle{
onClicked: clickErrorListener() color: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
FluFilledButton{
text: control.errorButtonText
anchors.centerIn: parent
visible: control.status === Image.Error
onClicked: clickErrorListener()
}
} }
} }
} }

View File

@ -49,7 +49,11 @@ FluObject {
spacing: 20 spacing: 20
width: parent.width width: parent.width
move: Transition { move: Transition {
NumberAnimation { properties: "y"; easing.type: Easing.OutBack; duration: 300 } NumberAnimation {
properties: "y"
easing.type: Easing.OutCubic
duration: FluTheme.enableAnimation ? 333 : 0
}
} }
onChildrenChanged: if(children.length === 0) destroy(); onChildrenChanged: if(children.length === 0) destroy();
function getLastloader(){ function getLastloader(){
@ -89,9 +93,10 @@ FluObject {
scale: item ? 1 : 0; scale: item ? 1 : 0;
asynchronous: true asynchronous: true
Behavior on scale { Behavior on scale {
enabled: FluTheme.enableAnimation
NumberAnimation { NumberAnimation {
easing.type: Easing.OutBack; easing.type: Easing.OutCubic
duration: 100 duration: 167
} }
} }
sourceComponent:itemcomponent ? itemcomponent : mcontrol.fluent_sytle; sourceComponent:itemcomponent ? itemcomponent : mcontrol.fluent_sytle;

View File

@ -31,7 +31,6 @@ Item{
var y = 0; var y = 0;
var w = control.width; var w = control.width;
var h = control.height; var h = control.height;
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save(); ctx.save();
ctx.beginPath(); ctx.beginPath();

View File

@ -5,7 +5,7 @@ import QtQuick.Templates as T
import FluentUI import FluentUI
T.Menu { T.Menu {
property bool animEnabled: true property bool enableAnimation: true
id: control id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
contentWidth + leftPadding + rightPadding) contentWidth + leftPadding + rightPadding)
@ -20,7 +20,7 @@ T.Menu {
property: "opacity" property: "opacity"
from:0 from:0
to:1 to:1
duration: animEnabled ? 83 : 0 duration: FluTheme.enableAnimation && control.enableAnimation ? 83 : 0
} }
} }
exit:Transition { exit:Transition {
@ -28,7 +28,7 @@ T.Menu {
property: "opacity" property: "opacity"
from:1 from:1
to:0 to:0
duration: animEnabled ? 83 : 0 duration: FluTheme.enableAnimation && control.enableAnimation ? 83 : 0
} }
} }
contentItem: ListView { contentItem: ListView {

View File

@ -23,7 +23,7 @@ TextArea{
font:FluTextStyle.Body font:FluTextStyle.Body
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
padding: 8 padding: 8
leftPadding: 8 leftPadding: padding+2
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectedTextColor: color selectedTextColor: color
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6) selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)

View File

@ -12,27 +12,27 @@ Item {
Minimal = 2, Minimal = 2,
Auto = 3 Auto = 3
} }
enum PageModeFlag{ enum PageMode {
Standard = 0, Stack = 0,
SingleTask = 1, NoStack = 1
SingleTop = 2,
SingleInstance = 3
} }
property url logo property url logo
property string title: "" property string title: ""
property FluObject items property FluObject items
property FluObject footerItems property FluObject footerItems
property bool dontPageAnimation: false
property int displayMode: FluNavigationView.Auto property int displayMode: FluNavigationView.Auto
property Component autoSuggestBox property Component autoSuggestBox
property Component actionItem property Component actionItem
property int topPadding: 0 property int topPadding: 0
signal loginClicked property int navWidth: 300
property int pageMode: FluNavigationView.Stack
signal logoClicked
id:control id:control
QtObject{ QtObject{
id:d id:d
property bool animDisabled:false
property var stackItems: [] property var stackItems: []
property int displayMode: FluNavigationView.Open property int displayMode: control.displayMode
property bool enableNavigationPanel: false property bool enableNavigationPanel: false
property bool isCompact: d.displayMode === FluNavigationView.Compact property bool isCompact: d.displayMode === FluNavigationView.Compact
property bool isMinimal: d.displayMode === FluNavigationView.Minimal property bool isMinimal: d.displayMode === FluNavigationView.Minimal
@ -43,21 +43,21 @@ Item {
collapseAll() collapseAll()
} }
function handleItems(){ function handleItems(){
var idx = 0 var _idx = 0
var data = [] var data = []
if(items){ if(items){
for(var i=0;i<items.children.length;i++){ for(var i=0;i<items.children.length;i++){
var item = items.children[i] var item = items.children[i]
item.idx = idx item._idx = _idx
data.push(item) data.push(item)
idx++ _idx++
if(item instanceof FluPaneItemExpander){ if(item instanceof FluPaneItemExpander){
for(var j=0;j<item.children.length;j++){ for(var j=0;j<item.children.length;j++){
var itemChild = item.children[j] var itemChild = item.children[j]
itemChild.parent = item itemChild.parent = item
itemChild.idx = idx itemChild._idx = _idx
data.push(itemChild) data.push(itemChild)
idx++ _idx++
} }
} }
} }
@ -66,10 +66,10 @@ Item {
for(var k=0;k<footerItems.children.length;k++){ for(var k=0;k<footerItems.children.length;k++){
var itemFooter = footerItems.children[k] var itemFooter = footerItems.children[k]
if (comEmpty.status === Component.Ready) { if (comEmpty.status === Component.Ready) {
var objEmpty = comEmpty.createObject(items,{idx:idx}); var objEmpty = comEmpty.createObject(items,{_idx:_idx});
itemFooter.idx = idx; itemFooter._idx = _idx;
data.push(objEmpty) data.push(objEmpty)
idx++ _idx++
} }
} }
} }
@ -90,6 +90,14 @@ Item {
return FluNavigationView.Open return FluNavigationView.Open
} }
}) })
timer_anim_delay.restart()
}
Timer{
id:timer_anim_delay
interval: 200
onTriggered: {
d.animDisabled = true
}
} }
Connections{ Connections{
target: d target: d
@ -118,11 +126,6 @@ Item {
} }
return 1 return 1
} }
Behavior on height {
NumberAnimation{
duration: 83
}
}
} }
} }
Component{ Component{
@ -135,6 +138,7 @@ Item {
return 30 return 30
} }
Behavior on height { Behavior on height {
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{ NumberAnimation{
duration: 83 duration: 83
} }
@ -201,7 +205,6 @@ Item {
return false return false
} }
} }
Rectangle{ Rectangle{
radius: 4 radius: 4
anchors.fill: parent anchors.fill: parent
@ -213,7 +216,7 @@ Item {
visible: { visible: {
for(var i=0;i<model.children.length;i++){ for(var i=0;i<model.children.length;i++){
var item = model.children[i] var item = model.children[i]
if(item.idx === nav_list.currentIndex && !model.isExpand){ if(item._idx === nav_list.currentIndex && !model.isExpand){
return true return true
} }
} }
@ -223,7 +226,6 @@ Item {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
} }
FluIcon{ FluIcon{
id:item_icon_expand id:item_icon_expand
rotation: model.isExpand?0:180 rotation: model.isExpand?0:180
@ -241,14 +243,16 @@ Item {
return true return true
} }
Behavior on rotation { Behavior on rotation {
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{ NumberAnimation{
duration: 83 duration: 167
easing.type: Easing.OutCubic
} }
} }
} }
color: { color: {
if(FluTheme.dark){ if(FluTheme.dark){
if((nav_list.currentIndex === idx)&&type===0){ if((nav_list.currentIndex === _idx)&&type===0){
return Qt.rgba(1,1,1,0.06) return Qt.rgba(1,1,1,0.06)
} }
if(item_control.hovered){ if(item_control.hovered){
@ -256,7 +260,7 @@ Item {
} }
return Qt.rgba(0,0,0,0) return Qt.rgba(0,0,0,0)
}else{ }else{
if(nav_list.currentIndex === idx&&type===0){ if(nav_list.currentIndex === _idx&&type===0){
return Qt.rgba(0,0,0,0.06) return Qt.rgba(0,0,0,0.06)
} }
if(item_control.hovered){ if(item_control.hovered){
@ -326,6 +330,7 @@ Item {
id:com_panel_item id:com_panel_item
Item{ Item{
Behavior on height { Behavior on height {
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{ NumberAnimation{
duration: 83 duration: 83
} }
@ -361,7 +366,7 @@ Item {
if(model.tapFunc){ if(model.tapFunc){
model.tapFunc() model.tapFunc()
}else{ }else{
nav_list.currentIndex = idx nav_list.currentIndex = _idx
layout_footer.currentIndex = -1 layout_footer.currentIndex = -1
model.tap() model.tap()
if(d.isMinimal || d.isCompact){ if(d.isMinimal || d.isCompact){
@ -372,8 +377,8 @@ Item {
if(model.tapFunc){ if(model.tapFunc){
model.tapFunc() model.tapFunc()
}else{ }else{
nav_list.currentIndex = nav_list.count-layout_footer.count+idx nav_list.currentIndex = nav_list.count-layout_footer.count+_idx
layout_footer.currentIndex = idx layout_footer.currentIndex = _idx
model.tap() model.tap()
if(d.isMinimal || d.isCompact){ if(d.isMinimal || d.isCompact){
d.enableNavigationPanel = false d.enableNavigationPanel = false
@ -387,11 +392,11 @@ Item {
color: { color: {
if(FluTheme.dark){ if(FluTheme.dark){
if(type===0){ if(type===0){
if(nav_list.currentIndex === idx){ if(nav_list.currentIndex === _idx){
return Qt.rgba(1,1,1,0.06) return Qt.rgba(1,1,1,0.06)
} }
}else{ }else{
if(nav_list.currentIndex === (nav_list.count-layout_footer.count+idx)){ if(nav_list.currentIndex === (nav_list.count-layout_footer.count+_idx)){
return Qt.rgba(1,1,1,0.06) return Qt.rgba(1,1,1,0.06)
} }
} }
@ -401,11 +406,11 @@ Item {
return Qt.rgba(0,0,0,0) return Qt.rgba(0,0,0,0)
}else{ }else{
if(type===0){ if(type===0){
if(nav_list.currentIndex === idx){ if(nav_list.currentIndex === _idx){
return Qt.rgba(0,0,0,0.06) return Qt.rgba(0,0,0,0.06)
} }
}else{ }else{
if(nav_list.currentIndex === (nav_list.count-layout_footer.count+idx)){ if(nav_list.currentIndex === (nav_list.count-layout_footer.count+_idx)){
return Qt.rgba(0,0,0,0.06) return Qt.rgba(0,0,0,0.06)
} }
} }
@ -515,31 +520,39 @@ Item {
Layout.preferredWidth: 30 Layout.preferredWidth: 30
Layout.preferredHeight: 30 Layout.preferredHeight: 30
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
disabled: nav_swipe.depth <= 1 disabled: {
return d.stackItems.length <= 1
}
iconSize: 13 iconSize: 13
onClicked: { onClicked: {
FluTools.deleteItem(nav_swipe.pop()) d.stackItems = d.stackItems.slice(0, -1)
d.stackItems.pop()
var item = d.stackItems[d.stackItems.length-1] var item = d.stackItems[d.stackItems.length-1]
if(item.idx<(nav_list.count - layout_footer.count)){ if(item._idx<(nav_list.count - layout_footer.count)){
layout_footer.currentIndex = -1 layout_footer.currentIndex = -1
}else{ }else{
layout_footer.currentIndex = item.idx-(nav_list.count-layout_footer.count) layout_footer.currentIndex = item._idx-(nav_list.count-layout_footer.count)
} }
nav_list.currentIndex = item.idx nav_list.currentIndex = item._idx
if(nav_swipe.currentItem.pageMode === FluNavigationView.SingleInstance){ if(pageMode === FluNavigationView.Stack){
var url = nav_swipe.currentItem.url var nav_stack = loader_content.item.navStack()
var pageIndex = -1 var nav_stack2 = loader_content.item.navStack2()
for(var i=0;i<nav_swipe2.children.length;i++){ nav_stack.pop()
var obj = nav_swipe2.children[i] if(nav_stack.currentItem.launchMode === FluPage.SingleInstance){
if(obj.url === url){ var url = nav_stack.currentItem.url
pageIndex = i var pageIndex = -1
break for(var i=0;i<nav_stack2.children.length;i++){
var obj = nav_stack2.children[i]
if(obj.url === url){
pageIndex = i
break
}
}
if(pageIndex !== -1){
nav_stack2.currentIndex = pageIndex
} }
} }
if(pageIndex !== -1){ }else if(pageMode === FluNavigationView.NoStack){
nav_swipe2.currentIndex = pageIndex loader_content.setSource(item._ext.url,item._ext.argument)
}
} }
} }
} }
@ -557,14 +570,16 @@ Item {
visible: opacity visible: opacity
opacity: d.isMinimal opacity: d.isMinimal
Behavior on opacity{ Behavior on opacity{
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{ NumberAnimation{
duration: 83 duration: 83
} }
} }
Behavior on Layout.preferredWidth { Behavior on Layout.preferredWidth {
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{ NumberAnimation{
duration: 167 duration: 167
easing.type: Easing.InCubic easing.type: Easing.OutCubic
} }
} }
} }
@ -584,7 +599,7 @@ Item {
MouseArea{ MouseArea{
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
loginClicked() logoClicked()
} }
} }
} }
@ -611,7 +626,39 @@ Item {
} }
} }
} }
Item{
Component{
id:com_stack_content
Item{
StackView{
id:nav_stack
anchors.fill: parent
clip: true
visible: !nav_stack2.visible
popEnter : Transition{}
popExit : Transition {}
pushEnter: Transition {}
pushExit : Transition{}
replaceEnter : Transition{}
replaceExit : Transition{}
}
StackLayout{
id:nav_stack2
anchors.fill: nav_stack
clip: true
visible: nav_stack.currentItem?.launchMode === FluPage.SingleInstance
}
function navStack(){
return nav_stack
}
function navStack2(){
return nav_stack2
}
}
}
Loader{
id:loader_content
anchors{ anchors{
left: parent.left left: parent.left
top: nav_app_bar.bottom top: nav_app_bar.bottom
@ -624,33 +671,17 @@ Item {
if(d.isCompact){ if(d.isCompact){
return 50 return 50
} }
return 300 return control.navWidth
} }
} }
Behavior on anchors.leftMargin { Behavior on anchors.leftMargin {
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{ NumberAnimation{
duration: 167 duration: 167
easing.type: Easing.InCubic easing.type: Easing.OutCubic
} }
} }
StackView{ sourceComponent: com_stack_content
id:nav_swipe
anchors.fill: parent
clip: true
visible: !nav_swipe2.visible
popEnter : Transition{}
popExit : Transition {}
pushEnter: Transition {}
pushExit : Transition{}
replaceEnter : Transition{}
replaceExit : Transition{}
}
StackLayout{
id:nav_swipe2
anchors.fill: nav_swipe
clip: true
visible: nav_swipe.currentItem.pageMode === FluNavigationView.SingleInstance
}
} }
MouseArea{ MouseArea{
anchors.fill: parent anchors.fill: parent
@ -667,7 +698,7 @@ Item {
if(d.isCompactAndNotPanel){ if(d.isCompactAndNotPanel){
return 50 return 50
} }
return 300 return control.navWidth
} }
anchors{ anchors{
top: parent.top top: parent.top
@ -683,15 +714,17 @@ Item {
} }
x: visible ? 0 : -width x: visible ? 0 : -width
Behavior on width { Behavior on width {
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{ NumberAnimation{
duration: 167 duration: 167
easing.type: Easing.InCubic easing.type: Easing.OutCubic
} }
} }
Behavior on x { Behavior on x {
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{ NumberAnimation{
duration: 167 duration: 167
easing.type: Easing.InCubic easing.type: Easing.OutCubic
} }
} }
visible: { visible: {
@ -700,7 +733,7 @@ Item {
return d.isMinimalAndPanel ? true : false return d.isMinimalAndPanel ? true : false
} }
FluAcrylic { FluAcrylic {
sourceItem:nav_swipe sourceItem:loader_content
anchors.fill: layout_list anchors.fill: layout_list
color: { color: {
if(d.isMinimalAndPanel || d.isCompactAndPanel){ if(d.isMinimalAndPanel || d.isCompactAndPanel){
@ -751,27 +784,8 @@ Item {
} }
} }
} }
ListView{ Flickable{
id:nav_list id:layout_flickable
clip: true
ScrollBar.vertical: FluScrollBar {}
model:d.handleItems()
highlightMoveDuration: 167
highlight: Item{
clip: true
Rectangle{
height: 18
radius: 1.5
color: FluTheme.primaryColor.dark
width: 3
anchors{
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 6
}
}
}
currentIndex: -1
anchors{ anchors{
top: layout_header.bottom top: layout_header.bottom
topMargin: 6 topMargin: 6
@ -779,29 +793,58 @@ Item {
right: parent.right right: parent.right
bottom: layout_footer.top bottom: layout_footer.top
} }
delegate: Loader{ boundsBehavior: ListView.StopAtBounds
property var model: modelData clip: true
property var idx: index contentHeight: nav_list.contentHeight
property int type: 0 ScrollBar.vertical: FluScrollBar {}
sourceComponent: { ListView{
if(modelData instanceof FluPaneItem){ id:nav_list
return com_panel_item clip: true
anchors.fill: parent
model:d.handleItems()
boundsBehavior: ListView.StopAtBounds
highlightMoveDuration: FluTheme.enableAnimation && d.animDisabled ? 167 : 0
highlight: Item{
clip: true
Rectangle{
height: 18
radius: 1.5
color: FluTheme.primaryColor.dark
width: 3
anchors{
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 6
}
} }
if(modelData instanceof FluPaneItemHeader){ }
return com_panel_item_header currentIndex: -1
}
if(modelData instanceof FluPaneItemSeparator){ delegate: Loader{
return com_panel_item_separatorr property var model: modelData
} property var _idx: index
if(modelData instanceof FluPaneItemExpander){ property int type: 0
return com_panel_item_expander sourceComponent: {
} if(modelData instanceof FluPaneItem){
if(modelData instanceof FluPaneItemEmpty){ return com_panel_item
return com_panel_item_empty }
if(modelData instanceof FluPaneItemHeader){
return com_panel_item_header
}
if(modelData instanceof FluPaneItemSeparator){
return com_panel_item_separatorr
}
if(modelData instanceof FluPaneItemExpander){
return com_panel_item_expander
}
if(modelData instanceof FluPaneItemEmpty){
return com_panel_item_empty
}
} }
} }
} }
} }
ListView{ ListView{
id:layout_footer id:layout_footer
clip: true clip: true
@ -809,6 +852,7 @@ Item {
height: childrenRect.height height: childrenRect.height
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
interactive: false interactive: false
boundsBehavior: ListView.StopAtBounds
currentIndex: -1 currentIndex: -1
model: { model: {
if(footerItems){ if(footerItems){
@ -832,7 +876,7 @@ Item {
} }
delegate: Loader{ delegate: Loader{
property var model: modelData property var model: modelData
property var idx: index property var _idx: index
property int type: 1 property int type: 1
sourceComponent: { sourceComponent: {
if(modelData instanceof FluPaneItem){ if(modelData instanceof FluPaneItem){
@ -931,7 +975,7 @@ Item {
modelData.tapFunc() modelData.tapFunc()
}else{ }else{
modelData.tap() modelData.tap()
nav_list.currentIndex = idx nav_list.currentIndex = _idx
layout_footer.currentIndex = -1 layout_footer.currentIndex = -1
if(d.isMinimal || d.isCompact){ if(d.isMinimal || d.isCompact){
d.enableNavigationPanel = false d.enableNavigationPanel = false
@ -961,7 +1005,7 @@ Item {
Component{ Component{
id:com_placeholder id:com_placeholder
Item{ Item{
property int pageMode: FluNavigationView.SingleInstance property int launchMode: FluPage.SingleInstance
property string url property string url
} }
} }
@ -983,68 +1027,90 @@ Item {
function getItems(){ function getItems(){
return nav_list.model return nav_list.model
} }
function push(url,argument={}){
var page = nav_swipe.find(function(item) {
return item.url === url;
})
if(page){
switch(page.pageMode)
{
case FluNavigationView.SingleTask:
while(nav_swipe.currentItem !== page)
{
FluTools.deleteItem(nav_swipe.pop())
d.stackItems.pop()
}
return
case FluNavigationView.SingleTop:
if (nav_swipe.currentItem.url === url){
return
}
break
case FluNavigationView.Standard:
default:
}
}
var pageIndex = -1
for(var i=0;i<nav_swipe2.children.length;i++){
var item = nav_swipe2.children[i]
if(item.url === url){
pageIndex = i
break
}
}
var options = Object.assign(argument,{url:url})
if(pageIndex!==-1){
nav_swipe2.currentIndex = pageIndex
nav_swipe.push(com_placeholder,options)
}else{
var comp = Qt.createComponent(url)
if (comp.status === Component.Ready) {
var obj = comp.createObject(nav_swipe,options)
if(obj.pageMode === FluNavigationView.SingleInstance){
nav_swipe.push(com_placeholder,options)
nav_swipe2.children.push(obj)
nav_swipe2.currentIndex = nav_swipe2.count - 1
}else{
nav_swipe.push(obj)
}
}else{
console.error(comp.errorString())
}
}
d.stackItems.push(nav_list.model[nav_list.currentIndex])
}
function getCurrentIndex(){ function getCurrentIndex(){
return nav_list.currentIndex return nav_list.currentIndex
} }
function getCurrentUrl(){ function getCurrentUrl(){
if(nav_swipe.currentItem){ if(pageMode === FluNavigationView.Stack){
return nav_swipe.currentItem.url var nav_stack = loader_content.item.navStack()
if(nav_stack.currentItem){
return nav_stack.currentItem.url
}
}else if(pageMode === FluNavigationView.NoStack){
return loader_content.source.toString()
} }
return undefined return undefined
} }
function push(url,argument={}){
function stackPush(){
var nav_stack = loader_content.item.navStack()
var nav_stack2 = loader_content.item.navStack2()
var page = nav_stack.find(function(item) {
return item.url === url;
})
if(page){
switch(page.launchMode)
{
case FluPage.SingleTask:
while(nav_stack.currentItem !== page)
{
nav_stack.pop()
d.stackItems = d.stackItems.slice(0, -1)
}
return
case FluPage.SingleTop:
if (nav_stack.currentItem.url === url){
return
}
break
case FluPage.Standard:
default:
}
}
var pageIndex = -1
for(var i=0;i<nav_stack2.children.length;i++){
var item = nav_stack2.children[i]
if(item.url === url){
pageIndex = i
break
}
}
var options = Object.assign(argument,{url:url})
if(pageIndex!==-1){
nav_stack2.currentIndex = pageIndex
nav_stack.push(com_placeholder,options)
}else{
var comp = Qt.createComponent(url)
if (comp.status === Component.Ready) {
var obj = comp.createObject(nav_stack,options)
if(obj.launchMode === FluPage.SingleInstance){
nav_stack.push(com_placeholder,options)
nav_stack2.children.push(obj)
nav_stack2.currentIndex = nav_stack2.count - 1
}else{
nav_stack.push(obj)
}
}else{
console.error(comp.errorString())
}
}
d.stackItems = d.stackItems.concat(nav_list.model[nav_list.currentIndex])
}
function noStackPush(){
if(loader_content.source.toString() === url){
return
}
loader_content.setSource(url,argument)
var obj = nav_list.model[nav_list.currentIndex]
obj._ext = {url:url,argument:argument}
d.stackItems = d.stackItems.concat(obj)
}
if(pageMode === FluNavigationView.Stack){
stackPush()
}else if(pageMode === FluNavigationView.NoStack){
noStackPush()
}
}
function startPageByItem(data){ function startPageByItem(data){
var items = getItems() var items = getItems()
for(var i=0;i<items.length;i++){ for(var i=0;i<items.length;i++){

View File

@ -5,18 +5,36 @@ import QtQuick.Window
import FluentUI import FluentUI
Item { Item {
property int pageMode: FluNavigationView.SingleTop enum LaunchMode{
Standard = 0,
SingleTask = 1,
SingleTop = 2,
SingleInstance = 3
}
property int launchMode: FluPage.SingleTop
property bool animDisabled: false
property string url : "" property string url : ""
id: control id: control
opacity: visible opacity: visible
visible: false visible: false
StackView.onRemoved: destroy()
Behavior on opacity{ Behavior on opacity{
enabled: !animDisabled && FluTheme.enableAnimation
NumberAnimation{ NumberAnimation{
duration: 83 duration: 167
}
}
transform: Translate {
y: control.visible ? 0 : 80
Behavior on y{
enabled: !animDisabled && FluTheme.enableAnimation
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
}
} }
} }
Component.onCompleted: { Component.onCompleted: {
visible = true visible = true
} }
} }

View File

@ -4,7 +4,8 @@ import FluentUI
QtObject { QtObject {
readonly property string key : FluTools.uuid() readonly property string key : FluTools.uuid()
readonly property int flag : 0 property int _idx
property var _ext
property string title property string title
property int order : 0 property int order : 0
property int icon property int icon
@ -15,7 +16,6 @@ QtObject {
property string desc property string desc
property var image property var image
property var parent property var parent
property int idx
property int count: 0 property int count: 0
signal tap signal tap
property var tapFunc property var tapFunc

View File

@ -4,6 +4,7 @@ import FluentUI
QtObject { QtObject {
readonly property string key : FluTools.uuid() readonly property string key : FluTools.uuid()
property int _idx
property var _ext
property var parent property var parent
property int idx
} }

View File

@ -4,10 +4,10 @@ import FluentUI
FluObject { FluObject {
readonly property string key : FluTools.uuid() readonly property string key : FluTools.uuid()
property int _idx
property string title property string title
property var icon property var icon
property Component cusIcon property Component cusIcon
property bool isExpand: false property bool isExpand: false
property var parent property var parent
property int idx
} }

View File

@ -4,7 +4,7 @@ import FluentUI
QtObject { QtObject {
readonly property string key : FluTools.uuid() readonly property string key : FluTools.uuid()
property int _idx
property string title property string title
property var parent property var parent
property int idx
} }

View File

@ -4,6 +4,6 @@ import FluentUI
QtObject { QtObject {
readonly property string key : FluTools.uuid() readonly property string key : FluTools.uuid()
property int _idx
property var parent property var parent
property int idx
} }

View File

@ -23,7 +23,7 @@ TextField{
} }
font:FluTextStyle.Body font:FluTextStyle.Body
padding: 8 padding: 8
leftPadding: 8 leftPadding: padding+2
echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6) selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)

View File

@ -28,7 +28,7 @@ Item {
spacing: 20 spacing: 20
interactive: false interactive: false
orientation: ListView.Horizontal orientation: ListView.Horizontal
highlightMoveDuration: 167 highlightMoveDuration: FluTheme.enableAnimation ? 167 : 0
highlight: Item{ highlight: Item{
clip: true clip: true
Rectangle{ Rectangle{
@ -38,9 +38,10 @@ Item {
width: nav_list.currentItem ? nav_list.currentItem.width : 0 width: nav_list.currentItem ? nav_list.currentItem.width : 0
y:37 y:37
Behavior on width { Behavior on width {
enabled: FluTheme.enableAnimation
NumberAnimation{ NumberAnimation{
duration: 167 duration: 167
easing.type: Easing.InCubic easing.type: Easing.OutCubic
} }
} }
} }

View File

@ -20,11 +20,12 @@ Popup {
properties: "scale" properties: "scale"
from:1.2 from:1.2
to:1 to:1
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
easing.type: Easing.OutCubic
} }
NumberAnimation { NumberAnimation {
property: "opacity" property: "opacity"
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
from:0 from:0
to:1 to:1
} }
@ -34,11 +35,12 @@ Popup {
properties: "scale" properties: "scale"
from:1 from:1
to:1.2 to:1.2
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
easing.type: Easing.OutCubic
} }
NumberAnimation { NumberAnimation {
property: "opacity" property: "opacity"
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
from:1 from:1
to:0 to:0
} }

View File

@ -2,44 +2,67 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
FluRectangle { Item{
property real progress: 0.5 property real progress: 0.5
property bool indeterminate: true property bool indeterminate: true
property bool progressVisible: false
id: control id: control
width: 150 width: 150
height: 5 height: 5
radius: [3,3,3,3]
clip: true FluRectangle {
color: FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1) shadow: false
Component.onCompleted: { radius: [3,3,3,3]
if(indeterminate){ anchors.fill: parent
bar.x = -control.width*0.5 color: FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1)
behavior.enabled = true Component.onCompleted: {
bar.x = control.width if(indeterminate){
}else{ bar.x = -control.width*0.5
bar.x = 0 behavior.enabled = true
bar.x = control.width
}else{
bar.x = 0
}
} }
} Rectangle{
Rectangle{ id:bar
id:bar radius: 3
radius: 3 width: control.width*progress
width: control.width*progress height: control.height
height: control.height color:FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
color:FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark Behavior on x{
Behavior on x{ id:behavior
id:behavior enabled: false
enabled: false NumberAnimation{
NumberAnimation{ duration: 1000
duration: 1000 onRunningChanged: {
onRunningChanged: { if(!running){
if(!running){ behavior.enabled = false
behavior.enabled = false bar.x = -control.width*0.5
bar.x = -control.width*0.5 behavior.enabled = true
behavior.enabled = true bar.x = control.width
bar.x = control.width }
} }
} }
} }
} }
} }
FluText{
text:(control.progress * 100).toFixed(0) + "%"
font.pixelSize: 10
visible: {
if(control.indeterminate){
return false
}
return control.progressVisible
}
anchors{
left: parent.left
leftMargin: control.width+5
verticalCenter: parent.verticalCenter
}
}
} }

View File

@ -3,11 +3,11 @@ import QtQuick.Controls
import FluentUI import FluentUI
Rectangle { Rectangle {
property real linWidth : width/8 property real linWidth : 5
property real progress: 0.25 property real progress: 0.25
property bool indeterminate: true property bool indeterminate: true
readonly property real radius2 : radius - linWidth/2
property color primaryColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color primaryColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
property bool progressVisible: false
id: control id: control
width: 44 width: 44
height: 44 height: 44
@ -24,6 +24,10 @@ Rectangle {
control.rotation = 360 control.rotation = 360
} }
} }
QtObject{
id:d
property real _radius: control.radius-control.linWidth/2
}
Connections{ Connections{
target: FluTheme target: FluTheme
function onDarkChanged(){ function onDarkChanged(){
@ -35,8 +39,6 @@ Rectangle {
enabled: false enabled: false
NumberAnimation{ NumberAnimation{
duration: 999 duration: 999
easing.type: Easing.BezierSpline
easing.bezierCurve: [0.55,0.55,0,1]
onRunningChanged: { onRunningChanged: {
if(!running){ if(!running){
behavior.enabled = false behavior.enabled = false
@ -53,18 +55,28 @@ Rectangle {
antialiasing: true antialiasing: true
renderTarget: Canvas.Image renderTarget: Canvas.Image
onPaint: { onPaint: {
var ctx = canvas.getContext("2d"); var ctx = canvas.getContext("2d")
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.clearRect(0, 0, canvas.width, canvas.height)
ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.save()
ctx.save(); ctx.lineWidth = linWidth
ctx.lineWidth = linWidth; ctx.strokeStyle = primaryColor
ctx.strokeStyle = primaryColor; ctx.fillStyle = primaryColor
ctx.fillStyle = primaryColor; ctx.beginPath()
ctx.beginPath(); ctx.arc(width/2, height/2, d._radius ,-0.5 * Math.PI,-0.5 * Math.PI + progress * 2 * Math.PI)
ctx.arc(width/2, height/2, radius2 ,-0.5 * Math.PI,-0.5 * Math.PI + progress * 2 * Math.PI); ctx.stroke()
ctx.stroke(); ctx.closePath()
ctx.closePath(); ctx.restore()
ctx.restore();
} }
} }
FluText{
text:(control.progress * 100).toFixed(0) + "%"
font.pixelSize: 10
visible: {
if(control.indeterminate){
return false
}
return control.progressVisible
}
anchors.centerIn: parent
}
} }

View File

@ -62,10 +62,10 @@ Button {
return checked ? 4 : 1 return checked ? 4 : 1
} }
Behavior on border.width { Behavior on border.width {
enabled: FluTheme.enableAnimation
NumberAnimation{ NumberAnimation{
duration: 167 duration: 167
easing.type: Easing.BezierSpline easing.type: Easing.OutCubic
easing.bezierCurve: [ 0, 0, 0, 1 ]
} }
} }
border.color: { border.color: {

View File

@ -9,6 +9,15 @@ Item{
property bool shadow: true property bool shadow: true
default property alias contentItem: container.data default property alias contentItem: container.data
id:control id:control
onWidthChanged: {
canvas.requestPaint()
}
onHeightChanged: {
canvas.requestPaint()
}
onRadiusChanged: {
canvas.requestPaint()
}
FluShadow{ FluShadow{
anchors.fill: container anchors.fill: container
radius: control.radius[0] radius: control.radius[0]
@ -36,7 +45,6 @@ Item{
var y = 0; var y = 0;
var w = control.width; var w = control.width;
var h = control.height; var h = control.height;
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save(); ctx.save();
ctx.beginPath(); ctx.beginPath();

View File

@ -33,4 +33,7 @@ FluStatusView {
var timestamp = Date.now(); var timestamp = Date.now();
loader.source = control.source+"?"+timestamp loader.source = control.source+"?"+timestamp
} }
function itemLodaer(){
return loader
}
} }

View File

@ -41,7 +41,7 @@ T.ScrollBar {
} }
states: [ states: [
State{ State{
name:"hide" name:"show"
when: contentItem.collapsed when: contentItem.collapsed
PropertyChanges { PropertyChanges {
target: rect_bar target: rect_bar
@ -50,8 +50,8 @@ T.ScrollBar {
} }
} }
,State{ ,State{
name:"show" name:"hide"
when: !contentItem.expand when: !contentItem.collapsed
PropertyChanges { PropertyChanges {
target: rect_bar target: rect_bar
width: vertical ? 2 : parent.width width: vertical ? 2 : parent.width
@ -61,26 +61,24 @@ T.ScrollBar {
] ]
transitions:[ transitions:[
Transition { Transition {
from: "hide" to: "hide"
SequentialAnimation { SequentialAnimation {
PauseAnimation { duration: 450 } PauseAnimation { duration: 450 }
NumberAnimation { NumberAnimation {
target: rect_bar target: rect_bar
properties: vertical ? "width" : "height" properties: vertical ? "width" : "height"
duration: 167 duration: 167
easing.type: Easing.InCubic easing.type: Easing.OutCubic
to:2
} }
} }
} }
,Transition { ,Transition {
from: "show" to: "show"
NumberAnimation { NumberAnimation {
target: rect_bar target: rect_bar
properties: vertical ? "width" : "height" properties: vertical ? "width" : "height"
duration: 167 duration: 167
easing.type: Easing.InCubic easing.type: Easing.OutCubic
to:6
} }
} }
] ]

View File

@ -44,6 +44,7 @@ FluPage {
anchors.right: flickview.right anchors.right: flickview.right
anchors.rightMargin: 2 anchors.rightMargin: 2
} }
boundsBehavior: Flickable.StopAtBounds
anchors{ anchors{
top: text_title.bottom top: text_title.bottom
bottom: parent.bottom bottom: parent.bottom

View File

@ -36,8 +36,10 @@ T.Slider {
return control.hovered ? 6/10 : 5/10 return control.hovered ? 6/10 : 5/10
} }
Behavior on scale { Behavior on scale {
enabled: FluTheme.enableAnimation
NumberAnimation{ NumberAnimation{
duration: 167 duration: 167
easing.type: Easing.OutCubic
} }
} }
} }

View File

@ -5,6 +5,7 @@ import FluentUI
Rectangle{ Rectangle{
readonly property string displayText : d._displayText readonly property string displayText : d._displayText
property bool disabled: false
property int from: 0 property int from: 0
property int to: 99 property int to: 99
property var validator: IntValidator { property var validator: IntValidator {
@ -27,6 +28,7 @@ Rectangle{
FluTextBox{ FluTextBox{
rightPadding: 80 rightPadding: 80
closeRightMargin: 55 closeRightMargin: 55
disabled: control.disabled
validator: control.validator validator: control.validator
text: d._displayText text: d._displayText
Component.onCompleted: { Component.onCompleted: {
@ -51,6 +53,7 @@ Rectangle{
anchors.fill: parent anchors.fill: parent
readOnly: true readOnly: true
rightPadding: 80 rightPadding: 80
disabled: control.disabled
text: control.displayText text: control.displayText
MouseArea{ MouseArea{
anchors.fill: parent anchors.fill: parent
@ -68,8 +71,13 @@ Rectangle{
width: 20 width: 20
height: 20 height: 20
iconSize: 16 iconSize: 16
disabled: {
if(control.disabled===true){
return true
}
return Number(control.displayText) === control.to
}
iconSource: FluentIcons.ChevronUp iconSource: FluentIcons.ChevronUp
enabled: Number(control.displayText) !== control.to
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
right: parent.right right: parent.right
@ -102,8 +110,13 @@ Rectangle{
iconSource: FluentIcons.ChevronDown iconSource: FluentIcons.ChevronDown
width: 20 width: 20
height: 20 height: 20
disabled: {
if(control.disabled === true){
return true
}
return Number(control.displayText) === control.from
}
iconSize: 16 iconSize: 16
enabled: Number(control.displayText) !== control.from
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
right: parent.right right: parent.right

View File

@ -19,77 +19,90 @@ Item{
property string errorButtonText: "重新加载" property string errorButtonText: "重新加载"
property color color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) property color color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
signal errorClicked signal errorClicked
property Component loadingItem : com_loading
property Component emptyItem : com_empty
property Component errorItem : com_error
Item{ Item{
id:container id:container
anchors.fill: parent anchors.fill: parent
visible: statusMode === FluStatusView.Success visible: statusMode===FluStatusView.Success
} }
FluArea{ Loader{
paddings: 0 id:loader
border.width: 0 anchors.fill: parent
anchors.fill: container visible: statusMode!==FluStatusView.Success
visible: opacity sourceComponent: {
opacity: statusMode === FluStatusView.Loading if(statusMode === FluStatusView.Loading){
Behavior on opacity { return loadingItem
NumberAnimation { duration: 83 }
}
color:control.color
ColumnLayout{
anchors.centerIn: parent
visible: statusMode === FluStatusView.Loading
FluProgressRing{
indeterminate: true
Layout.alignment: Qt.AlignHCenter
} }
FluText{ if(statusMode === FluStatusView.Empty){
text:control.loadingText return emptyItem
Layout.alignment: Qt.AlignHCenter }
if(statusMode === FluStatusView.Error){
return errorItem
}
return undefined
}
}
Component{
id:com_loading
FluArea{
paddings: 0
border.width: 0
radius: 0
color:control.color
ColumnLayout{
anchors.centerIn: parent
FluProgressRing{
indeterminate: true
Layout.alignment: Qt.AlignHCenter
}
FluText{
text:control.loadingText
Layout.alignment: Qt.AlignHCenter
}
} }
} }
} }
FluArea{ Component {
paddings: 0 id:com_empty
border.width: 0 FluArea{
anchors.fill: container paddings: 0
visible: opacity border.width: 0
color:control.color radius: 0
opacity: statusMode === FluStatusView.Empty color:control.color
Behavior on opacity { ColumnLayout{
NumberAnimation { duration: 83 } anchors.centerIn: parent
} FluText{
ColumnLayout{ text:control.emptyText
anchors.centerIn: parent font: FluTextStyle.BodyStrong
visible: statusMode === FluStatusView.Empty Layout.alignment: Qt.AlignHCenter
FluText{ }
text:control.emptyText
font: FluTextStyle.BodyStrong
Layout.alignment: Qt.AlignHCenter
} }
} }
} }
FluArea{ Component{
paddings: 0 id:com_error
border.width: 0 FluArea{
anchors.fill: container paddings: 0
visible: opacity border.width: 0
color:control.color radius: 0
opacity: statusMode === FluStatusView.Error color:control.color
Behavior on opacity { ColumnLayout{
NumberAnimation { duration: 83 } anchors.centerIn: parent
} FluText{
ColumnLayout{ text:control.errorText
anchors.centerIn: parent font: FluTextStyle.BodyStrong
FluText{ Layout.alignment: Qt.AlignHCenter
text:control.errorText }
font: FluTextStyle.BodyStrong FluFilledButton{
Layout.alignment: Qt.AlignHCenter id:btn_error
} Layout.alignment: Qt.AlignHCenter
FluFilledButton{ text:control.errorButtonText
id:btn_error onClicked:{
Layout.alignment: Qt.AlignHCenter control.errorClicked()
text:control.errorButtonText }
onClicked:{
control.errorClicked()
} }
} }
} }

View File

@ -49,6 +49,9 @@ Rectangle {
if(obj){ if(obj){
return obj return obj
} }
if(columnSource[column].editMultiline === true){
return com_edit_multiline
}
return com_edit return com_edit
} }
} }
@ -63,6 +66,23 @@ Rectangle {
} }
Component{ Component{
id:com_edit id:com_edit
FluTextBox{
text: display
readOnly: true === columnSource[column].readOnly
Component.onCompleted: {
forceActiveFocus()
selectAll()
}
onCommit: {
if(!readOnly){
display = text
}
tableView.closeEditor()
}
}
}
Component{
id:com_edit_multiline
Item{ Item{
anchors.fill: parent anchors.fill: parent
ScrollView{ ScrollView{
@ -175,6 +195,9 @@ Rectangle {
return w return w
} }
rowHeightProvider: function(row) { rowHeightProvider: function(row) {
if(row>=table_model.rowCount){
return 0
}
var h = table_model.getRow(row).height var h = table_model.getRow(row).height
if(row === item_loader.row){ if(row === item_loader.row){
item_loader.height = h item_loader.height = h
@ -199,7 +222,7 @@ Rectangle {
implicitWidth: columnSource[column].width implicitWidth: columnSource[column].width
Rectangle{ Rectangle{
anchors.fill: parent anchors.fill: parent
visible: item_loader.sourceComponent === null visible: !item_loader.sourceComponent
color: selected ? control.selectionColor : "#00000000" color: selected ? control.selectionColor : "#00000000"
} }
MouseArea{ MouseArea{
@ -209,6 +232,9 @@ Rectangle {
closeEditor() closeEditor()
table_view.interactive = false table_view.interactive = false
} }
onCanceled: {
table_view.interactive = true
}
onReleased: { onReleased: {
table_view.interactive = true table_view.interactive = true
} }
@ -220,7 +246,7 @@ Rectangle {
} }
onClicked: onClicked:
(event)=>{ (event)=>{
item_loader.sourceComponent = null item_loader.sourceComponent = undefined
if(!(event.modifiers & Qt.ControlModifier)){ if(!(event.modifiers & Qt.ControlModifier)){
selection_model.clear() selection_model.clear()
} }
@ -253,7 +279,7 @@ Rectangle {
property int column property int column
property int row property int row
property var tableView: control property var tableView: control
sourceComponent: null sourceComponent: undefined
onDisplayChanged: { onDisplayChanged: {
var obj = table_model.getRow(row) var obj = table_model.getRow(row)
obj[columnSource[column].dataIndex] = display obj[columnSource[column].dataIndex] = display
@ -267,12 +293,7 @@ Rectangle {
} }
SelectionRectangle { SelectionRectangle {
id:selection_rect id:selection_rect
target: { target: table_view
if(item_loader.sourceComponent){
return null
}
return table_view
}
bottomRightHandle:com_handle bottomRightHandle:com_handle
topLeftHandle: com_handle topLeftHandle: com_handle
onDraggingChanged: { onDraggingChanged: {
@ -295,26 +316,24 @@ Rectangle {
syncView: table_view syncView: table_view
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
clip: true clip: true
delegate: FluControl { delegate: Rectangle {
id:column_item_control id:column_item_control
readonly property real cellPadding: 8 readonly property real cellPadding: 8
property bool canceled: false
readonly property var obj : columnSource[column] readonly property var obj : columnSource[column]
implicitWidth: column_text.implicitWidth + (cellPadding * 2) implicitWidth: column_text.implicitWidth + (cellPadding * 2)
implicitHeight: Math.max(header_horizontal.height, column_text.implicitHeight + (cellPadding * 2)) implicitHeight: Math.max(header_horizontal.height, column_text.implicitHeight + (cellPadding * 2))
Rectangle{ color:{
anchors.fill: parent d.selectionFlag
color:{ if(column_item_control_mouse.pressed){
d.selectionFlag return control.pressedButtonColor
if(column_item_control.pressed){
return control.pressedButtonColor
}
if(selection_model.isColumnSelected(column)){
return control.hoverButtonColor
}
return column_item_control.hovered ? control.hoverButtonColor : FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
} }
border.color: FluTheme.dark ? "#252525" : "#e4e4e4" if(selection_model.isColumnSelected(column)){
return control.hoverButtonColor
}
return column_item_control_mouse.containsMouse&&!canceled ? control.hoverButtonColor : FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
} }
border.color: FluTheme.dark ? "#252525" : "#e4e4e4"
FluText { FluText {
id: column_text id: column_text
text: model.display text: model.display
@ -327,13 +346,30 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
onClicked: { MouseArea{
closeEditor() id:column_item_control_mouse
selection_model.clear() anchors.fill: parent
for(var i=0;i<=table_view.rows;i++){ anchors.rightMargin: 6
selection_model.select(table_model.index(i,column),ItemSelectionModel.Select) hoverEnabled: true
onCanceled: {
column_item_control.canceled = true
} }
d.selectionFlag = !d.selectionFlag onContainsMouseChanged: {
if(!containsMouse){
column_item_control.canceled = false
}
}
onClicked:
(event)=>{
closeEditor()
if(!(event.modifiers & Qt.ControlModifier)){
selection_model.clear()
}
for(var i=0;i<=table_view.rows;i++){
selection_model.select(table_model.index(i,column),ItemSelectionModel.Select)
}
d.selectionFlag = !d.selectionFlag
}
} }
MouseArea{ MouseArea{
property point clickPos: "0,0" property point clickPos: "0,0"
@ -341,20 +377,28 @@ Rectangle {
width: 6 width: 6
anchors.right: parent.right anchors.right: parent.right
acceptedButtons: Qt.LeftButton acceptedButtons: Qt.LeftButton
hoverEnabled: true
visible: !(obj.width === obj.minimumWidth && obj.width === obj.maximumWidth) visible: !(obj.width === obj.minimumWidth && obj.width === obj.maximumWidth)
cursorShape: Qt.SplitHCursor cursorShape: Qt.SplitHCursor
preventStealing: true
propagateComposedEvents: true
onPressed : onPressed :
(mouse)=>{ (mouse)=>{
header_horizontal.interactive = false
FluTools.setOverrideCursor(Qt.SplitHCursor) FluTools.setOverrideCursor(Qt.SplitHCursor)
clickPos = Qt.point(mouse.x, mouse.y) clickPos = Qt.point(mouse.x, mouse.y)
} }
onReleased:{ onReleased:{
header_horizontal.interactive = true
FluTools.restoreOverrideCursor()
}
onCanceled: {
header_horizontal.interactive = true
FluTools.restoreOverrideCursor() FluTools.restoreOverrideCursor()
} }
onPositionChanged: onPositionChanged:
(mouse)=>{ (mouse)=>{
if(!pressed){
return
}
var delta = Qt.point(mouse.x - clickPos.x, mouse.y - clickPos.y) var delta = Qt.point(mouse.x - clickPos.x, mouse.y - clickPos.y)
var minimumWidth = obj.minimumWidth var minimumWidth = obj.minimumWidth
var maximumWidth = obj.maximumWidth var maximumWidth = obj.maximumWidth
@ -388,25 +432,23 @@ Rectangle {
return [] return []
} }
} }
delegate: FluControl{ delegate: Rectangle{
id:item_control id:item_control
readonly property real cellPadding: 8 readonly property real cellPadding: 8
property bool canceled: false
implicitWidth: Math.max(header_vertical.width, row_text.implicitWidth + (cellPadding * 2)) implicitWidth: Math.max(header_vertical.width, row_text.implicitWidth + (cellPadding * 2))
implicitHeight: row_text.implicitHeight + (cellPadding * 2) implicitHeight: row_text.implicitHeight + (cellPadding * 2)
Rectangle{ color: {
anchors.fill: parent d.selectionFlag
color: { if(item_control_mouse.pressed){
d.selectionFlag return control.pressedButtonColor
if(item_control.pressed){
return control.pressedButtonColor
}
if(selection_model.isRowSelected(row)){
return control.hoverButtonColor
}
return item_control.hovered ? control.hoverButtonColor : FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
} }
border.color: FluTheme.dark ? "#252525" : "#e4e4e4" if(selection_model.isRowSelected(row)){
return control.hoverButtonColor
}
return item_control_mouse.containsMouse&&!canceled ? control.hoverButtonColor : FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
} }
border.color: FluTheme.dark ? "#252525" : "#e4e4e4"
FluText{ FluText{
id:row_text id:row_text
anchors.centerIn: parent anchors.centerIn: parent
@ -416,13 +458,30 @@ Rectangle {
return selection_model.rowIntersectsSelection(row) return selection_model.rowIntersectsSelection(row)
} }
} }
onClicked: { MouseArea{
closeEditor() id:item_control_mouse
selection_model.clear() anchors.fill: parent
for(var i=0;i<=columnSource.length;i++){ anchors.bottomMargin: 6
selection_model.select(table_model.index(row,i),ItemSelectionModel.Select) hoverEnabled: true
onCanceled: {
item_control.canceled = true
} }
d.selectionFlag = !d.selectionFlag onContainsMouseChanged: {
if(!containsMouse){
item_control.canceled = false
}
}
onClicked:
(event)=>{
closeEditor()
if(!(event.modifiers & Qt.ControlModifier)){
selection_model.clear()
}
for(var i=0;i<=columnSource.length;i++){
selection_model.select(table_model.index(row,i),ItemSelectionModel.Select)
}
d.selectionFlag = !d.selectionFlag
}
} }
MouseArea{ MouseArea{
property point clickPos: "0,0" property point clickPos: "0,0"
@ -431,28 +490,35 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
acceptedButtons: Qt.LeftButton acceptedButtons: Qt.LeftButton
cursorShape: Qt.SplitVCursor cursorShape: Qt.SplitVCursor
preventStealing: true
visible: { visible: {
var obj = table_model.getRow(row) var obj = table_model.getRow(row)
return !(obj.height === obj.minimumHeight && obj.width === obj.maximumHeight) return !(obj.height === obj.minimumHeight && obj.width === obj.maximumHeight)
} }
propagateComposedEvents: true
onPressed : onPressed :
(mouse)=>{ (mouse)=>{
header_vertical.interactive = false
FluTools.setOverrideCursor(Qt.SplitVCursor) FluTools.setOverrideCursor(Qt.SplitVCursor)
clickPos = Qt.point(mouse.x, mouse.y) clickPos = Qt.point(mouse.x, mouse.y)
} }
onReleased:{ onReleased:{
header_vertical.interactive = true
FluTools.restoreOverrideCursor()
}
onCanceled: {
header_vertical.interactive = true
FluTools.restoreOverrideCursor() FluTools.restoreOverrideCursor()
} }
onPositionChanged: onPositionChanged:
(mouse)=>{ (mouse)=>{
if(!pressed){
return
}
var obj = table_model.getRow(row) var obj = table_model.getRow(row)
var delta = Qt.point(mouse.x - clickPos.x, mouse.y - clickPos.y) var delta = Qt.point(mouse.x - clickPos.x, mouse.y - clickPos.y)
var minimumHeight = obj.minimumHeight var minimumHeight = obj.minimumHeight
var maximumHeight = obj.maximumHeight var maximumHeight = obj.maximumHeight
if(!minimumHeight){ if(!minimumHeight){
minimumHeight = 44 minimumHeight = 42
} }
if(!maximumHeight){ if(!maximumHeight){
maximumHeight = 65535 maximumHeight = 65535

View File

@ -16,7 +16,7 @@ TextField{
id:control id:control
width: 300 width: 300
padding: 8 padding: 8
leftPadding: 8 leftPadding: padding+2
enabled: !disabled enabled: !disabled
color: { color: {
if(!enabled){ if(!enabled){
@ -83,6 +83,7 @@ TextField{
right: parent.right right: parent.right
rightMargin: closeRightMargin rightMargin: closeRightMargin
} }
contentDescription:"清空"
onClicked:{ onClicked:{
control.text = "" control.text = ""
} }

View File

@ -47,10 +47,10 @@ Rectangle{
} }
} }
Behavior on height{ Behavior on height{
enabled: FluTheme.enableAnimation
NumberAnimation{ NumberAnimation{
duration: 83 duration: 83
easing.type: Easing.BezierSpline easing.type: Easing.OutCubic
easing.bezierCurve: [ 1, 0, 0, 0 ]
} }
} }
} }

View File

@ -9,7 +9,7 @@ FluMenu{
property string selectAllText : "全选" property string selectAllText : "全选"
property var inputItem property var inputItem
id:menu id:menu
animEnabled: false enableAnimation: false
width: 120 width: 120
onVisibleChanged: { onVisibleChanged: {
inputItem.forceActiveFocus() inputItem.forceActiveFocus()

View File

@ -106,7 +106,7 @@ Rectangle {
property: "opacity" property: "opacity"
from:0 from:0
to:1 to:1
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
exit:Transition { exit:Transition {
@ -114,7 +114,7 @@ Rectangle {
property: "opacity" property: "opacity"
from:1 from:1
to:0 to:0
duration: 83 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
background:Item{ background:Item{

View File

@ -69,17 +69,11 @@ Button {
return borderNormalColor return borderNormalColor
} }
Rectangle { Rectangle {
width: pressed ? 28 : 20 width: 20
anchors{ x:checked ? control_backgound.width-width : 0
left: checked ? undefined : parent.left
leftMargin: checked ? 20 : 0
right: checked ? parent.right : undefined
rightMargin: checked ? 0: 20
}
height: 20 height: 20
radius: 10 radius: 10
scale: hovered&enabled ? 7/10 : 6/10 scale: hovered&enabled ? 7/10 : 6/10
anchors.verticalCenter: parent.verticalCenter
color: { color: {
if(!enabled){ if(!enabled){
return dotDisableColor return dotDisableColor
@ -89,28 +83,16 @@ Button {
} }
return dotNormalColor return dotNormalColor
} }
Behavior on anchors.leftMargin { Behavior on x {
enabled: FluTheme.enableAnimation
NumberAnimation { NumberAnimation {
duration: 167 easing.type: Easing.OutCubic
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 1, 0, 0, 0 ]
}
}
Behavior on anchors.rightMargin {
NumberAnimation {
duration: 167
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
}
}
Behavior on width {
NumberAnimation {
duration: 167
} }
} }
Behavior on scale { Behavior on scale {
enabled: FluTheme.enableAnimation
NumberAnimation { NumberAnimation {
duration: 167 easing.type: Easing.OutCubic
} }
} }
} }

View File

@ -105,7 +105,6 @@ Item {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
} }
MouseArea{ MouseArea{
id:item_layout_mouse id:item_layout_mouse
anchors.fill: parent anchors.fill: parent
@ -200,9 +199,7 @@ Item {
FluIconButton{ FluIconButton{
id:item_layout_expanded id:item_layout_expanded
color:"#00000000" color:"#00000000"
iconSource:item_layout.expanded?FluentIcons.ChevronDown:FluentIcons.ChevronRight
opacity: item_layout.hasChild opacity: item_layout.hasChild
iconSize: 15
onClicked: { onClicked: {
if(!item_layout.hasChild){ if(!item_layout.hasChild){
item_layout_rect.onClickItem() item_layout_rect.onClickItem()
@ -210,6 +207,18 @@ Item {
} }
model.expanded = !model.expanded model.expanded = !model.expanded
} }
contentItem: FluIcon{
rotation: item_layout.expanded?0:-90
iconSource:FluentIcons.ChevronDown
iconSize: 15
Behavior on rotation {
enabled: FluTheme.enableAnimation
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
}
}
}
} }
FluText { FluText {
text: item_layout.text text: item_layout.text
@ -250,6 +259,7 @@ Item {
model: tree_model model: tree_model
flickableDirection: Flickable.HorizontalAndVerticalFlick flickableDirection: Flickable.HorizontalAndVerticalFlick
clip: true clip: true
boundsBehavior: ListView.StopAtBounds
ScrollBar.vertical: FluScrollBar {} ScrollBar.vertical: FluScrollBar {}
ScrollBar.horizontal: FluScrollBar { } ScrollBar.horizontal: FluScrollBar { }
} }

View File

@ -16,6 +16,7 @@ Window {
property string route property string route
property var argument:({}) property var argument:({})
property var pageRegister property var pageRegister
property Component loadingItem: com_loading
property var closeFunc: function(event){ property var closeFunc: function(event){
if(closeDestory){ if(closeDestory){
deleteWindow() deleteWindow()
@ -50,13 +51,65 @@ Window {
anchors.fill: parent anchors.fill: parent
clip: true clip: true
} }
Loader{
property string loadingText: "加载中..."
property bool cancel: false
id:loader_loading
anchors.fill: container
}
FluInfoBar{ FluInfoBar{
id:infoBar id:infoBar
root: window root: window
} }
Component{
id:com_loading
Popup{
id:popup_loading
modal:true
focus: true
anchors.centerIn: Overlay.overlay
closePolicy: {
if(cancel){
return Popup.CloseOnEscape | Popup.CloseOnPressOutside
}
return Popup.NoAutoClose
}
Overlay.modal: Rectangle {
color: "#44000000"
}
onVisibleChanged: {
if(!visible){
loader_loading.sourceComponent = undefined
}
}
visible: true
background: Item{}
contentItem: Item{
ColumnLayout{
spacing: 8
anchors.centerIn: parent
FluProgressRing{
Layout.alignment: Qt.AlignHCenter
}
FluText{
text:loadingText
Layout.alignment: Qt.AlignHCenter
}
}
}
}
}
WindowHelper{ WindowHelper{
id:helper id:helper
} }
function showLoading(text = "加载中...",cancel = true){
loader_loading.loadingText = text
loader_loading.cancel = cancel
loader_loading.sourceComponent = com_loading
}
function hideLoading(){
loader_loading.sourceComponent = undefined
}
function showSuccess(text,duration,moremsg){ function showSuccess(text,duration,moremsg){
infoBar.showSuccess(text,duration,moremsg) infoBar.showSuccess(text,duration,moremsg)
} }

View File

@ -1,68 +1,83 @@
module FluentUI module FluentUI
FluAppBar 1.0 FluAppBar.qml classname FluentUIPlugin
FluArea 1.0 FluArea.qml designersupported
FluAutoSuggestBox 1.0 FluAutoSuggestBox.qml typeinfo plugins.qmltypes
FluBadge 1.0 FluBadge.qml
FluBreadcrumbBar 1.0 FluBreadcrumbBar.qml FluAppBar 1.0 Controls/FluAppBar.qml
FluButton 1.0 FluButton.qml FluArea 1.0 Controls/FluArea.qml
FluCalendarPicker 1.0 FluCalendarPicker.qml FluAcrylic 1.0 Controls/FluAcrylic.qml
FluCalendarView 1.0 FluCalendarView.qml FluAutoSuggestBox 1.0 Controls/FluAutoSuggestBox.qml
FluCarousel 1.0 FluCarousel.qml FluBadge 1.0 Controls/FluBadge.qml
FluCheckBox 1.0 FluCheckBox.qml FluBreadcrumbBar 1.0 Controls/FluBreadcrumbBar.qml
FluColorPicker 1.0 FluColorPicker.qml FluButton 1.0 Controls/FluButton.qml
FluColorView 1.0 FluColorView.qml FluCalendarPicker 1.0 Controls/FluCalendarPicker.qml
FluComboBox 1.0 FluComboBox.qml FluCalendarView 1.0 Controls/FluCalendarView.qml
FluContentDialog 1.0 FluContentDialog.qml FluCarousel 1.0 Controls/FluCarousel.qml
FluContentPage 1.0 FluContentPage.qml FluCheckBox 1.0 Controls/FluCheckBox.qml
FluDatePicker 1.0 FluDatePicker.qml FluColorPicker 1.0 Controls/FluColorPicker.qml
FluDivider 1.0 FluDivider.qml FluColorView 1.0 Controls/FluColorView.qml
FluDropDownButton 1.0 FluDropDownButton.qml FluComboBox 1.0 Controls/FluComboBox.qml
FluExpander 1.0 FluExpander.qml FluControl 1.0 Controls/FluControl.qml
FluFilledButton 1.0 FluFilledButton.qml FluContentDialog 1.0 Controls/FluContentDialog.qml
FluFlipView 1.0 FluFlipView.qml FluContentPage 1.0 Controls/FluContentPage.qml
FluFocusRectangle 1.0 FluFocusRectangle.qml FluCopyableText 1.0 Controls/FluCopyableText.qml
FluIcon 1.0 FluIcon.qml FluDatePicker 1.0 Controls/FluDatePicker.qml
FluIconButton 1.0 FluIconButton.qml FluDivider 1.0 Controls/FluDivider.qml
FluInfoBar 1.0 FluInfoBar.qml FluDropDownButton 1.0 Controls/FluDropDownButton.qml
FluItem 1.0 FluItem.qml FluExpander 1.0 Controls/FluExpander.qml
FluMediaPlayer 1.0 FluMediaPlayer.qml FluFilledButton 1.0 Controls/FluFilledButton.qml
FluMenu 1.0 FluMenu.qml FluFlipView 1.0 Controls/FluFlipView.qml
FluMenuItem 1.0 FluMenuItem.qml FluFocusRectangle 1.0 Controls/FluFocusRectangle.qml
FluMultilineTextBox 1.0 FluMultilineTextBox.qml FluIcon 1.0 Controls/FluIcon.qml
FluNavigationView 1.0 FluNavigationView.qml FluIconButton 1.0 Controls/FluIconButton.qml
FluObject 1.0 FluObject.qml FluInfoBar 1.0 Controls/FluInfoBar.qml
FluPagination 1.0 FluPagination.qml FluItem 1.0 Controls/FluItem.qml
FluPaneItem 1.0 FluPaneItem.qml FluImage 1.0 Controls/FluImage.qml
FluPaneItemEmpty 1.0 FluPaneItemEmpty.qml FluMediaPlayer 1.0 Controls/FluMediaPlayer.qml
FluPaneItemExpander 1.0 FluPaneItemExpander.qml FluMenu 1.0 Controls/FluMenu.qml
FluPaneItemHeader 1.0 FluPaneItemHeader.qml FluMenuItem 1.0 Controls/FluMenuItem.qml
FluPaneItemSeparator 1.0 FluPaneItemSeparator.qml FluMenuSeparator 1.0 Controls/FluMenuSeparator.qml
FluPasswordBox 1.0 FluPasswordBox.qml FluMenuBar 1.0 Controls/FluMenuBar.qml
FluPivot 1.0 FluPivot.qml FluMenuBarItem 1.0 Controls/FluMenuBarItem.qml
FluPivotItem 1.0 FluPivotItem.qml FluMultilineTextBox 1.0 Controls/FluMultilineTextBox.qml
FluProgressBar 1.0 FluProgressBar.qml FluNavigationView 1.0 Controls/FluNavigationView.qml
FluProgressRing 1.0 FluProgressRing.qml FluObject 1.0 Controls/FluObject.qml
FluRadioButton 1.0 FluRadioButton.qml FluPage 1.0 Controls/FluPage.qml
FluRatingControl 1.0 FluRatingControl.qml FluPagination 1.0 Controls/FluPagination.qml
FluRectangle 1.0 FluRectangle.qml FluPaneItem 1.0 Controls/FluPaneItem.qml
FluScrollablePage 1.0 FluScrollablePage.qml FluPaneItemEmpty 1.0 Controls/FluPaneItemEmpty.qml
FluScrollBar 1.0 FluScrollBar.qml FluPaneItemExpander 1.0 Controls/FluPaneItemExpander.qml
FluShadow 1.0 FluShadow.qml FluPaneItemHeader 1.0 Controls/FluPaneItemHeader.qml
FluSlider 1.0 FluSlider.qml FluPaneItemSeparator 1.0 Controls/FluPaneItemSeparator.qml
FluStatusView 1.0 FluStatusView.qml FluPasswordBox 1.0 Controls/FluPasswordBox.qml
FluTableView 1.0 FluTableView.qml FluPivot 1.0 Controls/FluPivot.qml
FluTabView 1.0 FluTabView.qml FluPivotItem 1.0 Controls/FluPivotItem.qml
FluText 1.0 FluText.qml FluPopup 1.0 Controls/FluPopup.qml
FluTextBox 1.0 FluTextBox.qml FluProgressBar 1.0 Controls/FluProgressBar.qml
FluTextBoxBackground 1.0 FluTextBoxBackground.qml FluProgressRing 1.0 Controls/FluProgressRing.qml
FluTextBoxMenu 1.0 FluTextBoxMenu.qml FluRadioButton 1.0 Controls/FluRadioButton.qml
FluTextButton 1.0 FluTextButton.qml FluRadioButtons 1.0 Controls/FluRadioButtons.qml
FluTimePicker 1.0 FluTimePicker.qml FluRatingControl 1.0 Controls/FluRatingControl.qml
FluToggleButton 1.0 FluToggleButton.qml FluRectangle 1.0 Controls/FluRectangle.qml
FluToggleSwitch 1.0 FluToggleSwitch.qml FluRemoteLoader 1.0 Controls/FluRemoteLoader.qml
FluTooltip 1.0 FluTooltip.qml FluScrollablePage 1.0 Controls/FluScrollablePage.qml
FluTreeView 1.0 FluTreeView.qml FluScrollBar 1.0 Controls/FluScrollBar.qml
FluWindow 1.0 FluWindow.qml FluShadow 1.0 Controls/FluShadow.qml
FluWindowResize 1.0 FluWindowResize.qml FluSlider 1.0 Controls/FluSlider.qml
FluSingleton 1.0 FluSingleton.qml FluSpinBox 1.0 Controls/FluSpinBox.qml
FluStatusView 1.0 Controls/FluStatusView.qml
FluTableView 1.0 Controls/FluTableView.qml
FluTabView 1.0 Controls/FluTabView.qml
FluText 1.0 Controls/FluText.qml
FluTextBox 1.0 Controls/FluTextBox.qml
FluTextBoxBackground 1.0 Controls/FluTextBoxBackground.qml
FluTextBoxMenu 1.0 Controls/FluTextBoxMenu.qml
FluTextButton 1.0 Controls/FluTextButton.qml
FluTimePicker 1.0 Controls/FluTimePicker.qml
FluToggleButton 1.0 Controls/FluToggleButton.qml
FluToggleSwitch 1.0 Controls/FluToggleSwitch.qml
FluTooltip 1.0 Controls/FluTooltip.qml
FluTreeView 1.0 Controls/FluTreeView.qml
FluWindow 1.0 Controls/FluWindow.qml
FluSingleton 1.0 Controls/FluSingleton.qml
plugin fluentuiplugin plugin fluentuiplugin