Compare commits

..

24 Commits
1.2.5 ... 1.2.6

Author SHA1 Message Date
9f9d9da601 update 2023-04-20 20:22:56 +08:00
6d24cbf37c update 2023-04-20 20:13:31 +08:00
d2929ad701 update 2023-04-20 19:15:38 +08:00
689843fbef Merge pull request #65 from mentalfl0w/dev
Imporve FluContentDialog and add relative example.
2023-04-20 18:49:53 +08:00
c6db001b74 Imporve FluContentDialog and add relative example. 2023-04-20 18:10:45 +08:00
3ec0841b44 add FluPasswordBox 2023-04-20 14:56:09 +08:00
b3d1568de4 Merge pull request #62 from mentalfl0w/dev
Fix crash in macOS.
2023-04-20 11:24:54 +08:00
2511c5dba8 Fix crash in macOS. 2023-04-20 11:08:13 +08:00
3049be128f update 2023-04-20 11:06:24 +08:00
3291b3a882 update 2023-04-20 09:34:57 +08:00
d5744a39bd update 2023-04-20 09:15:28 +08:00
882606b2f6 update 2023-04-20 09:01:58 +08:00
aba33c4d1f update 2023-04-20 00:15:13 +08:00
51aef3f3ec update 2023-04-19 23:53:00 +08:00
221afeea58 Merge branch 'main' of https://github.com/zhuzichu520/FluentUI 2023-04-19 23:05:02 +08:00
c19f5d4c48 update 2023-04-19 23:04:56 +08:00
d2eb72cc5b Merge pull request #60 from mentalfl0w/dev
Add sync with system toggle switch and remove the deprecated warning.
2023-04-19 22:58:33 +08:00
420a9b2bbb Add sync with system toggle switch and remove the deprecated warning. 2023-04-19 22:27:27 +08:00
59dacd8fae update 2023-04-19 18:24:08 +08:00
7489a4bcbe update 2023-04-19 18:04:14 +08:00
6dd859dd1d update 2023-04-19 17:25:46 +08:00
98363542d3 update 2023-04-19 16:58:54 +08:00
5b836a4d82 update 2023-04-19 14:13:46 +08:00
7dcb65f7b6 update 2023-04-19 11:22:44 +08:00
72 changed files with 561 additions and 263 deletions

View File

