mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-01 23:51:48 +08:00
update
This commit is contained in:
@ -16,9 +16,6 @@ Item {
|
||||
|
||||
Connections{
|
||||
target: FluApp
|
||||
function onVsyncChanged(){
|
||||
SettingsHelper.saveVsync(FluApp.vsync)
|
||||
}
|
||||
function onUseSystemAppBarChanged(){
|
||||
SettingsHelper.saveUseSystemAppBar(FluApp.useSystemAppBar)
|
||||
}
|
||||
@ -32,7 +29,6 @@ Item {
|
||||
FluApp.init(app)
|
||||
FluApp.windowIcon = "qrc:/example/res/image/favicon.ico"
|
||||
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
|
||||
FluApp.vsync = SettingsHelper.getVsync()
|
||||
FluTheme.darkMode = SettingsHelper.getDarkMode()
|
||||
FluTheme.enableAnimation = true
|
||||
FluApp.routes = {
|
||||
|
@ -56,22 +56,6 @@ FluScrollablePage{
|
||||
}
|
||||
}
|
||||
|
||||
FluArea{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
height: 50
|
||||
paddings: 10
|
||||
FluCheckBox{
|
||||
text:"V-Sync"
|
||||
checked: FluApp.vsync
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: {
|
||||
FluApp.vsync = !FluApp.vsync
|
||||
dialog_restart.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FluArea{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
|
@ -16,9 +16,6 @@ Item {
|
||||
|
||||
Connections{
|
||||
target: FluApp
|
||||
function onVsyncChanged(){
|
||||
SettingsHelper.saveVsync(FluApp.vsync)
|
||||
}
|
||||
function onUseSystemAppBarChanged(){
|
||||
SettingsHelper.saveUseSystemAppBar(FluApp.useSystemAppBar)
|
||||
}
|
||||
@ -32,7 +29,6 @@ Item {
|
||||
FluApp.init(app)
|
||||
FluApp.windowIcon = "qrc:/example/res/image/favicon.ico"
|
||||
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
|
||||
FluApp.vsync = SettingsHelper.getVsync()
|
||||
FluTheme.darkMode = SettingsHelper.getDarkMode()
|
||||
FluTheme.enableAnimation = true
|
||||
FluApp.routes = {
|
||||
|
@ -59,22 +59,6 @@ FluScrollablePage{
|
||||
}
|
||||
}
|
||||
|
||||
FluArea{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
height: 50
|
||||
paddings: 10
|
||||
FluCheckBox{
|
||||
text:"V-Sync"
|
||||
checked: FluApp.vsync
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: {
|
||||
FluApp.vsync = !FluApp.vsync
|
||||
dialog_restart.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FluArea{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
|
@ -23,8 +23,6 @@ public:
|
||||
Q_INVOKABLE QString getRender(){return get("render").toString();}
|
||||
Q_INVOKABLE void saveDarkMode(int darkModel){save("darkMode",darkModel);}
|
||||
Q_INVOKABLE int getDarkMode(){return get("darkMode",QVariant(0)).toInt();}
|
||||
Q_INVOKABLE void saveVsync(bool vsync){save("vsync",vsync);}
|
||||
Q_INVOKABLE bool getVsync(){return get("vsync",QVariant(true)).toBool();}
|
||||
Q_INVOKABLE void saveUseSystemAppBar(bool useSystemAppBar){save("useSystemAppBar",useSystemAppBar);}
|
||||
Q_INVOKABLE bool getUseSystemAppBar(){return get("useSystemAppBar",QVariant(false)).toBool();}
|
||||
private:
|
||||
|
@ -27,6 +27,8 @@ int main(int argc, char *argv[])
|
||||
qputenv("QT_QUICK_CONTROLS_STYLE","Basic");
|
||||
//UOSv20 does not print logs
|
||||
qputenv("QT_LOGGING_RULES","");
|
||||
//v-sync does not work
|
||||
qputenv("QSG_RENDER_LOOP","basic");
|
||||
QGuiApplication::setOrganizationName("ZhuZiChu");
|
||||
QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io");
|
||||
QGuiApplication::setApplicationName("FluentUI");
|
||||
|
Reference in New Issue
Block a user