Compare commits

..

No commits in common. "6a5f9d04a9c69e82b45d69f3653d9256ef722fc6" and "5fd934b5f53369e308e574cf085dc5c376a51fe0" have entirely different histories.

127 changed files with 1244 additions and 996 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@ FluLauncher {
FluApp.windowIcon = "qrc:/example/res/image/favicon.ico"
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
FluTheme.darkMode = SettingsHelper.getDarkMode()
FluTheme.animationEnabled = true
FluTheme.enableAnimation = true
FluRouter.routes = {
"/":"qrc:/example/qml/window/MainWindow.qml",
"/about":"qrc:/example/qml/window/AboutWindow.qml",

View File

@ -9,10 +9,10 @@ FluScrollablePage{
title: qsTr("Bar Chart")
FluFrame{
Layout.preferredWidth: 500
Layout.preferredHeight: 370
padding: 10
FluArea{
width: 500
height: 370
paddings: 10
Layout.topMargin: 20
FluChart{
anchors.fill: parent
@ -69,10 +69,10 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
width: 500
height: 370
padding: 10
paddings: 10
Layout.topMargin: 20
FluChart{
anchors.fill: parent

View File

@ -13,10 +13,10 @@ FluScrollablePage{
return Math.random().toFixed(1);
}
FluFrame{
Layout.preferredWidth: 500
Layout.preferredHeight: 370
padding: 10
FluArea{
height: 370
width: 500
paddings: 10
Layout.topMargin: 20
FluChart{
anchors.fill: parent

View File

@ -9,10 +9,10 @@ FluScrollablePage{
title: qsTr("Line Chart")
FluFrame{
Layout.preferredWidth: 500
Layout.preferredHeight: 370
padding: 10
FluArea{
width: 500
height: 370
paddings: 10
Layout.topMargin: 20
FluChart{
anchors.fill: parent

View File

@ -9,10 +9,10 @@ FluScrollablePage{
title: qsTr("Pie Chart")
FluFrame{
Layout.preferredWidth: 500
Layout.preferredHeight: 370
padding: 10
FluArea{
width: 500
height: 370
paddings: 10
Layout.topMargin: 20
FluChart{
anchors.fill: parent
@ -50,10 +50,10 @@ FluScrollablePage{
}
}
FluFrame{
Layout.preferredWidth: 500
Layout.preferredHeight: 370
padding: 10
FluArea{
width: 500
height: 370
paddings: 10
Layout.topMargin: 20
FluChart{
anchors.fill: parent

View File

@ -9,10 +9,10 @@ FluScrollablePage{
title: qsTr("Polar Area Chart")
FluFrame{
Layout.preferredWidth: 500
Layout.preferredHeight: 370
padding: 10
FluArea{
width: 500
height: 370
paddings: 10
Layout.topMargin: 20
FluChart{
anchors.fill: parent

View File

@ -9,10 +9,10 @@ FluScrollablePage{
title: qsTr("Radar Chart")
FluFrame{
Layout.preferredWidth: 500
Layout.preferredHeight: 370
padding: 10
FluArea{
width: 500
height: 370
paddings: 10
Layout.topMargin: 20
FluChart{
anchors.fill: parent

View File

@ -13,10 +13,10 @@ FluScrollablePage{
return Math.random().toFixed(1);
}
FluFrame{
Layout.preferredWidth: 500
Layout.preferredHeight: 370
padding: 10
FluArea{
height: 370
width: 500
paddings: 10
Layout.topMargin: 20
FluChart{
anchors.fill: parent
@ -119,4 +119,5 @@ FluScrollablePage{
}
}
}
}

View File

@ -473,12 +473,10 @@ FluObject{
}
FluPaneItem{
title: qsTr("Test Crash")
visible: FluTools.isWin()
onTapListener: function(){
AppInfo.testCrash()
}
Component.onCompleted: {
visible = FluTools.isWin()
}
}
}

View File

@ -11,6 +11,7 @@ FluScrollablePage{
RowLayout{
spacing: 10
Layout.topMargin: 20
FluText{
text:"tintColor:"
Layout.alignment: Qt.AlignVCenter
@ -41,10 +42,10 @@ FluScrollablePage{
value: 32
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 1200/4+20
padding: 10
height: 1200/4+20
paddings: 10
Layout.topMargin: 10
FluClip{
width: 1920/4
@ -94,7 +95,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'Image{
id:image
width: 800

View File

@ -12,6 +12,7 @@ FluContentPage {
id:text_box
placeholderText: qsTr("Please enter a keyword")
anchors{
topMargin: 20
top:parent.top
}
}

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Badge")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 120
padding: 10
paddings: 10
Column{
spacing: 15
@ -113,7 +114,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'Rectangle{
width: 40
height: 40

View File

@ -18,10 +18,11 @@ FluScrollablePage{
breadcrumb_2.items = items
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluBreadcrumbBar{
id:breadcrumb_1
@ -35,10 +36,10 @@ FluScrollablePage{
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 100
padding: 10
height: 100
paddings: 10
Layout.topMargin: 20
ColumnLayout{
@ -76,7 +77,7 @@ FluScrollablePage{
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluBreadcrumbBar{
width:parent.width
separator:">"

View File

@ -10,14 +10,15 @@ FluScrollablePage{
title: qsTr("Buttons")
FluText{
Layout.topMargin: 20
text: qsTr("Support the Tab key to switch focus, and the Space key to perform click events")
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
Layout.topMargin: 10
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluTextButton{
disabled: text_button_switch.checked
@ -41,7 +42,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluTextButton{
text:"Text Button"
onClicked: {
@ -50,10 +51,10 @@ FluScrollablePage{
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluButton{
@ -78,7 +79,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluButton{
text:"Standard Button"
onClicked: {
@ -87,11 +88,11 @@ FluScrollablePage{
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
height: 68
Layout.topMargin: 20
padding: 10
paddings: 10
FluFilledButton{
disabled: filled_button_switch.checked
@ -115,7 +116,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluFilledButton{
text:"Filled Button"
onClicked: {
@ -124,11 +125,11 @@ FluScrollablePage{
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
height: 68
Layout.topMargin: 20
padding: 10
paddings: 10
FluToggleButton{
disabled:toggle_button_switch.checked
@ -149,7 +150,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluToggleButton{
text:"Toggle Button"
onClicked: {
@ -171,11 +172,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
height: 68
Layout.topMargin: 20
padding: 10
paddings: 10
FluProgressButton{
id: btn_progress
@ -201,7 +202,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluProgressButton{
text:"Progress Button"
onClicked: {
@ -210,11 +211,11 @@ FluScrollablePage{
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
height: 68
Layout.topMargin: 20
padding: 10
paddings: 10
FluLoadingButton{
id: btn_loading
@ -240,7 +241,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluLoadingButton{
text:"Loading Button"
onClicked: {
@ -250,10 +251,10 @@ FluScrollablePage{
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: layout_icon_button.height + 30
padding: 10
height: layout_icon_button.height + 30
paddings: 10
Layout.topMargin: 20
Flow{
id: layout_icon_button
@ -322,7 +323,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluIconButton{
iconSource:FluentIcons.ChromeCloseContrast
onClicked: {
@ -331,10 +332,10 @@ FluScrollablePage{
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluDropDownButton{
disabled: drop_down_button_switch.checked
@ -370,7 +371,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluDropDownButton{
text:"DropDownButton"
FluMenuItem{
@ -388,10 +389,10 @@ FluScrollablePage{
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 100
padding: 10
height: 100
paddings: 10
Layout.topMargin: 20
FluRadioButtons{
spacing: 8
@ -423,7 +424,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluRadioButton{
checked:true
text:"Text Button"

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("CalendarPicker")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 80
padding: 10
Layout.topMargin: 20
height: 80
paddings: 10
ColumnLayout{
anchors{
verticalCenter: parent.verticalCenter
@ -27,7 +28,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluCalendarPicker{
}'

View File

@ -11,6 +11,7 @@ FluScrollablePage{
FluCaptcha{
id: captcha
Layout.topMargin: 20
ignoreCase:switch_case.checked
MouseArea{
anchors.fill: parent

View File

@ -22,10 +22,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
height: 370
padding: 10
paddings: 10
Layout.topMargin: 20
Column{
spacing: 15
anchors{
@ -61,10 +62,10 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
height: 340
padding: 10
paddings: 10
Layout.topMargin: 10
Column{
spacing: 15
@ -125,7 +126,7 @@ FluScrollablePage{
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluCarousel{
id:carousel
width: 400

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("CheckBox")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 72
padding: 10
height: 72
paddings: 10
Layout.topMargin: 20
FluText{
text: qsTr("A 2-state CheckBox")
@ -48,16 +49,16 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluCheckBox{
text:"Text"
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 72
padding: 10
height: 72
paddings: 10
Layout.topMargin: 20
FluText{
@ -103,7 +104,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluCheckBox{
text:"Text"
indeterminate:true

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Clip")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 380
padding: 10
Layout.topMargin: 20
height: 380
paddings: 10
Column{
spacing: 15
@ -87,7 +88,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluClip{
radius: [25,25,25,25]
width: 50

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("ColorPicker")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 60
padding: 10
Layout.topMargin: 20
height: 60
paddings: 10
RowLayout{
FluText{
text: qsTr("Click to Select a Color - >")
@ -32,7 +33,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluColorPicker{
}'

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("ComboBox")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 80
padding: 5
height: 80
paddings: 5
Layout.topMargin: 20
Column{
spacing: 5
anchors.verticalCenter: parent.verticalCenter
@ -31,10 +32,10 @@ FluScrollablePage{
}
}
FluFrame {
FluArea {
Layout.fillWidth: true
Layout.preferredHeight: 80
padding: 5
height: 80
paddings: 5
Layout.topMargin: 20
Column{
spacing: 5
@ -55,10 +56,10 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
height: 80
padding: 10
paddings: 10
Layout.topMargin: 20
Column{
spacing: 5
@ -84,7 +85,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluComboBox{
editable: true
model: ListModel {

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("DatePicker")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 80
padding: 10
Layout.topMargin: 20
height: 80
paddings: 10
ColumnLayout{
anchors{
verticalCenter: parent.verticalCenter
@ -31,17 +32,17 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluDatePicker{
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
Layout.preferredHeight: 80
padding: 10
height: 80
paddings: 10
ColumnLayout{
anchors{
verticalCenter: parent.verticalCenter
@ -60,7 +61,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluDatePicker{
showYear:false
}'

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Dialog")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluButton{
anchors.verticalCenter: parent.verticalCenter
text: qsTr("Show Double Button Dialog")
@ -23,7 +24,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluContentDialog{
id:dialog
title: qsTr("Friendly Reminder")
@ -56,10 +57,10 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluButton{
anchors.verticalCenter: parent.verticalCenter
@ -71,7 +72,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluContentDialog{
id: dialog
title: qsTr("Friendly Reminder")
@ -113,10 +114,10 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 100
padding: 10
height: 100
paddings: 10
Layout.topMargin: 20
FluButton{
anchors.top: parent.top
@ -137,7 +138,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluContentDialog{
id: dialog
title: qsTr("Friendly Reminder")

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Expander")
FluFrame{
FluArea{
Layout.fillWidth: true
height: layout_column.height+20
padding: 10
paddings: 10
Layout.topMargin: 20
Column{
id:layout_column
spacing: 15
@ -82,7 +83,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluExpander{
headerText: qsTr("Open a radio box")
Item{

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("FlipView")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 340
padding: 10
height: 340
paddings: 10
Layout.topMargin: 20
ColumnLayout{
anchors.verticalCenter: parent.verticalCenter
FluText{
@ -39,7 +40,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluFlipView{
Image{
source: "qrc:/example/res/image/banner_1.jpg"
@ -60,10 +61,10 @@ FluScrollablePage{
'
}
FluFrame{
FluArea{
Layout.fillWidth: true
height: 340
padding: 10
paddings: 10
Layout.topMargin: 20
ColumnLayout{
anchors.verticalCenter: parent.verticalCenter
@ -92,7 +93,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluFlipView{
vertical:true
Image{

View File

@ -9,8 +9,7 @@ import "../global"
FluScrollablePage{
launchMode: FluPageType.SingleTask
animationEnabled: false
header: Item{}
animDisabled: true
FluentInitalizrWindow{
id:fluent_initalizr
@ -178,7 +177,7 @@ FluScrollablePage{
property string desc: modelData.extra.desc
width: 320
height: 120
FluFrame{
FluArea{
radius: 8
width: 300
height: 100

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Image")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 260
padding: 10
height: 260
paddings: 10
Layout.topMargin: 20
Column{
spacing: 15
anchors{
@ -36,7 +37,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluImage{
width: 400
height: 300

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("InfoBar")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 270
padding: 10
Layout.topMargin: 20
height: 270
paddings: 10
ColumnLayout{
spacing: 14
anchors{
@ -59,7 +60,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'showInfo(qsTr("This is an InfoBar in the Info Style"))
showWarning(qsTr("This is an InfoBar in the Warning Style"))

View File

@ -47,10 +47,11 @@ FluScrollablePage{
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 100
padding: 10
height: 100
paddings: 10
Layout.topMargin: 20
Column{
id: layout_column
spacing: 15
@ -77,7 +78,7 @@ FluScrollablePage{
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluMenu{
id:menu
FluMenuItem:{
@ -98,10 +99,10 @@ menu.popup()
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 100
padding: 10
height: 100
paddings: 10
Layout.topMargin: 20
Column{
spacing: 15
@ -150,7 +151,7 @@ menu.popup()
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluMenuBar{
id:menu
FluMenu:{

View File

@ -21,10 +21,11 @@ FluScrollablePage{
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 86
padding: 10
height: 86
paddings: 10
Layout.topMargin: 20
Column{
spacing: 15
anchors{
@ -43,10 +44,10 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 86
padding: 10
height: 86
paddings: 10
Layout.topMargin: 10
Column{
spacing: 15
@ -67,10 +68,10 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 86
padding: 10
height: 86
paddings: 10
Layout.topMargin: 10
Column{
spacing: 15
@ -91,7 +92,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluWindow{
//launchMode: FluWindowType.Standard
//launchMode: FluWindowType.SingleTask
@ -101,10 +102,10 @@ FluScrollablePage{
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 100
padding: 10
height: 100
paddings: 10
Layout.topMargin: 20
Column{
spacing: 15
@ -125,7 +126,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluButton{
text: qsTr("Create Window")
onClicked: {
@ -135,10 +136,10 @@ FluScrollablePage{
'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 130
padding: 10
height: 130
paddings: 10
Layout.topMargin: 20
Column{
@ -163,7 +164,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluWindowResultLauncher{
id:loginResultLauncher
path: "/login"

View File

@ -40,6 +40,7 @@ FluContentPage{
clip: true
anchors{
top: parent.top
topMargin: 20
bottom: parent.bottom
left: parent.left
}
@ -532,7 +533,7 @@ FluContentPage{
}
}
FluFrame{
FluArea{
anchors{
top: layout_flick.top
bottom: layout_flick.bottom

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Pagination")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 200
padding: 10
height: 200
paddings: 10
Layout.topMargin: 20
ColumnLayout{
spacing: 20
anchors.verticalCenter: parent.verticalCenter
@ -36,7 +37,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluPagination{
pageCurrent: 1
itemCount: 1000

View File

@ -9,10 +9,13 @@ FluScrollablePage{
title: qsTr("Pivot")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 400
padding: 10
Layout.topMargin: 20
height: 400
paddings: 10
FluPivot{
anchors.fill: parent
@ -46,7 +49,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluPivot{
anchors.fill: parent
FluPivotItem:{

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Progress")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 130
padding: 10
Layout.topMargin: 20
height: 130
paddings: 10
ColumnLayout{
spacing: 10
@ -31,7 +32,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluProgressBar{
}
@ -41,11 +42,11 @@ FluProgressRing{
'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
Layout.preferredHeight: 286
padding: 10
height: 286
paddings: 10
ColumnLayout{
spacing: 10
@ -87,7 +88,7 @@ FluProgressRing{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluProgressBar{
indeterminate: false
}

View File

@ -11,6 +11,7 @@ FluScrollablePage{
FluQRCode{
id:qrcode
Layout.topMargin: 20
size:slider_size.value
text:text_box.text
color:color_picker.current

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("RadioButton")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
Row{
spacing: 30
anchors.verticalCenter: parent.verticalCenter
@ -40,16 +41,16 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluRadioButton{
text:"Text"
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 100
padding: 10
height: 100
paddings: 10
Layout.topMargin: 20
FluRadioButtons{
spacing: 8
@ -82,7 +83,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluRadioButtons{
spacing: 8
FluRadioButton{

View File

@ -9,10 +9,11 @@ FluScrollablePage {
title: qsTr("RatingControl")
FluFrame {
FluArea {
Layout.fillWidth: true
Layout.preferredHeight: 100
padding: 10
height: 100
paddings: 10
Layout.topMargin: 20
Column {
spacing: 10
@ -26,7 +27,7 @@ FluScrollablePage {
CodeExpander {
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code: 'FluRatingControl{
}'

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Rectangle")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 80
padding: 10
Layout.topMargin: 20
height: 80
paddings: 10
Column{
spacing: 15
@ -63,7 +64,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluRectangle{
radius: [25,25,25,25]
width: 50

View File

@ -7,9 +7,8 @@ import "../component"
FluPage{
launchMode: FluPageType.SingleTop
header:Item{}
FluRemoteLoader{
anchors.fill: parent
source: "https://zhu-zichu.gitee.io/Qt_174_RemoteLoader.qml"
source: "https://zhu-zichu.gitee.io/Qt5_T_RemoteLoader.qml"
}
}

View File

@ -17,11 +17,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
Layout.preferredHeight: 60
padding: 10
height: 60
paddings: 10
Row{
spacing: 20
anchors.verticalCenter: parent.verticalCenter
@ -42,11 +42,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 50
padding: 10
paddings: 10
FluCheckBox{
text: qsTr("Use System AppBar")
checked: FluApp.useSystemAppBar
@ -58,11 +58,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 50
padding: 10
paddings: 10
FluCheckBox{
text:qsTr("Fits AppBar Windows")
checked: window.fitsAppBarWindows
@ -85,11 +85,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 128
padding: 10
paddings: 10
ColumnLayout{
spacing: 5
@ -115,11 +115,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 160
padding: 10
paddings: 10
ColumnLayout{
spacing: 5
@ -155,11 +155,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 80
padding: 10
paddings: 10
ColumnLayout{
spacing: 10

View File

@ -9,17 +9,18 @@ FluScrollablePage{
title: qsTr("ShortcutPicker")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 100
padding: 10
Layout.topMargin: 20
height: 100
paddings: 10
FluShortcutPicker{
anchors.verticalCenter: parent.verticalCenter
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluShortcutPicker{
}'

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Slider")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 200
padding: 10
Layout.topMargin: 20
paddings: 10
Row{
spacing: 30
@ -26,18 +27,18 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluSlider{
value:50
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 200
Layout.topMargin: 20
padding: 10
paddings: 10
Row{
spacing: 30
FluRangeSlider{
@ -50,7 +51,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluRangeSlider{
orientation: Qt.Vertical
}'

View File

@ -13,6 +13,7 @@ FluContentPage{
id:layout_dropdown
anchors{
top: parent.top
topMargin: 20
}
FluText{
text:"orientation:"

View File

@ -27,6 +27,7 @@ FluContentPage{
Flickable{
id: scroll
anchors.fill: parent
anchors.topMargin: 20
boundsBehavior:Flickable.StopAtBounds
contentHeight: staggered_view.implicitHeight
clip: true

View File

@ -9,11 +9,12 @@ FluScrollablePage{
title: qsTr("StatusLayout")
FluFrame{
FluArea{
id:layout_actions
Layout.fillWidth: true
Layout.preferredHeight: 50
padding: 10
Layout.topMargin: 20
height: 50
paddings: 10
RowLayout{
spacing: 14
FluDropDownButton{
@ -52,11 +53,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 10
Layout.preferredHeight: 380
padding: 10
height: 380
paddings: 10
FluStatusLayout{
id:status_view
anchors.fill: parent
@ -75,7 +76,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluStatusLayout{
anchors.fill: parent
statusMode: FluStatusLayoutType.Loading

View File

@ -29,10 +29,11 @@ FluScrollablePage{
newTab()
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 50
padding: 10
Layout.topMargin: 20
height: 50
paddings: 10
RowLayout{
spacing: 14
FluDropDownButton{
@ -90,11 +91,11 @@ FluScrollablePage{
}
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 15
Layout.preferredHeight: 400
padding: 10
height: 400
paddings: 10
FluTabView{
id:tab_view
onNewPressed:{
@ -104,7 +105,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluTabView{
anchors.fill: parent
Component.onCompleted: {

View File

@ -159,7 +159,7 @@ FluContentPage{
FluCheckBox{
anchors.centerIn: parent
checked: true === options.checked
animationEnabled: false
enableAnimation: false
clickListener: function(){
var obj = table_view.getRow(row)
obj.checkbox = table_view.customItem(com_checbox,{checked:!options.checked})
@ -239,7 +239,7 @@ FluContentPage{
}
FluCheckBox{
checked: true === root.seletedAll
animationEnabled: false
enableAnimation: false
Layout.alignment: Qt.AlignVCenter
clickListener: function(){
root.seletedAll = !root.seletedAll
@ -390,7 +390,7 @@ FluContentPage{
}
}
FluFrame{
FluArea{
id:layout_controls
anchors{
left: parent.left

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("Text")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 60
padding: 10
Layout.topMargin: 20
height: 60
paddings: 10
FluCopyableText{
text: qsTr("This is a text that can be copied")
@ -22,7 +23,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluCopyableText{
text: qsTr("This is a text that can be copied")
}'

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("TextBox")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluTextBox{
placeholderText: qsTr("Single-line Input Box")
@ -35,16 +36,16 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluTextBox{
placeholderText: qsTr("Single-line Input Box")
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluPasswordBox{
@ -66,16 +67,16 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluPasswordBox{
placeholderText: qsTr("Please enter your password")
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 36+multiine_textbox.height
padding: 10
height: 36+multiine_textbox.height
paddings: 10
Layout.topMargin: 20
FluMultilineTextBox{
@ -99,16 +100,16 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluMultilineTextBox{
placeholderText: qsTr("Multi-line Input Box")
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluAutoSuggestBox{
placeholderText: qsTr("AutoSuggestBox")
@ -130,16 +131,16 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluAutoSuggestBox{
placeholderText: qsTr("AutoSuggestBox")
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
FluSpinBox{
disabled: spin_box_switch.checked
@ -159,7 +160,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluSpinBox{
}'

View File

@ -11,10 +11,11 @@ FluScrollablePage{
id: root
title: qsTr("Theme")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
Layout.preferredHeight: 340
padding: 10
paddings: 10
ColumnLayout{
spacing:0
@ -114,16 +115,16 @@ FluScrollablePage{
}
FluToggleSwitch{
Layout.topMargin: 5
checked: FluTheme.animationEnabled
checked: FluTheme.enableAnimation
onClicked: {
FluTheme.animationEnabled = !FluTheme.animationEnabled
FluTheme.enableAnimation = !FluTheme.enableAnimation
}
}
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluTheme.accentColor = FluColors.Orange
FluTheme.dark = true

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("TimePicker")
launchMode: FluPageType.SingleInstance
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 80
padding: 10
Layout.topMargin: 20
height: 80
paddings: 10
ColumnLayout{
@ -42,17 +43,17 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluTimePicker{
}'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
Layout.preferredHeight: 80
padding: 10
height: 80
paddings: 10
ColumnLayout{
@ -82,7 +83,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluTimePicker{
hourFormat:FluTimePickerType.HH
}'

View File

@ -106,6 +106,7 @@ FluScrollablePage{
RowLayout{
spacing: 20
Layout.topMargin: 20
FluTextBox{
id: text_box
text: "Technical testing 2015-09-01"

View File

@ -9,10 +9,11 @@ FluScrollablePage{
title: qsTr("ToggleSwitch")
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Layout.topMargin: 20
Row{
spacing: 30
anchors.verticalCenter: parent.verticalCenter
@ -40,7 +41,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluToggleSwitch{
text:"Text"
}'

View File

@ -10,14 +10,15 @@ FluScrollablePage{
title: qsTr("Tooltip")
FluText{
Layout.topMargin: 20
text: qsTr("Hover over Tultip and it pops up")
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Column{
spacing: 5
@ -40,7 +41,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluIconButton{
iconSource:FluentIcons.ChromeCloseContrast
iconSize: 15
@ -52,11 +53,11 @@ FluScrollablePage{
'
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
Layout.preferredHeight: 68
padding: 10
height: 68
paddings: 10
Column{
spacing: 5
@ -83,7 +84,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluButton{
id: button_1
text: qsTr("Delete")

View File

@ -18,10 +18,11 @@ FluScrollablePage{
]
}
FluFrame{
FluArea{
Layout.fillWidth: true
Layout.preferredHeight: 130
padding: 10
height: 130
paddings: 10
Layout.topMargin: 20
FluFilledButton{
anchors{
@ -65,7 +66,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -6
Layout.topMargin: -1
code:'FluTour{
id:tour
steps:[

View File

@ -33,6 +33,7 @@ FluContentPage {
spacing: 12
width: 300
anchors{
topMargin: 20
top:parent.top
left: parent.left
leftMargin: 10
@ -102,7 +103,7 @@ FluContentPage {
}
}
}
FluFrame{
FluArea{
anchors{
left: layout_column.right
top: parent.top

View File

@ -10,14 +10,15 @@ FluContentPage {
title: qsTr("Typography")
rightPadding: 10
FluFrame{
FluArea{
anchors{
top:parent.top
left: parent.left
right: parent.right
bottom: parent.bottom
topMargin: 20
}
padding: 10
paddings: 10
ColumnLayout{
spacing: 0
scale: textScale

View File

@ -9,8 +9,9 @@ FluContentPage{
title: qsTr("Watermark")
FluFrame{
FluArea{
anchors.fill: parent
anchors.topMargin: 20
ColumnLayout{
anchors{

View File

@ -20,7 +20,7 @@ FluWindow {
loader.reload()
}
}
FluFrame{
FluArea{
anchors.fill: parent
FluRemoteLoader{
id:loader

View File

@ -253,7 +253,7 @@ FluWindow {
}
function handleDarkChanged(button){
if(!FluTheme.animationEnabled || window.fitsAppBarWindows === false){
if(!FluTheme.enableAnimation || window.fitsAppBarWindows === false){
changeDark()
}else{
if(loader_reveal.sourceComponent){

View File

@ -14,7 +14,7 @@ FluTheme::FluTheme(QObject *parent):QObject{parent}{
accentColor(FluColors::getInstance()->Blue());
darkMode(FluThemeType::DarkMode::Light);
nativeText(false);
animationEnabled(true);
enableAnimation(true);
_systemDark = systemDark();
qApp->installEventFilter(this);
}

View File

@ -32,7 +32,7 @@ class FluTheme : public QObject
Q_PROPERTY_AUTO(QColor,itemCheckColor);
Q_PROPERTY_AUTO(int,darkMode);
Q_PROPERTY_AUTO(bool,nativeText);
Q_PROPERTY_AUTO(bool,animationEnabled);
Q_PROPERTY_AUTO(bool,enableAnimation);
QML_NAMED_ELEMENT(FluTheme)
QML_SINGLETON
private:

View File

@ -36,7 +36,7 @@ void FluentUI::registerTypes(const char *uri){
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluAcrylic.qml"),uri,major,minor,"FluAcrylic");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluAppBar.qml"),uri,major,minor,"FluAppBar");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluFrame.qml"),uri,major,minor,"FluFrame");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluArea.qml"),uri,major,minor,"FluArea");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluAutoSuggestBox.qml"),uri,major,minor,"FluAutoSuggestBox");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluBadge.qml"),uri,major,minor,"FluBadge");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluBreadcrumbBar.qml"),uri,major,minor,"FluBreadcrumbBar");

View File

@ -0,0 +1,28 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Window 2.15
import FluentUI 1.0
Rectangle {
default property alias contentData : layout_content.data
property int paddings : 0
property int leftPadding : 0
property int rightPadding : 0
property int topPadding : 0
property int bottomPadding : 0
id:control
radius: 4
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)
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
border.width: 1
implicitHeight: height
implicitWidth: width
Item {
id: layout_content
anchors.fill: parent
anchors.leftMargin: Math.max(paddings,leftPadding)
anchors.rightMargin: Math.max(paddings,rightPadding)
anchors.topMargin: Math.max(paddings,topPadding)
anchors.bottomMargin: Math.max(paddings,bottomPadding)
}
}

View File

@ -56,7 +56,7 @@ FluTextBox{
property: "opacity"
from:0
to:1
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
contentItem: FluRectangle{

View File

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

View File

@ -63,7 +63,7 @@ FluButton {
property: "opacity"
from:0
to:1
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
exit:Transition {
@ -71,12 +71,12 @@ FluButton {
property: "opacity"
from:1
to:0
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
contentItem: Item{
clip: true
FluFrame{
FluArea{
id:container
width: 300
height: 360
@ -163,7 +163,7 @@ FluButton {
OpacityAnimator{
from: 0
to: 1
duration: 83
duration: 88
}
ScaleAnimator{
from: 0.5
@ -176,7 +176,7 @@ FluButton {
OpacityAnimator{
from: 1
to: 0
duration: 83
duration: 88
}
ScaleAnimator{
from: 1.0

View File

@ -22,7 +22,7 @@ Button {
property alias textColor: btn_text.textColor
property bool textRight: true
property real textSpacing: 6
property bool animationEnabled: FluTheme.animationEnabled
property bool enableAnimation: FluTheme.enableAnimation
property var clickListener : function(){
checked = !checked
}
@ -94,7 +94,7 @@ Button {
return normalColor
}
Behavior on color {
enabled: control.animationEnabled
enabled: control.enableAnimation
ColorAnimation{
duration: 83
}
@ -107,7 +107,7 @@ Button {
visible: indeterminate
iconColor: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
Behavior on visible {
enabled: control.animationEnabled
enabled: control.enableAnimation
NumberAnimation{
duration: 83
}
@ -121,7 +121,7 @@ Button {
visible: checked && !indeterminate
iconColor: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
Behavior on visible {
enabled: control.animationEnabled
enabled: control.enableAnimation
NumberAnimation{
duration: 83
}

View File

@ -120,7 +120,7 @@ T.ComboBox {
property: "opacity"
from:0
to:1
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
exit:Transition {
@ -128,7 +128,7 @@ T.ComboBox {
property: "opacity"
from:1
to:0
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
background:Rectangle{

View File

@ -5,4 +5,56 @@ import QtQuick.Controls 2.15
import FluentUI 1.0
FluPage {
property alias title: text_title.text
default property alias content: container.data
property int leftPadding: 10
property int topPadding: 0
property int rightPadding: 10
property int bottomPadding: 10
property alias color: status_view.color
property alias statusMode: status_view.statusMode
property alias loadingText: status_view.loadingText
property alias emptyText:status_view.emptyText
property alias errorText:status_view.errorText
property alias errorButtonText:status_view.errorButtonText
property alias loadingItem :status_view.loadingItem
property alias emptyItem : status_view.emptyItem
property alias errorItem :status_view.errorItem
signal errorClicked
id:control
FluText{
id:text_title
visible: text !== ""
height: visible ? contentHeight : 0
font: FluTextStyle.Title
anchors{
top: parent.top
topMargin: control.topPadding
left: parent.left
right: parent.right
leftMargin: control.leftPadding
rightMargin: control.rightPadding
}
}
FluStatusLayout{
id:status_view
color: "#00000000"
statusMode: FluStatusLayoutType.Success
onErrorClicked: control.errorClicked()
anchors{
left: parent.left
right: parent.right
top: text_title.bottom
bottom: parent.bottom
leftMargin: control.leftPadding
rightMargin: control.rightPadding
bottomMargin: control.bottomPadding
}
Item{
clip: true
id:container
anchors.fill: parent
}
}
}

View File

@ -105,7 +105,7 @@ FluButton {
property: "opacity"
from:0
to:1
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
exit:Transition {
@ -113,7 +113,7 @@ FluButton {
property: "opacity"
from:1
to:0
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
background:Item{

View File

@ -64,7 +64,7 @@ Item {
iconSource:FluentIcons.ChevronUp
iconSize: 15
Behavior on rotation {
enabled: FluTheme.animationEnabled
enabled: FluTheme.enableAnimation
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
@ -115,7 +115,7 @@ Item {
to:"expand"
NumberAnimation {
properties: "anchors.topMargin"
duration: FluTheme.animationEnabled && d.flag ? 167 : 0
duration: FluTheme.enableAnimation && d.flag ? 167 : 0
easing.type: Easing.OutCubic
}
},
@ -123,7 +123,7 @@ Item {
to:"collapsed"
NumberAnimation {
properties: "anchors.topMargin"
duration: FluTheme.animationEnabled && d.flag ? 167 : 0
duration: FluTheme.enableAnimation && d.flag ? 167 : 0
easing.type: Easing.OutCubic
}
}

View File

@ -1,24 +0,0 @@
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls.impl 2.15
import QtQuick.Templates 2.15 as T
import FluentUI 1.0
T.Frame {
property alias border: d.border
property alias color: d.color
property alias radius: d.radius
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
contentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
contentHeight + topPadding + bottomPadding)
padding: 0
background: Rectangle {
id:d
radius: 4
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
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)
}
}

View File

@ -54,7 +54,7 @@ FluObject {
NumberAnimation {
properties: "y"
easing.type: Easing.OutCubic
duration: FluTheme.animationEnabled ? 333 : 0
duration: FluTheme.enableAnimation ? 333 : 0
}
}
onChildrenChanged: if(children.length === 0) destroy();
@ -95,7 +95,7 @@ FluObject {
scale: item ? 1 : 0;
asynchronous: true
Behavior on scale {
enabled: FluTheme.animationEnabled
enabled: FluTheme.enableAnimation
NumberAnimation {
easing.type: Easing.OutCubic
duration: 167

View File

@ -23,7 +23,7 @@ FluButton {
visible: Number(width)!==0
clip: true
Behavior on width {
enabled: FluTheme.animationEnabled
enabled: FluTheme.enableAnimation
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic

View File

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

View File

@ -167,7 +167,7 @@ Item {
return control.cellHeight
}
Behavior on height {
enabled: FluTheme.animationEnabled && d.animDisabled
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{
duration: 83
}
@ -310,7 +310,7 @@ Item {
return true
}
Behavior on rotation {
enabled: FluTheme.animationEnabled && d.animDisabled
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
@ -457,7 +457,7 @@ Item {
id:com_panel_item
Item{
Behavior on height {
enabled: FluTheme.animationEnabled && d.animDisabled
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
@ -771,13 +771,13 @@ Item {
visible: opacity
opacity: d.isMinimal
Behavior on opacity{
enabled: FluTheme.animationEnabled && d.animDisabled
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{
duration: 83
}
}
Behavior on Layout.preferredWidth {
enabled: FluTheme.animationEnabled && d.animDisabled
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
@ -880,7 +880,7 @@ Item {
}
}
Behavior on anchors.leftMargin {
enabled: FluTheme.animationEnabled && d.animDisabled
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
@ -925,14 +925,14 @@ Item {
}
x: visible ? 0 : -width
Behavior on width {
enabled: FluTheme.animationEnabled && d.animDisabled
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
}
}
Behavior on x {
enabled: FluTheme.animationEnabled && d.animDisabled
enabled: FluTheme.enableAnimation && d.animDisabled
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
@ -1012,7 +1012,7 @@ Item {
interactive: false
model:d.handleItems()
boundsBehavior: ListView.StopAtBounds
highlightMoveDuration: FluTheme.animationEnabled && d.animDisabled ? 167 : 0
highlightMoveDuration: FluTheme.enableAnimation && d.animDisabled ? 167 : 0
highlight: Item{
clip: true
Rectangle{
@ -1231,15 +1231,11 @@ Item {
}
}
function setCurrentIndex(index){
var item = nav_list.model[index]
if(item.url){
nav_list.currentIndex = index
var item = nav_list.model[index]
if(item instanceof FluPaneItem){
item.tap()
}
}else{
item.onTapListener()
}
}
function getItems(){
return nav_list.model

View File

@ -4,45 +4,31 @@ import QtQuick.Controls 2.15
import QtQuick.Window 2.15
import FluentUI 1.0
Page {
Item {
property int launchMode: FluPageType.SingleTop
property bool animationEnabled: FluTheme.animationEnabled
property bool animDisabled: false
property string url : ""
id: control
StackView.onRemoved: destroy()
padding: 5
visible: false
opacity: visible
visible: false
StackView.onRemoved: destroy()
Behavior on opacity{
enabled: !animDisabled && FluTheme.enableAnimation
NumberAnimation{
duration: 167
}
}
transform: Translate {
y: control.visible ? 0 : 80
Behavior on y{
enabled: control.animationEnabled
enabled: !animDisabled && FluTheme.enableAnimation
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic
}
}
}
Behavior on opacity {
enabled: control.animationEnabled
NumberAnimation{
duration: 83
}
}
background: Item{}
header: Item{
implicitHeight: 40
FluText{
id:text_title
text: control.title
font: FluTextStyle.Title
anchors{
left: parent.left
leftMargin: 5
}
}
}
Component.onCompleted: {
control.visible = true
visible = true
}
}

View File

@ -30,7 +30,7 @@ Page {
spacing: control.headerSpacing
interactive: false
orientation: ListView.Horizontal
highlightMoveDuration: FluTheme.animationEnabled ? 167 : 0
highlightMoveDuration: FluTheme.enableAnimation ? 167 : 0
highlight: Item{
clip: true
Rectangle{
@ -40,7 +40,7 @@ Page {
width: nav_list.currentItem ? nav_list.currentItem.width : 0
y:d.tabY
Behavior on width {
enabled: FluTheme.animationEnabled
enabled: FluTheme.enableAnimation
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic

View File

@ -15,7 +15,7 @@ Popup {
enter: Transition {
NumberAnimation {
property: "opacity"
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
from:0
to:1
}
@ -24,7 +24,7 @@ Popup {
exit:Transition {
NumberAnimation {
property: "opacity"
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
from:1
to:0
}

View File

@ -3,7 +3,6 @@ import QtQuick.Controls 2.15
import FluentUI 1.0
ProgressBar{
property int duration: 888
property real strokeWidth: 6
property bool progressVisible: false
property color color: FluTheme.primaryColor
@ -18,7 +17,7 @@ ProgressBar{
if(!indeterminate){
animator_x.duration = 0
rect_progress.x = 0
animator_x.duration = control.duration
animator_x.duration = 888
}
}
background: Rectangle {
@ -47,7 +46,7 @@ ProgressBar{
from: -rect_progress.width
to:control.width+rect_progress.width
loops: Animation.Infinite
duration: control.duration
duration: 888
}
}
}

View File

@ -73,10 +73,10 @@ Button {
enabled: control.progress !== 0
SequentialAnimation {
PauseAnimation {
duration: FluTheme.animationEnabled ? 167 : 0
duration: FluTheme.enableAnimation ? 167 : 0
}
NumberAnimation{
duration: FluTheme.animationEnabled ? 167 : 0
duration: FluTheme.enableAnimation ? 167 : 0
from: 3
to: background.height
}

View File

@ -66,7 +66,7 @@ Button {
return checked ? 4 : 1
}
Behavior on border.width {
enabled: FluTheme.animationEnabled
enabled: FluTheme.enableAnimation
NumberAnimation{
duration: 167
easing.type: Easing.OutCubic

View File

@ -5,16 +5,75 @@ import QtQuick.Controls 2.15
import FluentUI 1.0
FluPage {
property alias title: text_title.text
default property alias content: container.data
property int spacing : 0
property int leftPadding: 10
property int topPadding: 0
property int rightPadding: 10
property int bottomPadding: 10
property alias color: status_view.color
property alias statusMode: status_view.statusMode
property alias loadingText: status_view.loadingText
property alias emptyText:status_view.emptyText
property alias errorText:status_view.errorText
property alias errorButtonText:status_view.errorButtonText
property alias loadingItem :status_view.loadingItem
property alias emptyItem : status_view.emptyItem
property alias errorItem :status_view.errorItem
signal errorClicked
id:control
FluText{
id:text_title
font: FluTextStyle.Title
visible: text !== ""
height: visible ? contentHeight : 0
padding: 0
anchors{
top: parent.top
topMargin: control.topPadding
left: parent.left
right: parent.right
leftMargin: control.leftPadding
rightMargin: control.rightPadding
}
}
FluStatusLayout{
id:status_view
color: "#00000000"
statusMode: FluStatusLayoutType.Success
onErrorClicked: control.errorClicked()
anchors{
left: parent.left
right: parent.right
top: text_title.bottom
bottom: parent.bottom
bottomMargin: control.bottomPadding
}
Flickable{
id:flickview
clip: true
anchors.fill: parent
ScrollBar.vertical: FluScrollBar {}
boundsBehavior: Flickable.StopAtBounds
contentWidth: parent.width
contentHeight: container.height
ScrollBar.vertical: FluScrollBar {
anchors.right: flickview.right
anchors.rightMargin: 2
}
boundsBehavior: Flickable.StopAtBounds
ColumnLayout{
id:container
spacing: control.spacing
clip: true
anchors{
left: parent.left
right: parent.right
top: parent.top
leftMargin: control.leftPadding
rightMargin: control.rightPadding
}
width: parent.width
}
}
}
}

View File

@ -62,7 +62,7 @@ T.SpinBox {
}
}
Behavior on height{
enabled: FluTheme.animationEnabled
enabled: FluTheme.enableAnimation
NumberAnimation{
duration: 83
easing.type: Easing.OutCubic

View File

@ -42,8 +42,8 @@ Item{
}
Component{
id:com_loading
FluFrame{
padding: 0
FluArea{
paddings: 0
border.width: 0
radius: 0
color:control.color
@ -62,8 +62,8 @@ Item{
}
Component {
id:com_empty
FluFrame{
padding: 0
FluArea{
paddings: 0
border.width: 0
radius: 0
color:control.color
@ -79,8 +79,8 @@ Item{
}
Component{
id:com_error
FluFrame{
padding: 0
FluArea{
paddings: 0
border.width: 0
radius: 0
color:control.color

View File

@ -46,7 +46,7 @@ FluClip{
}
}
Behavior on height{
enabled: FluTheme.animationEnabled
enabled: FluTheme.enableAnimation
NumberAnimation{
duration: 83
easing.type: Easing.OutCubic

View File

@ -9,7 +9,7 @@ FluMenu{
property string selectAllText : qsTr("Select All")
property var inputItem
id:menu
animationEnabled: false
enableAnimation: false
width: 120
focus: false
onVisibleChanged: {

View File

@ -121,7 +121,7 @@ FluButton {
property: "opacity"
from:0
to:1
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
exit:Transition {
@ -129,7 +129,7 @@ FluButton {
property: "opacity"
from:1
to:0
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
background:Item{

View File

@ -102,7 +102,7 @@ Button {
}
}
Behavior on x {
enabled: FluTheme.animationEnabled
enabled: FluTheme.enableAnimation
NumberAnimation {
duration: 167
easing.type: Easing.OutCubic

View File

@ -124,7 +124,7 @@ Popup{
ctx.fill()
}
}
FluFrame{
FluArea{
id: layout_panne
radius: 5
width: 500

View File

@ -51,7 +51,7 @@ Item {
}
NumberAnimation {
properties: "opacity"
duration: 83
duration: 88
from: 0
to: 1
}
@ -70,7 +70,7 @@ Item {
}
NumberAnimation {
properties: "opacity"
duration: 83
duration: 88
from: 0
to: 1
}
@ -373,7 +373,7 @@ Item {
horizontalPadding:0
verticalPadding: 0
checked: itemModel.checked
animationEnabled:false
enableAnimation:false
visible: control.checkable
padding: 0
clickListener: function(){

View File

@ -142,7 +142,7 @@ Window {
Behavior on opacity {
SequentialAnimation {
PauseAnimation {
duration: 83
duration: 88
}
NumberAnimation{
duration: 167

View File

@ -5,6 +5,7 @@
<file>FluentUI/Font/Segoe_Fluent_Icons.ttf</file>
<file>FluentUI/Controls/FluAcrylic.qml</file>
<file>FluentUI/Controls/FluAppBar.qml</file>
<file>FluentUI/Controls/FluArea.qml</file>
<file>FluentUI/Controls/FluAutoSuggestBox.qml</file>
<file>FluentUI/Controls/FluBadge.qml</file>
<file>FluentUI/Controls/FluBreadcrumbBar.qml</file>
@ -106,6 +107,5 @@
<file>FluentUI/Controls/qmldir</file>
<file>FluentUI/Controls/FluEvent.qml</file>
<file>FluentUI/Controls/FluEventBus.qml</file>
<file>FluentUI/Controls/FluFrame.qml</file>
</qresource>
</RCC>

View File

@ -0,0 +1,28 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Window
import FluentUI
Rectangle {
default property alias contentData : layout_content.data
property int paddings : 0
property int leftPadding : 0
property int rightPadding : 0
property int topPadding : 0
property int bottomPadding : 0
id:control
radius: 4
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)
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
border.width: 1
implicitHeight: height
implicitWidth: width
Item {
id: layout_content
anchors.fill: parent
anchors.leftMargin: Math.max(paddings,leftPadding)
anchors.rightMargin: Math.max(paddings,rightPadding)
anchors.topMargin: Math.max(paddings,topPadding)
anchors.bottomMargin: Math.max(paddings,bottomPadding)
}
}

View File

@ -55,7 +55,7 @@ FluTextBox{
property: "opacity"
from:0
to:1
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
contentItem: FluRectangle{

View File

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

View File

@ -62,7 +62,7 @@ FluButton {
property: "opacity"
from:0
to:1
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
exit:Transition {
@ -70,12 +70,12 @@ FluButton {
property: "opacity"
from:1
to:0
duration: FluTheme.animationEnabled ? 83 : 0
duration: FluTheme.enableAnimation ? 83 : 0
}
}
contentItem: Item{
clip: true
FluFrame{
FluArea{
id:container
width: 300
height: 360
@ -162,7 +162,7 @@ FluButton {
OpacityAnimator{
from: 0
to: 1
duration: 83
duration: 88
}
ScaleAnimator{
from: 0.5
@ -175,7 +175,7 @@ FluButton {
OpacityAnimator{
from: 1
to: 0
duration: 83
duration: 88
}
ScaleAnimator{
from: 1.0

Some files were not shown because too many files have changed in this diff Show More