@ -9,7 +9,7 @@ Window {
Component.onCompleted: {
FluApp.init(app)
FluTheme.frameless = ("windows" === Qt.platform.os)
FluTheme.dark = false
FluTheme.darkMode = FluDarkMode.System
FluApp.routes = {
"/":"qrc:/page/MainPage.qml",
"/about":"qrc:/page/AboutPage.qml",

View File

@ -6,7 +6,7 @@
AppInfo::AppInfo(QObject *parent)
: QObject{parent}
{
version("1.2.5");
version("1.2.6");
lang(new En());
}

View File

@ -103,6 +103,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'Rectangle{
width: 40
height: 40

View File

@ -2,6 +2,7 @@
import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
import "./component"
@ -51,6 +52,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTextButton{
text:"Text Button"
onClicked: {
@ -92,6 +94,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluButton{
text:"Standard Button"
onClicked: {
@ -133,6 +136,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluFilledButton{
text:"Filled Button"
onClicked: {
@ -174,6 +178,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluToggleButton{
text:"Toggle Button"
onClicked: {
@ -216,6 +221,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluIconButton{
iconSource:FluentIcons.ChromeCloseContrast
onClicked: {
@ -266,6 +272,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluDropDownButton{
text:"DropDownButton"
items:[
@ -327,6 +334,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluRadioButton{
selected:true
text:"Text Button"
@ -365,6 +373,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluCheckBox{
text:"Check Box"
}'

View File

@ -23,6 +23,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluCalendarView{
}'
@ -44,6 +45,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluCalendarPicker{
}'

View File

@ -39,6 +39,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluCarousel{
width: 400
height: 300

View File

@ -30,6 +30,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluCheckBox{
text:"Text"
}'

View File

@ -41,6 +41,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluColorView{
}'
@ -64,6 +65,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluColorPicker{
}'

View File

@ -32,6 +32,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluDatePicker{
}'
@ -59,6 +60,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluDatePicker{
showYear:false
}'

View File

@ -18,22 +18,24 @@ FluScrollablePage{
height: 68
paddings: 10
Layout.topMargin: 20
FluButton{
anchors.verticalCenter: parent.verticalCenter
Layout.topMargin: 20
text:"Show Dialog"
onClicked: {
dialog.open()
}
FluButton{
anchors.verticalCenter: parent.verticalCenter
Layout.topMargin: 20
text:"Show Double Button Dialog"
onClicked: {
double_btn_dialog.open()
}
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluContentDialog{
id:dialog
title:"友情提示"
message:"确定要退出程序么?"
negativeText:"取消"
buttonFlags: FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
onNegativeClicked:{
showSuccess("点击取消按钮")
}
@ -41,15 +43,15 @@ FluScrollablePage{
onPositiveClicked:{
showSuccess("点击确定按钮")
}
}
dialog.open()
'
}
dialog.open()'
}
FluContentDialog{
id:dialog
id:double_btn_dialog
title:"友情提示"
message:"确定要退出程序么?"
buttonFlags: FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
negativeText:"取消"
onNegativeClicked:{
showSuccess("点击取消按钮")
@ -60,5 +62,61 @@ dialog.open()
}
}
FluArea{
Layout.fillWidth: true
height: 68
paddings: 10
Layout.topMargin: 20
FluButton{
anchors.verticalCenter: parent.verticalCenter
Layout.topMargin: 20
text:"Show Triple Button Dialog"
onClicked: {
triple_btn_dialog.open()
}
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluContentDialog{
id:dialog
title:"友情提示"
message:"确定要退出程序么?"
negativeText:"取消"
buttonFlags: FluContentDialog.NeutralButton | FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
negativeText:"取消"
onNegativeClicked:{
showSuccess("点击取消按钮")
}
positiveText:"确定"
onPositiveClicked:{
showSuccess("点击确定按钮")
}
neutralText:"最小化"
onNeutralClicked:{
showSuccess("点击最小化按钮")
}
}
dialog.open()'
}
FluContentDialog{
id:triple_btn_dialog
title:"友情提示"
message:"确定要退出程序么?"
buttonFlags: FluContentDialog.NeutralButton | FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
negativeText:"取消"
onNegativeClicked:{
showSuccess("点击取消按钮")
}
positiveText:"确定"
onPositiveClicked:{
showSuccess("点击确定按钮")
}
neutralText:"最小化"
onNeutralClicked:{
showSuccess("点击最小化按钮")
}
}
}

View File

@ -15,14 +15,14 @@ FluScrollablePage{
FluArea{
Layout.fillWidth: true
height: layout_column.height+40
height: layout_column.height+20
paddings: 10
Layout.topMargin: 20
Column{
id:layout_column
spacing: 15
anchors{
verticalCenter: parent.verticalCenter
top:parent.top
left:parent.left
}
@ -77,12 +77,12 @@ FluScrollablePage{
}
}
}
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluExpander{
headerText:"打开一个单选框"
Item{

View File

@ -44,6 +44,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluFlipView{
Image{
source: "qrc:/res/image/banner_1.jpg"
@ -97,6 +98,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluFlipView{
vertical:true
Image{

View File

@ -52,6 +52,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'showInfo("这是一个Info样式的InfoBar")
showWarning("这是一个Warning样式的InfoBar")

View File

@ -38,6 +38,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluMediaPlayer{
id:player
source:"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"

View File

@ -53,6 +53,7 @@ FluScrollablePage{
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluMenu{
id:menu
FluMenuItem:{

View File

@ -95,6 +95,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluWindow{
//launchMode: FluWindow.Standard
//launchMode: FluWindow.SingleTask
@ -128,6 +129,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluButton{
text:"点击跳转"
onClicked: {
@ -165,6 +167,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'property var loginPageRegister: registerForPageResult("/login")
Connections{

View File

@ -50,6 +50,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluPivot{
anchors.fill: parent
FluPivotItem:{

View File

@ -47,6 +47,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluProgressBar{
}

View File

@ -34,6 +34,7 @@ FluScrollablePage{
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluRatingControl{
}'

View File

@ -134,6 +134,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluRectangle{
radius: [25,25,25,25]
width: 50

View File

@ -14,6 +14,39 @@ FluScrollablePage{
bottomPadding:20
spacing: 0
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 136
paddings: 10
ColumnLayout{
spacing: 10
anchors{
top: parent.top
left: parent.left
}
FluText{
text:lang.dark_mode
fontStyle: FluText.BodyStrong
Layout.bottomMargin: 4
}
Repeater{
model: [{title:"System",mode:FluDarkMode.System},{title:"Light",mode:FluDarkMode.Light},{title:"Dark",mode:FluDarkMode.Dark}]
delegate: FluRadioButton{
selected : FluTheme.darkMode === modelData.mode
text:modelData.title
onClicked:{
FluTheme.darkMode = modelData.mode
}
}
}
}
}
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
@ -32,9 +65,7 @@ FluScrollablePage{
fontStyle: FluText.BodyStrong
Layout.bottomMargin: 4
}
Repeater{
id:repeater
model: [{title:"Open",mode:FluNavigationView.Open},{title:"Compact",mode:FluNavigationView.Compact},{title:"Minimal",mode:FluNavigationView.Minimal},{title:"Auto",mode:FluNavigationView.Auto}]
delegate: FluRadioButton{
selected : MainEvent.displayMode===modelData.mode
@ -45,13 +76,12 @@ FluScrollablePage{
}
}
}
}
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 168
height: 80
paddings: 10
ColumnLayout{
@ -82,7 +112,6 @@ FluScrollablePage{
}
}
}
}
}

View File

@ -25,6 +25,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluSlider{
value:50
}'
@ -46,6 +47,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluSlider{
vertical:true
value:50

View File

@ -78,6 +78,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluStatusView{
anchors.fill: parent
statusMode: FluStatusView.Loading

View File

@ -113,6 +113,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTabView{
anchors.fill: parent
Component.onCompleted: {

View File

@ -110,7 +110,6 @@ FluScrollablePage{
id:table_view
Layout.fillWidth: true
Layout.topMargin: 20
width:parent.width
pageCurrent:1
pageCount:10
itemCount: 1000
@ -141,15 +140,15 @@ FluScrollablePage{
width:100
}
];
table_view.columns = columns
table_view.columns = columns
const dataSource = [
{
name: "孙悟空”,
age: 500,
address:"钟灵毓秀的花果山,如神仙仙境的水帘洞",
{
name: "孙悟空”,
age: 500,
address:"钟灵毓秀的花果山,如神仙仙境的水帘洞",
nickname:"齐天大圣"
}
];
}
];
table_view.dataSource = columns
}
}'

View File

@ -45,19 +45,59 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTextBox{
placeholderText:"单行输入框"
}'
}
FluArea{
Layout.fillWidth: true
height: 68
paddings: 10
Layout.topMargin: 20
FluPasswordBox{
Layout.topMargin: 20
placeholderText: "请输入密码"
Layout.preferredWidth: 300
disabled:password_box_switch.selected
anchors{
verticalCenter: parent.verticalCenter
left: parent.left
}
}
Row{
spacing: 5
anchors{
verticalCenter: parent.verticalCenter
right: parent.right
}
FluToggleSwitch{
id:password_box_switch
Layout.alignment: Qt.AlignRight
text:"Disabled"
}
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluPasswordBox{
placeholderText:"请输入密码"
}'
}
FluArea{
Layout.fillWidth: true
height: 36+multiine_textbox.height
paddings: 10
Layout.topMargin: 20
FluMultilineTextBox{
id:multiine_textbox
Layout.topMargin: 20
placeholderText: "多行输入框"
Layout.preferredWidth: 300
@ -83,6 +123,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluMultilineTextBox{
placeholderText:"多行输入框"
}'
@ -122,6 +163,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluAutoSuggestBox{
placeholderText:"AutoSuggestBox"
}'

View File

@ -58,7 +58,11 @@ FluScrollablePage{
Layout.topMargin: 5
selected: FluTheme.dark
clickFunc:function(){
FluTheme.dark = !FluTheme.dark
if(FluTheme.dark){
FluTheme.darkMode = FluDarkMode.Light
}else{
FluTheme.darkMode = FluDarkMode.Dark
}
}
}
FluText{
@ -76,12 +80,12 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTheme.primaryColor = FluColors.Orange
FluTheme.dark = true
FluTheme.nativeText = true
'
FluTheme.nativeText = true'
}

View File

@ -37,6 +37,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTimePicker{
}'
@ -67,6 +68,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTimePicker{
hourFormat:FluTimePicker.HH
}'

View File

@ -30,6 +30,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluToggleSwitch{
text:"Text"
}'

View File

@ -45,6 +45,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluIconButton{
iconSource:FluentIcons.ChromeCloseContrast
iconSize: 15
@ -87,6 +88,7 @@ FluScrollablePage{
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluButton{
id:button_1
text:"删除"
@ -98,8 +100,7 @@ FluScrollablePage{
onClicked:{
showSuccess("点击一个Button")
}
}
'
}'
}

View File

@ -142,6 +142,7 @@ FluScrollablePage {
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTreeView{
id:tree_view
width:240

View File

@ -68,7 +68,6 @@ FluExpander{
"FluComboBox",
"FluContentDialog",
"FluContentPage",
"FluControl",
"FluDatePicker",
"FluDivider",
"FluDropDownButton",
@ -119,7 +118,8 @@ FluExpander{
"FluColors",
"FluTheme",
"FluStatusView",
"FluRatingControl"
"FluRatingControl",
"FluPasswordBox"
];
code = code.replace(/\n/g, "<br>");
code = code.replace(/ /g, "&nbsp;");

View File

@ -1,4 +1,4 @@
QT += quick quickcontrols2 concurrent network multimedia
QT += quick concurrent network multimedia
CONFIG += c++17
DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT

View File

@ -13,6 +13,7 @@ En::En(QObject *parent)
theming("Theming");
media("Media");
dark_mode("Dark Mode");
sys_dark_mode("Sync with system");
search("Search");
about("About");
settings("Settings");

View File

@ -16,6 +16,7 @@ class Lang : public QObject
Q_PROPERTY_AUTO(QString,theming);
Q_PROPERTY_AUTO(QString,media);
Q_PROPERTY_AUTO(QString,dark_mode);
Q_PROPERTY_AUTO(QString,sys_dark_mode);
Q_PROPERTY_AUTO(QString,search);
Q_PROPERTY_AUTO(QString,about);
Q_PROPERTY_AUTO(QString,settings);

View File

@ -13,6 +13,7 @@ Zh::Zh(QObject *parent)
theming("主题");
media("媒体");
dark_mode("夜间模式");
sys_dark_mode("跟随系统");
search("查找");
about("关于");
settings("设置");

View File

@ -3,7 +3,6 @@
#include <QQmlContext>
#include <QDir>
#include <QQuickWindow>
#include <QQuickStyle>
#include <QProcess>
#include "lang/Lang.h"
#include "AppInfo.h"
@ -11,10 +10,16 @@
int main(int argc, char *argv[])
{
QCoreApplication::setOrganizationName("ZhuZiChu");
QCoreApplication::setOrganizationDomain("https://zhuzichu520.github.io");
QCoreApplication::setApplicationName("FluentUI");
QQuickStyle::setStyle("Basic");
//将样式设置为Basic不然会导致组件显示异常
qputenv("QT_QUICK_CONTROLS_STYLE","Basic");
//6.4及以下监听系统深色模式变化
#ifdef Q_OS_WIN
qputenv("QT_QPA_PLATFORM","windows:darkmode=2");
#endif
QGuiApplication::setOrganizationName("ZhuZiChu");
QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io");
QGuiApplication::setApplicationName("FluentUI");
// QQuickWindow::setGraphicsApi(QSGRendererInterface::Software);
QGuiApplication app(argc, argv);
app.setQuitOnLastWindowClosed(false);
QQmlApplicationEngine engine;

View File

@ -66,6 +66,8 @@ FluWindow {
}
FluTextButton{
id:text_hublink
topPadding:0
bottomPadding:0
text:"https://github.com/zhuzichu520/FluentUI"
Layout.alignment: Qt.AlignBottom
onClicked: {
@ -81,6 +83,8 @@ FluWindow {
text:"B站"
}
FluTextButton{
topPadding:0
bottomPadding:0
text:"https://www.bilibili.com/video/BV1mg4y1M71w/"
Layout.alignment: Qt.AlignBottom
onClicked: {

View File

@ -15,6 +15,11 @@ FluWindow {
minimumWidth: 520
minimumHeight: 460
closeFunc:function(event){
close_app.open()
event.accepted = false
}
FluAppBar{
id:appbar
z:9
@ -24,6 +29,7 @@ FluWindow {
}
SystemTrayIcon {
id:system_tray
visible: true
icon.source: "qrc:/res/image/favicon.ico"
tooltip: "FluentUI"
@ -46,6 +52,24 @@ FluWindow {
}
}
FluContentDialog{
id:close_app
title:"退出"
message:"确定要退出程序吗?"
negativeText:"最小化"
buttonFlags: FluContentDialog.NeutralButton | FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
onNegativeClicked:{
system_tray.showMessage("友情提示","FluentUI已隐藏至托盘,点击托盘可再次激活窗口");
window.hide()
}
positiveText:"退出"
neutralText:"取消"
onPositiveClicked:{
window.destoryWindow()
FluApp.closeApp()
}
}
FluNavigationView{
id:nav_view

View File

@ -3,6 +3,16 @@
#include <QObject>
namespace Fluent_DarkMode {
Q_NAMESPACE
enum Fluent_DarkModeType {
System = 0x0,
Light = 0x1,
Dark = 0x2,
};
Q_ENUMS(Fluent_DarkModeType);
}
namespace Fluent_Awesome {
Q_NAMESPACE
enum class Fluent_AwesomeType {

View File

@ -1,6 +1,7 @@
#include "FluTheme.h"
#include "FluColors.h"
#include "Def.h"
#include <QPalette>
#include <QGuiApplication>
@ -17,17 +18,44 @@ FluTheme *FluTheme::getInstance()
FluTheme::FluTheme(QObject *parent)
: QObject{parent}
{
connect(this,&FluTheme::darkModeChanged,this,[=]{
Q_EMIT darkChanged();
});
primaryColor(FluColors::getInstance()->Blue());
textSize(13);
nativeText(true);
nativeText(false);
frameless(true);
std::function<bool()> isDark = [](){
QPalette palette = (qobject_cast<QGuiApplication *>(QCoreApplication::instance()))->palette();
QColor color = palette.color(QPalette::Window).rgb();
return !(color.red() * 0.2126 + color.green() * 0.7152 + color.blue() * 0.0722 > 255 / 2);
};
dark(isDark());
connect(qobject_cast<QGuiApplication *>(QCoreApplication::instance()), &QGuiApplication::paletteChanged, this, [=] (const QPalette &) {
dark(isDark());
});
darkMode(Fluent_DarkMode::Fluent_DarkModeType::Light);
qApp->installEventFilter(this);
}
bool FluTheme::eventFilter(QObject *obj, QEvent *event)
{
Q_UNUSED(obj);
if (event->type() == QEvent::ApplicationPaletteChange)
{
Q_EMIT darkChanged();
event->accept();
return true;
}
return false;
}
bool FluTheme::systemDark()
{
QPalette palette = qApp->palette();
QColor color = palette.color(QPalette::Window).rgb();
return !(color.red() * 0.2126 + color.green() * 0.7152 + color.blue() * 0.0722 > 255 / 2);
}
bool FluTheme::dark(){
if(_darkMode == Fluent_DarkMode::Fluent_DarkModeType::Dark){
return true;
}else if(_darkMode == Fluent_DarkMode::Fluent_DarkModeType::Light){
return false;
}else if(_darkMode == Fluent_DarkMode::Fluent_DarkModeType::System){
return systemDark();
}else{
return false;
}
}

View File

@ -8,17 +8,22 @@
class FluTheme : public QObject
{
Q_OBJECT
Q_PROPERTY(bool dark READ dark NOTIFY darkChanged)
Q_PROPERTY_AUTO(FluColorSet*,primaryColor)
Q_PROPERTY_AUTO(bool,frameless);
Q_PROPERTY_AUTO(bool,dark);
Q_PROPERTY_AUTO(int,darkMode);
Q_PROPERTY_AUTO(bool,nativeText);
Q_PROPERTY_AUTO(int,textSize);
public:
explicit FluTheme(QObject *parent = nullptr);
static FluTheme *getInstance();
bool dark();
Q_SIGNAL void darkChanged();
private:
static FluTheme* m_instance;
bool _dark;
bool eventFilter(QObject *obj, QEvent *event);
bool systemDark();
};
#endif // FLUTHEME_H

View File

@ -88,11 +88,14 @@ void Fluent::registerTypes(const char *uri){
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluRadioButton.qml"),uri,major,minor,"FluRadioButton");
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluSlider.qml"),uri,major,minor,"FluSlider");
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTextBox.qml"),uri,major,minor,"FluTextBox");
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPasswordBox.qml"),uri,major,minor,"FluPasswordBox");
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluText.qml"),uri,major,minor,"FluText");
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluFilledButton.qml"),uri,major,minor,"FluFilledButton");
qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluToggleSwitch.qml"),uri,major,minor,"FluToggleSwitch");
qmlRegisterUncreatableMetaObject(Fluent_Awesome::staticMetaObject, uri,major,minor,"FluentIcons", "Access to enums & flags only");
qmlRegisterUncreatableMetaObject(Fluent_DarkMode::staticMetaObject, uri,major,minor,"FluDarkMode", "Access to enums & flags only");
}
void Fluent::initializeEngine(QQmlEngine *engine, const char *uri)

View File

@ -24,6 +24,7 @@ Item {
y: -Math.round(cursorHeight/2)
height: parent.height+cursorHeight
anchors.left: parent.left
preventStealing: true
anchors.right: parent.right
function handleMouse(mouse) {
if (mouse.buttons & Qt.LeftButton) {

View File

@ -79,7 +79,11 @@ Rectangle{
FluToggleSwitch{
selected: FluTheme.dark
clickFunc:function(){
FluTheme.dark = !FluTheme.dark
if(FluTheme.dark){
FluTheme.darkMode = FluDarkMode.Light
}else{
FluTheme.darkMode = FluDarkMode.Dark
}
}
}
}

View File

@ -1,4 +1,5 @@
import QtQuick
import QtQuick.Controls
import FluentUI
Rectangle {

View File

@ -1,8 +1,9 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
FluControl {
Button {
property bool disabled: false
property color normalColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)

View File

@ -1,9 +1,10 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts
import FluentUI
FluControl {
Button {
property bool selected: false
property var clickFunc

View File

@ -1,10 +1,11 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts
import QtQuick.Window
import FluentUI
FluControl{
Button{
id:control
width: 36
height: 36

View File

@ -7,11 +7,19 @@ Popup {
id: popup
property string title: "Title"
property string message: "Messaeg"
property string message: "Message"
property string neutralText: "Neutral"
property string negativeText: "Negative"
property string positiveText: "Positive"
signal neutralClicked
signal negativeClicked
signal positiveClicked
enum ButtonFlag{
NegativeButton=1
,NeutralButton=2
,PositiveButton=4
}
property int buttonFlags: FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
property var minWidth: {
if(Window.window==null)
return 400
@ -74,40 +82,48 @@ Popup {
right: parent.right
}
Item {
id:divider
width: 1
height: parent.height
anchors.centerIn: parent
}
RowLayout{
anchors
{
centerIn: parent
margins: spacing
fill: parent
}
spacing: 15
FluButton{
id:neutral_btn
Layout.fillWidth: true
Layout.fillHeight: true
visible: popup.buttonFlags&FluContentDialog.NeutralButton
text: neutralText
onClicked: {
popup.close()
neutralClicked()
}
}
FluButton{
anchors{
left: parent.left
leftMargin: 20
rightMargin: 10
right: divider.left
verticalCenter: parent.verticalCenter
FluButton{
id:negative_btn
Layout.fillWidth: true
Layout.fillHeight: true
visible: popup.buttonFlags&FluContentDialog.NegativeButton
text: negativeText
onClicked: {
popup.close()
negativeClicked()
}
}
text: negativeText
onClicked: {
popup.close()
negativeClicked()
}
}
FluFilledButton{
anchors{
right: parent.right
left: divider.right
rightMargin: 20
leftMargin: 10
verticalCenter: parent.verticalCenter
}
text: positiveText
onClicked: {
popup.close()
positiveClicked()
FluFilledButton{
id:positive_btn
Layout.fillWidth: true
Layout.fillHeight: true
visible: popup.buttonFlags&FluContentDialog.PositiveButton
text: positiveText
onClicked: {
popup.close()
positiveClicked()
}
}
}
}

View File

@ -1,13 +0,0 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.impl
import QtQuick.Templates as T
import FluentUI
T.Button {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
}

View File

@ -1,9 +1,10 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Window
import FluentUI
FluControl {
Button {
property bool disabled: false
property color normalColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)

View File

@ -48,7 +48,7 @@ Item {
rightMargin: 15
}
color:{
if(root_mouse.containsMouse){
if(root_mouse.containsMouse || hovered){
return FluTheme.dark ? Qt.rgba(73/255,73/255,73/255,1) : Qt.rgba(245/255,245/255,245/255,1)
}
return FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
@ -76,6 +76,7 @@ Item {
clip: true
anchors{
top: layout_header.bottom
topMargin: -1
left: layout_header.left
}
radius: 4
@ -85,7 +86,7 @@ Item {
Behavior on height {
NumberAnimation{
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: expand ? [ 0, 0, 0, 1 ] : [ 1, 0, 0, 0 ]
}
}

View File

@ -1,8 +1,9 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
FluControl {
Button {
property bool disabled: false
property color normalColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark

View File

@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
Item{
@ -52,7 +53,7 @@ Item{
anchors.fill: parent
}
FluControl{
Button{
id:btn_start
height: vertical ? 20 : 40
width: vertical ? 40 : 20
@ -82,7 +83,7 @@ Item{
}
}
FluControl{
Button{
id:btn_end
height: vertical ? 20 : 40
width: vertical ? 40 : 20

View File

@ -1,8 +1,9 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
FluControl {
Button {
property int iconSize: 20
property int iconSource

View File

@ -1,8 +1,9 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
FluTextArea{
TextArea{
property int fontStyle: FluText.Body
property int pixelSize : FluTheme.textSize

View File

@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts
import FluentUI
@ -121,7 +122,7 @@ Item {
Behavior on height {
NumberAnimation{
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
}
}
@ -140,7 +141,7 @@ Item {
Behavior on height {
NumberAnimation{
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
}
}
@ -318,7 +319,7 @@ Item {
Behavior on height {
NumberAnimation{
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
}
}
@ -511,7 +512,7 @@ Item {
Behavior on Layout.preferredWidth{
NumberAnimation{
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
}
}
@ -557,7 +558,7 @@ Item {
from: 0
to: nav_swipe.height
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 1, 0, 0, 0 ]
}
}
@ -567,7 +568,7 @@ Item {
from: nav_swipe.height;
to: 0
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
}
}
@ -596,7 +597,7 @@ Item {
Behavior on width{
NumberAnimation{
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
}
}
@ -604,7 +605,7 @@ Item {
id:anim_layout_list_x
NumberAnimation{
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
}
}
@ -818,7 +819,7 @@ Item {
currentIndex: -1
model: control_popup.childModel
ScrollBar.vertical: FluScrollBar {}
delegate:FluControl{
delegate:Button{
width: 160
padding:10
background: Rectangle{

View File

@ -1,12 +1,10 @@
import QtQuick
import QtQuick.Controls
import FluentUI
import QtQuick.Layouts
import FluentUI
Item {
id: control
signal requestPage(int page,int count)
property string previousText: "<上一页"
property string nextText: "下一页>"

View File

@ -0,0 +1,120 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
TextField{
property int fontStyle: FluText.Body
property int pixelSize : FluTheme.textSize
property bool disabled: false
property int iconSource: 0
property color normalColor: FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1)
property color disableColor: FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1)
property color placeholderNormalColor: FluTheme.dark ? Qt.rgba(210/255,210/255,210/255,1) : Qt.rgba(96/255,96/255,96/255,1)
property color placeholderFocusColor: FluTheme.dark ? Qt.rgba(152/255,152/255,152/255,1) : Qt.rgba(141/255,141/255,141/255,1)
property color placeholderDisableColor: FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1)
id:control
width: 300
enabled: !disabled
color: {
if(disabled){
return disableColor
}
return normalColor
}
echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectionColor: FluTheme.primaryColor.lightest
placeholderTextColor: {
if(disabled){
return placeholderDisableColor
}
if(focus){
return placeholderFocusColor
}
return placeholderNormalColor
}
font.bold: {
switch (fontStyle) {
case FluText.Display:
return true
case FluText.TitleLarge:
return true
case FluText.Title:
return true
case FluText.SubTitle:
return true
case FluText.BodyStrong:
return true
case FluText.Body:
return false
case FluText.Caption:
return false
default:
return false
}
}
font.pixelSize: {
switch (fontStyle) {
case FluText.Display:
return text.pixelSize * 4.857
case FluText.TitleLarge:
return text.pixelSize * 2.857
case FluText.Title:
return text.pixelSize * 2
case FluText.SubTitle:
return text.pixelSize * 1.428
case FluText.Body:
return text.pixelSize * 1.0
case FluText.BodyStrong:
return text.pixelSize * 1.0
case FluText.Caption:
return text.pixelSize * 0.857
default:
return text.pixelSize * 1.0
}
}
selectByMouse: true
rightPadding: icon_end.visible ? 50 : 30
background: FluTextBoxBackground{
inputItem: control
FluIcon{
id:icon_end
iconSource: control.iconSource
iconSize: 15
opacity: 0.5
visible: control.iconSource != 0
anchors{
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: 5
}
}
}
FluIconButton{
id:btn_reveal
iconSource:FluentIcons.RevealPasswordMedium
iconSize: 10
width: 20
height: 20
opacity: 0.5
visible: control.text !== ""
anchors{
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: icon_end.visible ? 25 : 5
}
}
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: control.echoMode !== TextInput.Password && menu.popup()
}
FluTextBoxMenu{
id:menu
inputItem: control
}
}

View File

@ -39,7 +39,9 @@ Rectangle {
id:behavior
enabled: false
NumberAnimation{
duration: 1000
duration: 999
easing.type: Easing.BezierSpline
easing.bezierCurve: [0.55,0.55,0,1]
onRunningChanged: {
if(!running){
behavior.enabled = false
@ -68,18 +70,6 @@ Rectangle {
ctx.arc(width/2, height/2, radius2 ,-0.5 * Math.PI,-0.5 * Math.PI + progress * 2 * Math.PI);
ctx.stroke();
ctx.closePath();
// var start_x = width/2 + Math.cos(-0.5 * Math.PI) * radius2;
// var start_y = height/2 + Math.sin(-0.5 * Math.PI) * radius2;
// ctx.beginPath();
// ctx.arc(start_x, start_y, 3, 0, 2*Math.PI);
// ctx.fill();
// ctx.closePath();
// var end_x = width/2 + Math.cos(-0.5 * Math.PI + progress * 2 * Math.PI) * radius2;
// var end_y = height/2 + Math.sin(-0.5 * Math.PI + progress * 2 * Math.PI) * radius2;
// ctx.beginPath();
// ctx.arc(end_x, end_y, 3, 0, 2*Math.PI);
// ctx.fill();
// ctx.closePath();
ctx.restore();
}
}

View File

@ -1,9 +1,10 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts
import FluentUI
FluControl {
Button {
property bool selected: false
property bool disabled: false
@ -47,7 +48,9 @@ FluControl {
}
Behavior on border.width {
NumberAnimation{
duration: 150
duration: 167
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 0, 0, 0, 1 ]
}
}
border.color: {

View File

@ -73,16 +73,16 @@ Item{
anchors.horizontalCenter: vertical ? parent.horizontalCenter : undefined
color:FluTheme.dark ? Qt.rgba(69/255,69/255,69/255,1) :Qt.rgba(1,1,1,1)
Rectangle{
width: dotSize/2
height: dotSize/2
radius: dotSize/4
width: dotSize
height: dotSize
radius: dotSize/2
color:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
anchors.centerIn: parent
scale: {
if(control_mouse.pressed){
return 0.9
return 4/10
}
return control_mouse.containsMouse || mouse_line.containsMouse ? 1.3 : 1
return control_mouse.containsMouse || mouse_line.containsMouse ? 6/10 : 5/10
}
Behavior on scale {
NumberAnimation{

View File

@ -28,7 +28,7 @@ Item{
visible: opacity
opacity: statusMode === FluStatusView.Loading
Behavior on opacity {
NumberAnimation { duration: 150 }
NumberAnimation { duration: 83 }
}
ColumnLayout{
anchors.centerIn: parent
@ -51,7 +51,7 @@ Item{
visible: opacity
opacity: statusMode === FluStatusView.Empty
Behavior on opacity {
NumberAnimation { duration: 150 }
NumberAnimation { duration: 83 }
}
ColumnLayout{
anchors.centerIn: parent
@ -71,7 +71,7 @@ Item{
visible: opacity
opacity: statusMode === FluStatusView.Error
Behavior on opacity {
NumberAnimation { duration: 150 }
NumberAnimation { duration: 83 }
}
ColumnLayout{
anchors.centerIn: parent

View File

@ -1,39 +0,0 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.impl
import QtQuick.Templates as T
T.TextArea {
id: control
implicitWidth: Math.max(contentWidth + leftPadding + rightPadding,
implicitBackgroundWidth + leftInset + rightInset,
placeholder.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
implicitBackgroundHeight + topInset + bottomInset,
placeholder.implicitHeight + topPadding + bottomPadding)
padding: 6
leftPadding: padding + 4
color: control.palette.text
placeholderTextColor: control.palette.placeholderText
selectionColor: control.palette.highlight
selectedTextColor: control.palette.highlightedText
PlaceholderText {
id: placeholder
x: control.leftPadding
y: control.topPadding
width: control.width - (control.leftPadding + control.rightPadding)
height: control.height - (control.topPadding + control.bottomPadding)
text: control.placeholderText
font: control.font
color: control.placeholderTextColor
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
renderType: control.renderType
}
}

View File

@ -1,8 +1,9 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
FluTextFiled{
TextField{
property int fontStyle: FluText.Body
property int pixelSize : FluTheme.textSize

View File

@ -1,8 +1,9 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
FluControl {
Button {
property bool disabled: false
property color normalColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
@ -12,8 +13,8 @@ FluControl {
property bool textBold: true
id: control
topPadding:5
bottomPadding:5
topPadding:0
bottomPadding:0
leftPadding:0
rightPadding:0
enabled: !disabled

View File

@ -1,46 +0,0 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.impl
import QtQuick.Templates as T
T.TextField {
id: control
implicitWidth: implicitBackgroundWidth + leftInset + rightInset
|| Math.max(contentWidth, placeholder.implicitWidth) + leftPadding + rightPadding
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
contentHeight + topPadding + bottomPadding,
placeholder.implicitHeight + topPadding + bottomPadding)
padding: 6
leftPadding: padding + 4
color: control.palette.text
selectionColor: control.palette.highlight
selectedTextColor: control.palette.highlightedText
placeholderTextColor: control.palette.placeholderText
verticalAlignment: TextInput.AlignVCenter
PlaceholderText {
id: placeholder
x: control.leftPadding
y: control.topPadding
width: control.width - (control.leftPadding + control.rightPadding)
height: control.height - (control.topPadding + control.bottomPadding)
text: control.placeholderText
font: control.font
color: control.placeholderTextColor
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
renderType: control.renderType
}
background: Rectangle {
implicitWidth: 200
implicitHeight: 40
border.width: control.activeFocus ? 2 : 1
color: control.palette.base
border.color: control.activeFocus ? control.palette.highlight : control.palette.mid
}
}

View File

@ -1,8 +1,9 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
FluControl {
Button {
property bool disabled: false
property bool selected: false

View File

@ -1,9 +1,10 @@
import QtQuick
import QtQuick.Controls
import FluentUI
import QtQuick.Controls.Basic
import QtQuick.Layouts
import FluentUI
FluControl {
Button {
property bool selected: false
property var clickFunc
@ -57,45 +58,43 @@ FluControl {
border.width: 1
border.color: selected ? Qt.lighter(FluTheme.primaryColor.dark,1.2) : "#666666"
Rectangle {
width: pressed ? control.height - 4 : control.height - 8
width: pressed ? 28 : 20
anchors{
left: selected ? undefined : parent.left
leftMargin: selected ? control_backgound.width - width - 4 : 4
leftMargin: selected ? 20 : 0
right: selected ? parent.right : undefined
rightMargin: selected ? 4 : control_backgound.width - width - 4
rightMargin: selected ? 0: 20
}
height: control.height - 8
radius: width / 2
antialiasing: true
scale: hovered ? 1.2 : 1.0
smooth: true
height: 20
radius: 10
scale: hovered ? 7/10 : 6/10
anchors.verticalCenter: parent.verticalCenter
color: selected ? "#FFFFFF" : "#666666"
Behavior on anchors.leftMargin {
NumberAnimation {
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 1, 0, 0, 0 ]
}
}
Behavior on anchors.rightMargin {
NumberAnimation {
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 1, 0, 0, 0 ]
}
}
Behavior on width {
NumberAnimation {
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 1, 0, 0, 0 ]
}
}
Behavior on scale {
NumberAnimation {
duration: 167
easing.type: Easing.Bezier
easing.type: Easing.BezierSpline
easing.bezierCurve: [ 1, 0, 0, 0 ]
}
}

View File

@ -18,6 +18,14 @@ ApplicationWindow {
property string route
property var argument:({})
property var pageRegister
property var closeFunc: function(event){
if(closeDestory){
destoryWindow()
}else{
visible = false
event.accepted = false
}
}
signal initArgument(var argument)
id:window
@ -48,15 +56,7 @@ ApplicationWindow {
}
}
onClosing:
(event)=>{
if(closeDestory){
destoryWindow()
}else{
visible = false
event.accepted = false
}
}
onClosing:(event)=>closeFunc(event)
FluInfoBar{
id:infoBar

View File

@ -64,14 +64,12 @@
<file>controls/FluFlipView.qml</file>
<file>controls/FluPivot.qml</file>
<file>controls/FluPivotItem.qml</file>
<file>controls/FluControl.qml</file>
<file>controls/FluTextFiled.qml</file>
<file>controls/FluTextArea.qml</file>
<file>controls/FluTableView.qml</file>
<file>controls/FluPagination.qml</file>
<file>controls/FluToggleButton.qml</file>
<file>controls/FluStatusView.qml</file>
<file>controls/FluPaneItemEmpty.qml</file>
<file>controls/FluRatingControl.qml</file>
<file>controls/FluPasswordBox.qml</file>
</qresource>
</RCC>