mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-03 08:35:28 +08:00
update
This commit is contained in:
@ -2,6 +2,7 @@ pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
import FluentUI
|
||||
import "qrc:///example/qml/global"
|
||||
|
||||
FluObject{
|
||||
|
||||
@ -12,7 +13,7 @@ FluObject{
|
||||
FluPaneItemSeparator{}
|
||||
|
||||
FluPaneItem{
|
||||
title:lang.about
|
||||
title:Lang.about
|
||||
icon:FluentIcons.Contact
|
||||
onDropped: { FluApp.navigate("/about") }
|
||||
onTapListener:function(){
|
||||
@ -21,7 +22,7 @@ FluObject{
|
||||
}
|
||||
|
||||
FluPaneItem{
|
||||
title:lang.settings
|
||||
title:Lang.settings
|
||||
icon:FluentIcons.Settings
|
||||
url:"qrc:/example/qml/page/T_Settings.qml"
|
||||
onDropped:{ FluApp.navigate("/pageWindow",{title:title,url:url}) }
|
||||
|
@ -2,6 +2,7 @@ pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
import FluentUI
|
||||
import "qrc:///example/qml/global"
|
||||
|
||||
FluObject{
|
||||
|
||||
@ -16,7 +17,7 @@ FluObject{
|
||||
FluPaneItem{
|
||||
id:item_home
|
||||
count: 9
|
||||
title:lang.home
|
||||
title:Lang.home
|
||||
infoBadge:FluBadge{
|
||||
count: item_home.count
|
||||
}
|
||||
@ -47,7 +48,7 @@ FluObject{
|
||||
|
||||
FluPaneItemExpander{
|
||||
id:item_expander_basic_input
|
||||
title:lang.basic_input
|
||||
title:Lang.basic_input
|
||||
icon:FluentIcons.CheckboxComposite
|
||||
editDelegate: FluTextBox{
|
||||
text:item_expander_basic_input.title
|
||||
@ -137,7 +138,7 @@ FluObject{
|
||||
}
|
||||
|
||||
FluPaneItemExpander{
|
||||
title:lang.form
|
||||
title:Lang.form
|
||||
icon:FluentIcons.GridView
|
||||
FluPaneItem{
|
||||
title:"TextBox"
|
||||
@ -172,7 +173,7 @@ FluObject{
|
||||
}
|
||||
|
||||
FluPaneItemExpander{
|
||||
title:lang.surface
|
||||
title:Lang.surface
|
||||
icon:FluentIcons.SurfaceHub
|
||||
FluPaneItem{
|
||||
title:"InfoBar"
|
||||
@ -246,7 +247,7 @@ FluObject{
|
||||
}
|
||||
|
||||
FluPaneItemExpander{
|
||||
title:lang.popus
|
||||
title:Lang.popus
|
||||
icon:FluentIcons.ButtonMenu
|
||||
FluPaneItem{
|
||||
title:"Dialog"
|
||||
@ -284,7 +285,7 @@ FluObject{
|
||||
}
|
||||
|
||||
FluPaneItemExpander{
|
||||
title:lang.navigation
|
||||
title:Lang.navigation
|
||||
icon:FluentIcons.AllApps
|
||||
FluPaneItem{
|
||||
title:"Pivot"
|
||||
@ -353,7 +354,7 @@ FluObject{
|
||||
}
|
||||
|
||||
FluPaneItemExpander{
|
||||
title:lang.theming
|
||||
title:Lang.theming
|
||||
icon:FluentIcons.Brightness
|
||||
FluPaneItem{
|
||||
title:"Acrylic"
|
||||
@ -393,7 +394,7 @@ FluObject{
|
||||
}
|
||||
|
||||
FluPaneItemExpander{
|
||||
title:lang.other
|
||||
title:Lang.other
|
||||
icon:FluentIcons.Shop
|
||||
FluPaneItem{
|
||||
title:"QRCode"
|
||||
|
77
example/qml-Qt6/global/Lang.qml
Normal file
77
example/qml-Qt6/global/Lang.qml
Normal file
@ -0,0 +1,77 @@
|
||||
pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
|
||||
property string home
|
||||
property string basic_input
|
||||
property string form
|
||||
property string surface
|
||||
property string popus
|
||||
property string navigation
|
||||
property string theming
|
||||
property string media
|
||||
property string dark_mode
|
||||
property string sys_dark_mode
|
||||
property string search
|
||||
property string about
|
||||
property string settings
|
||||
property string locale
|
||||
property string navigation_view_display_mode
|
||||
property string other
|
||||
|
||||
function zh(){
|
||||
home="首页"
|
||||
basic_input="基本输入"
|
||||
form="表单"
|
||||
surface="表面"
|
||||
popus="弹窗"
|
||||
navigation="导航"
|
||||
theming="主题"
|
||||
media="媒体"
|
||||
dark_mode="夜间模式"
|
||||
sys_dark_mode="跟随系统"
|
||||
search="查找"
|
||||
about="关于"
|
||||
settings="设置"
|
||||
locale="语言环境"
|
||||
navigation_view_display_mode="导航视图显示模式"
|
||||
other="其他"
|
||||
}
|
||||
|
||||
function en(){
|
||||
home="Home"
|
||||
basic_input="Basic Input"
|
||||
form="Form"
|
||||
surface="Surfaces"
|
||||
popus="Popus"
|
||||
navigation="Navigation"
|
||||
theming="Theming"
|
||||
media="Media"
|
||||
dark_mode="Dark Mode"
|
||||
sys_dark_mode="Sync with system"
|
||||
search="Search"
|
||||
about="About"
|
||||
settings="Settings"
|
||||
locale="Locale"
|
||||
navigation_view_display_mode="NavigationView Display Mode"
|
||||
other="Other"
|
||||
}
|
||||
|
||||
property string __locale
|
||||
property var __localeList: ["Zh","En"]
|
||||
|
||||
on__LocaleChanged: {
|
||||
if(__locale === "Zh"){
|
||||
zh()
|
||||
}else{
|
||||
en()
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
__locale = "En"
|
||||
}
|
||||
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
singleton ItemsOriginal 1.0 ItemsOriginal.qml
|
||||
singleton ItemsFooter 1.0 ItemsFooter.qml
|
||||
singleton Lang 1.0 Lang.qml
|
||||
|
Reference in New Issue
Block a user