parent
6ebd659e13
commit
9b9e981edc
|
@ -127,7 +127,7 @@
|
|||
<file>qml/global/ItemsOriginal.qml</file>
|
||||
<file>qml/global/qmldir</file>
|
||||
<file>qml/page/T_Acrylic.qml</file>
|
||||
<file>qml/page/T_Awesome.qml</file>
|
||||
<file>qml/page/T_SegoeIcon.qml</file>
|
||||
<file>qml/page/T_Badge.qml</file>
|
||||
<file>qml/page/T_BreadcrumbBar.qml</file>
|
||||
<file>qml/page/T_Buttons.qml</file>
|
||||
|
@ -209,5 +209,6 @@
|
|||
<file>qml/page/T_GroupBox.qml</file>
|
||||
<file>res/image/bg_scenic.jpg</file>
|
||||
<file>qml/window/FluentInitializrWindow.qml</file>
|
||||
<file>qml/page/T_FontAwesome.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -425,96 +425,101 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="367"/>
|
||||
<source>Awesome</source>
|
||||
<source>SegoeIcon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="375"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="373"/>
|
||||
<source>FontAwesome</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="381"/>
|
||||
<source>Chart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="378"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="384"/>
|
||||
<source>Bar Chart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="384"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="390"/>
|
||||
<source>Line Chart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="390"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="396"/>
|
||||
<source>Pie Chart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="396"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="402"/>
|
||||
<source>Polar Area Chart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="402"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="408"/>
|
||||
<source>Bubble Chart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="408"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="414"/>
|
||||
<source>Scatter Chart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="414"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="420"/>
|
||||
<source>Radar Chart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="427"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="433"/>
|
||||
<source>Other</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="430"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="436"/>
|
||||
<source>QRCode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="436"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="442"/>
|
||||
<source>Tour</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="442"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="448"/>
|
||||
<source>Timeline</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="448"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="454"/>
|
||||
<source>Captcha</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="454"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="460"/>
|
||||
<source>Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="461"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="467"/>
|
||||
<source>Remote Loader</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="475"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="481"/>
|
||||
<source>Hot Loader</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="481"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="487"/>
|
||||
<source>3D</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="487"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="493"/>
|
||||
<source>Test Crash</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -769,29 +774,6 @@ Updated content:
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_Awesome</name>
|
||||
<message>
|
||||
<location filename="qml/page/T_Awesome.qml" line="9"/>
|
||||
<source>Awesome</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Awesome.qml" line="13"/>
|
||||
<source>Please enter a keyword</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Awesome.qml" line="20"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Awesome.qml" line="55"/>
|
||||
<source>You Copied </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_Badge</name>
|
||||
<message>
|
||||
|
@ -1322,6 +1304,41 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_FontAwesome</name>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="9"/>
|
||||
<source>FontAwesome</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="13"/>
|
||||
<source>Please enter a keyword</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="20"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="56"/>
|
||||
<source>You Copied </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="74"/>
|
||||
<source>Usage Tip</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="74"/>
|
||||
<source>You must set the attribute:
|
||||
`isFontAwesome` to `true`
|
||||
in order to use FontAwesome icons.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_GroupBox</name>
|
||||
<message>
|
||||
|
@ -1780,6 +1797,29 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_SegoeIcon</name>
|
||||
<message>
|
||||
<location filename="qml/page/T_SegoeIcon.qml" line="9"/>
|
||||
<source>SegoeIcon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_SegoeIcon.qml" line="13"/>
|
||||
<source>Please enter a keyword</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_SegoeIcon.qml" line="20"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_SegoeIcon.qml" line="55"/>
|
||||
<source>You Copied </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_Settings</name>
|
||||
<message>
|
||||
|
|
|
@ -425,96 +425,101 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="367"/>
|
||||
<source>Awesome</source>
|
||||
<translation type="unfinished">图标</translation>
|
||||
<source>SegoeIcon</source>
|
||||
<translation type="unfinished">Segoe图标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="375"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="373"/>
|
||||
<source>FontAwesome</source>
|
||||
<translation type="unfinished">FontAwesome图标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="381"/>
|
||||
<source>Chart</source>
|
||||
<translation type="unfinished">图表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="378"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="384"/>
|
||||
<source>Bar Chart</source>
|
||||
<translation type="unfinished">条形图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="384"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="390"/>
|
||||
<source>Line Chart</source>
|
||||
<translation type="unfinished">线型图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="390"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="396"/>
|
||||
<source>Pie Chart</source>
|
||||
<translation type="unfinished">饼图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="396"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="402"/>
|
||||
<source>Polar Area Chart</source>
|
||||
<translation type="unfinished">极坐标区域图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="402"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="408"/>
|
||||
<source>Bubble Chart</source>
|
||||
<translation type="unfinished">气泡图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="408"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="414"/>
|
||||
<source>Scatter Chart</source>
|
||||
<translation type="unfinished">散点图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="414"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="420"/>
|
||||
<source>Radar Chart</source>
|
||||
<translation type="unfinished">雷达图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="427"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="433"/>
|
||||
<source>Other</source>
|
||||
<translation type="unfinished">其他</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="430"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="436"/>
|
||||
<source>QRCode</source>
|
||||
<translation type="unfinished">二维码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="436"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="442"/>
|
||||
<source>Tour</source>
|
||||
<translation type="unfinished">游览</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="442"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="448"/>
|
||||
<source>Timeline</source>
|
||||
<translation type="unfinished">时间轴</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="448"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="454"/>
|
||||
<source>Captcha</source>
|
||||
<translation type="unfinished">验证码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="454"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="460"/>
|
||||
<source>Network</source>
|
||||
<translation type="unfinished">网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="461"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="467"/>
|
||||
<source>Remote Loader</source>
|
||||
<translation type="unfinished">远程加载</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="475"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="481"/>
|
||||
<source>Hot Loader</source>
|
||||
<translation type="unfinished">热加载</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="481"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="487"/>
|
||||
<source>3D</source>
|
||||
<translation type="unfinished">3D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="487"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="493"/>
|
||||
<source>Test Crash</source>
|
||||
<translation type="unfinished">测试崩溃</translation>
|
||||
</message>
|
||||
|
@ -773,29 +778,6 @@ Updated content:
|
|||
<translation type="unfinished">亚克力</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_Awesome</name>
|
||||
<message>
|
||||
<location filename="qml/page/T_Awesome.qml" line="9"/>
|
||||
<source>Awesome</source>
|
||||
<translation type="unfinished">图标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Awesome.qml" line="13"/>
|
||||
<source>Please enter a keyword</source>
|
||||
<translation type="unfinished">请输入关键字</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Awesome.qml" line="20"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Awesome.qml" line="55"/>
|
||||
<source>You Copied </source>
|
||||
<translation type="unfinished">您复制</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_Badge</name>
|
||||
<message>
|
||||
|
@ -1353,6 +1335,43 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||
<translation type="unfinished">垂直方向的翻转视图</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_FontAwesome</name>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="9"/>
|
||||
<source>FontAwesome</source>
|
||||
<translation type="unfinished">FontAwesome图标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="13"/>
|
||||
<source>Please enter a keyword</source>
|
||||
<translation type="unfinished">请输入关键字</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="20"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="56"/>
|
||||
<source>You Copied </source>
|
||||
<translation type="unfinished">您复制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="74"/>
|
||||
<source>Usage Tip</source>
|
||||
<translation type="unfinished">使用提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_FontAwesome.qml" line="74"/>
|
||||
<source>You must set the attribute:
|
||||
`isFontAwesome` to `true`
|
||||
in order to use FontAwesome icons.</source>
|
||||
<translation type="unfinished">你必须指定属性
|
||||
`isFontAwesome` 为 `true`
|
||||
才可以使用 FontAwesome 图标</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_GroupBox</name>
|
||||
<message>
|
||||
|
@ -1829,6 +1848,29 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||
<translation type="unfinished">散点图</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_SegoeIcon</name>
|
||||
<message>
|
||||
<location filename="qml/page/T_SegoeIcon.qml" line="9"/>
|
||||
<source>SegoeIcon</source>
|
||||
<translation type="unfinished">Segoe图标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_SegoeIcon.qml" line="13"/>
|
||||
<source>Please enter a keyword</source>
|
||||
<translation type="unfinished">请输入关键字</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_SegoeIcon.qml" line="20"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_SegoeIcon.qml" line="55"/>
|
||||
<source>You Copied </source>
|
||||
<translation type="unfinished">您复制</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_Settings</name>
|
||||
<message>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pragma Singleton
|
||||
pragma Singleton
|
||||
|
||||
import QtQuick 2.15
|
||||
import FluentUI 1.0
|
||||
|
@ -364,9 +364,15 @@ FluObject{
|
|||
onTap: { navigationView.push(url) }
|
||||
}
|
||||
FluPaneItem{
|
||||
title: qsTr("Awesome")
|
||||
title: qsTr("SegoeIcon")
|
||||
menuDelegate: paneItemMenu
|
||||
url: "qrc:/example/qml/page/T_Awesome.qml"
|
||||
url: "qrc:/example/qml/page/T_SegoeIcon.qml"
|
||||
onTap: { navigationView.push(url) }
|
||||
}
|
||||
FluPaneItem{
|
||||
title: qsTr("FontAwesome")
|
||||
menuDelegate: paneItemMenu
|
||||
url: "qrc:/example/qml/page/T_FontAwesome.qml"
|
||||
onTap: { navigationView.push(url) }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Window 2.15
|
||||
import FluentUI 1.0
|
||||
|
||||
FluContentPage {
|
||||
|
||||
title: qsTr("FontAwesome")
|
||||
|
||||
FluTextBox{
|
||||
id:text_box
|
||||
placeholderText: qsTr("Please enter a keyword")
|
||||
anchors{
|
||||
top:parent.top
|
||||
}
|
||||
}
|
||||
|
||||
FluFilledButton{
|
||||
text: qsTr("Search")
|
||||
anchors{
|
||||
left: text_box.right
|
||||
verticalCenter: text_box.verticalCenter
|
||||
leftMargin: 14
|
||||
}
|
||||
onClicked: {
|
||||
grid_view.model = FluTheme.fontAwesomeList(text_box.text)
|
||||
}
|
||||
}
|
||||
GridView{
|
||||
id:grid_view
|
||||
cellWidth: 80
|
||||
cellHeight: 80
|
||||
clip: true
|
||||
boundsBehavior: GridView.StopAtBounds
|
||||
model:FluTheme.fontAwesomeList()
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
anchors{
|
||||
topMargin: 10
|
||||
top:text_box.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
delegate: Item {
|
||||
width: 68
|
||||
height: 80
|
||||
FluIconButton{
|
||||
id:item_icon
|
||||
isFontAwesome: true
|
||||
iconSource:modelData.icon
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
onClicked: {
|
||||
var text ="FluentFAIcons."+modelData.name;
|
||||
FluTools.clipText(text)
|
||||
showSuccess(qsTr("You Copied ")+text)
|
||||
}
|
||||
}
|
||||
FluText {
|
||||
id:item_name
|
||||
font.pixelSize: 10
|
||||
font.family: FluTextStyle.family
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: item_icon.bottom
|
||||
width:parent.width
|
||||
wrapMode: Text.WrapAnywhere
|
||||
text: modelData.name
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
showInfo(qsTr("Usage Tip"),0,qsTr("You must set the attribute: \n`isFontAwesome` to `true`\n in order to use FontAwesome icons."));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Window 2.15
|
||||
|
@ -6,7 +6,7 @@ import FluentUI 1.0
|
|||
|
||||
FluContentPage {
|
||||
|
||||
title: qsTr("Awesome")
|
||||
title: qsTr("SegoeIcon")
|
||||
|
||||
FluTextBox{
|
||||
id:text_box
|
||||
|
@ -24,7 +24,7 @@ FluContentPage {
|
|||
leftMargin: 14
|
||||
}
|
||||
onClicked: {
|
||||
grid_view.model = FluTheme.awesomeList(text_box.text)
|
||||
grid_view.model = FluTheme.segoeIconList(text_box.text)
|
||||
}
|
||||
}
|
||||
GridView{
|
||||
|
@ -33,7 +33,7 @@ FluContentPage {
|
|||
cellHeight: 80
|
||||
clip: true
|
||||
boundsBehavior: GridView.StopAtBounds
|
||||
model:FluTheme.awesomeList()
|
||||
model:FluTheme.segoeIconList()
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
anchors{
|
||||
topMargin: 10
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
if (FLUENTUI_BUILD_STATIC_LIB AND (QT_VERSION VERSION_GREATER_EQUAL "6.2"))
|
||||
project(fluentui VERSION 1.0)
|
||||
|
@ -144,7 +144,8 @@ if(QT_VERSION VERSION_GREATER_EQUAL "6.2")
|
|||
)
|
||||
else()
|
||||
#加快qrc编译
|
||||
set(QRC_FILE Qt5/imports/fluentui.qrc)
|
||||
set(QRC
|
||||
RESOURCES Qt6/imports/FluentUI/Font/Font-Awesome-6-Free-Solid.ttf_FILE Qt5/imports/fluentui.qrc)
|
||||
qt_add_big_resources(QRC_RESOURCES ${QRC_FILE})
|
||||
list(APPEND QRC_RESOURCES ${QRC_FILE})
|
||||
set_property(SOURCE ${QRC_FILE} PROPERTY SKIP_AUTORCC ON)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "FluTheme.h"
|
||||
#include "FluTheme.h"
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QPalette>
|
||||
|
@ -37,8 +37,7 @@ void FluTheme::refreshColors(){
|
|||
|
||||
bool FluTheme::eventFilter(QObject* obj, QEvent* event) {
|
||||
Q_UNUSED(obj);
|
||||
if (event->type() == QEvent::ApplicationPaletteChange || event->type() == QEvent::ThemeChange)
|
||||
{
|
||||
if(event->type() == QEvent::ApplicationPaletteChange || event->type() == QEvent::ThemeChange) {
|
||||
_systemDark = systemDark();
|
||||
Q_EMIT darkChanged();
|
||||
event->accept();
|
||||
|
@ -47,9 +46,25 @@ bool FluTheme::eventFilter(QObject *obj, QEvent *event){
|
|||
return false;
|
||||
}
|
||||
|
||||
QJsonArray FluTheme::awesomeList(const QString& keyword){
|
||||
QJsonArray FluTheme::segoeIconList(const QString& keyword) {
|
||||
QJsonArray arr;
|
||||
QMetaEnum enumType = Fluent_Awesome::staticMetaObject.enumerator(Fluent_Awesome::staticMetaObject.indexOfEnumerator("Fluent_AwesomeType"));
|
||||
QMetaEnum enumType = Fluent_SegoeIcon::staticMetaObject.enumerator(Fluent_SegoeIcon::staticMetaObject.indexOfEnumerator("Fluent_SegoeIconType"));
|
||||
for(int i = 0; i < enumType.keyCount(); ++i) {
|
||||
QString name = enumType.key(i);
|
||||
int icon = enumType.value(i);
|
||||
if(keyword.isEmpty() || name.contains(keyword)) {
|
||||
QJsonObject obj;
|
||||
obj.insert("name", name);
|
||||
obj.insert("icon", icon);
|
||||
arr.append(obj);
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
QJsonArray FluTheme::fontAwesomeList(const QString& keyword) {
|
||||
QJsonArray arr;
|
||||
QMetaEnum enumType = Fluent_FontAwesome::staticMetaObject.enumerator(Fluent_FontAwesome::staticMetaObject.indexOfEnumerator("Fluent_FontAwesomeType"));
|
||||
for(int i = 0; i < enumType.keyCount(); ++i) {
|
||||
QString name = enumType.key(i);
|
||||
int icon = enumType.value(i);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef FLUTHEME_H
|
||||
#ifndef FLUTHEME_H
|
||||
#define FLUTHEME_H
|
||||
|
||||
#include <QObject>
|
||||
|
@ -13,8 +13,7 @@
|
|||
/**
|
||||
* @brief The FluTheme class
|
||||
*/
|
||||
class FluTheme : public QObject
|
||||
{
|
||||
class FluTheme : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool dark READ dark NOTIFY darkChanged)
|
||||
Q_PROPERTY_AUTO(FluAccentColor*, accentColor);
|
||||
|
@ -42,9 +41,12 @@ private:
|
|||
void refreshColors();
|
||||
public:
|
||||
SINGLETON(FluTheme)
|
||||
Q_INVOKABLE QJsonArray awesomeList(const QString& keyword = "");
|
||||
Q_INVOKABLE QJsonArray segoeIconList(const QString& keyword = "");
|
||||
Q_INVOKABLE QJsonArray fontAwesomeList(const QString& keyword = "");
|
||||
Q_SIGNAL void darkChanged();
|
||||
static FluTheme *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine){return getInstance();}
|
||||
static FluTheme* create(QQmlEngine* qmlEngine, QJSEngine* jsEngine) {
|
||||
return getInstance();
|
||||
}
|
||||
bool dark();
|
||||
private:
|
||||
bool _systemDark;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "FluentUI.h"
|
||||
#include "FluentUI.h"
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include "Def.h"
|
||||
|
@ -130,7 +130,8 @@ void FluentUI::registerTypes(const char *uri){
|
|||
qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRouter.qml"), uri, major, minor, "FluRouter");
|
||||
qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluEventBus.qml"), uri, major, minor, "FluEventBus");
|
||||
|
||||
qmlRegisterUncreatableMetaObject(Fluent_Awesome::staticMetaObject, uri,major,minor,"FluentIcons", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(Fluent_SegoeIcon::staticMetaObject, uri, major, minor, "FluentIcons", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(Fluent_FontAwesome::staticMetaObject, uri, major, minor, "FluentFAIcons", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluThemeType::staticMetaObject, uri, major, minor, "FluThemeType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluPageType::staticMetaObject, uri, major, minor, "FluPageType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluWindowType::staticMetaObject, uri, major, minor, "FluWindowType", "Access to enums & flags only");
|
||||
|
|
|
@ -1,19 +1,33 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import FluentUI 1.0
|
||||
|
||||
Text {
|
||||
property bool isFontAwesome: false
|
||||
property int iconSource
|
||||
property int iconSize: 20
|
||||
property color iconColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
||||
id:control
|
||||
font.family: "Segoe Fluent Icons"
|
||||
font.pixelSize: iconSize
|
||||
font {
|
||||
family: {
|
||||
if (isFontAwesome) {
|
||||
return fontFontAwesome.name;
|
||||
} else {
|
||||
return fontSegoeIcons.name;
|
||||
}
|
||||
}
|
||||
pixelSize: iconSize
|
||||
}
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: iconColor
|
||||
text: (String.fromCharCode(iconSource).toString(16))
|
||||
FontLoader{
|
||||
id: fontFontAwesome
|
||||
source: "../Font/Font-Awesome-6-Free-Solid.ttf"
|
||||
}
|
||||
FontLoader{
|
||||
id: fontSegoeIcons
|
||||
source: "../Font/Segoe_Fluent_Icons.ttf"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import FluentUI 1.0
|
||||
|
@ -38,6 +38,7 @@ Button {
|
|||
}
|
||||
}
|
||||
property color textColor: FluTheme.fontPrimaryColor
|
||||
property bool isFontAwesome: false
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: control.text
|
||||
Accessible.description: contentDescription
|
||||
|
@ -62,6 +63,7 @@ Button {
|
|||
id:com_icon
|
||||
FluIcon {
|
||||
id:text_icon
|
||||
isFontAwesome: control.isFontAwesome
|
||||
font.pixelSize: iconSize
|
||||
iconSize: control.iconSize
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
|
Binary file not shown.
|
@ -110,5 +110,6 @@
|
|||
<file>FluentUI/Controls/FluSheet.qml</file>
|
||||
<file>FluentUI/Controls/FluGroupBox.qml</file>
|
||||
<file>FluentUI/Controls/FluControlBackground.qml</file>
|
||||
<file>FluentUI/Font/Font-Awesome-6-Free-Solid.ttf</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -1,19 +1,33 @@
|
|||
import QtQuick
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import FluentUI
|
||||
|
||||
Text {
|
||||
property bool isFontAwesome: false
|
||||
property int iconSource
|
||||
property int iconSize: 20
|
||||
property color iconColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
||||
id:control
|
||||
font.family: "Segoe Fluent Icons"
|
||||
font.pixelSize: iconSize
|
||||
font {
|
||||
family: {
|
||||
if (isFontAwesome) {
|
||||
return fontFontAwesome.name;
|
||||
} else {
|
||||
return fontSegoeIcons.name;
|
||||
}
|
||||
}
|
||||
pixelSize: iconSize
|
||||
}
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: iconColor
|
||||
text: (String.fromCharCode(iconSource).toString(16))
|
||||
FontLoader{
|
||||
id: fontFontAwesome
|
||||
source: "../Font/Font-Awesome-6-Free-Solid.ttf"
|
||||
}
|
||||
FontLoader{
|
||||
id: fontSegoeIcons
|
||||
source: "../Font/Segoe_Fluent_Icons.ttf"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Basic
|
||||
|
@ -39,6 +39,7 @@ Button {
|
|||
}
|
||||
}
|
||||
property color textColor: FluTheme.fontPrimaryColor
|
||||
property bool isFontAwesome: false
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: control.text
|
||||
Accessible.description: contentDescription
|
||||
|
@ -63,6 +64,7 @@ Button {
|
|||
id:com_icon
|
||||
FluIcon {
|
||||
id:text_icon
|
||||
isFontAwesome: control.isFontAwesome
|
||||
font.pixelSize: iconSize
|
||||
iconSize: control.iconSize
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
|
Binary file not shown.
|
@ -212,31 +212,37 @@
|
|||
<name>FluTimePicker</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
|
||||
<source>AM</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
|
||||
<source>PM</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
|
||||
<source>Hour</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
|
||||
<source>Minute</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -265,8 +271,8 @@
|
|||
<context>
|
||||
<name>FluWindow</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="285"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="284"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="288"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="287"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -212,31 +212,37 @@
|
|||
<name>FluTimePicker</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
|
||||
<source>AM</source>
|
||||
<translation type="unfinished">上午</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
|
||||
<source>PM</source>
|
||||
<translation type="unfinished">下午</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
|
||||
<source>Hour</source>
|
||||
<translation type="unfinished">时</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
|
||||
<source>Minute</source>
|
||||
<translation type="unfinished">分</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">确定</translation>
|
||||
</message>
|
||||
|
@ -265,8 +271,8 @@
|
|||
<context>
|
||||
<name>FluWindow</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="285"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="284"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="288"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="287"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished">加载中...</translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in New Issue