update
parent
bcc5d433a9
commit
a71831cd9d
|
@ -34,7 +34,7 @@ FluWindow {
|
||||||
fontStyle: FluText.Title
|
fontStyle: FluText.Title
|
||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:"v1.0.3"
|
text:"v1.0.4"
|
||||||
fontStyle: FluText.Body
|
fontStyle: FluText.Body
|
||||||
Layout.alignment: Qt.AlignBottom
|
Layout.alignment: Qt.AlignBottom
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,6 @@ FluWindow {
|
||||||
title:"Theming"
|
title:"Theming"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"Theme"
|
title:"Theme"
|
||||||
onTap:{
|
onTap:{
|
||||||
|
|
|
@ -30,8 +30,8 @@ FluContentPage {
|
||||||
}
|
}
|
||||||
GridView{
|
GridView{
|
||||||
id:grid_view
|
id:grid_view
|
||||||
cellWidth: 120
|
cellWidth: 80
|
||||||
cellHeight: 60
|
cellHeight: 80
|
||||||
clip: true
|
clip: true
|
||||||
model:FluApp.awesomelist()
|
model:FluApp.awesomelist()
|
||||||
ScrollBar.vertical: FluScrollBar {}
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
|
@ -43,8 +43,8 @@ FluContentPage {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width: 120
|
width: 68
|
||||||
height: 60
|
height: 80
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
id:item_icon
|
id:item_icon
|
||||||
icon:modelData.icon
|
icon:modelData.icon
|
||||||
|
@ -57,10 +57,14 @@ FluContentPage {
|
||||||
}
|
}
|
||||||
FluText {
|
FluText {
|
||||||
id:item_name
|
id:item_name
|
||||||
font.pixelSize: 10;
|
font.pixelSize: 10
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: item_icon.bottom
|
anchors.top: item_icon.bottom
|
||||||
|
width:parent.width
|
||||||
|
wrapMode: Text.WrapAnywhere
|
||||||
text: modelData.name
|
text: modelData.name
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,8 +81,9 @@ FluScrollablePage{
|
||||||
paddings: 10
|
paddings: 10
|
||||||
|
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
icon:FluentIcons.FA_close
|
icon:FluentIcons.ChromeCloseContrast
|
||||||
disabled:icon_button_switch.checked
|
disabled:icon_button_switch.checked
|
||||||
|
iconSize: 15
|
||||||
anchors{
|
anchors{
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
|
|
@ -20,7 +20,7 @@ FluScrollablePage{
|
||||||
color: mouse_item.containsMouse ? Qt.lighter(modelData.normal,1.1) : modelData.normal
|
color: mouse_item.containsMouse ? Qt.lighter(modelData.normal,1.1) : modelData.normal
|
||||||
FluIcon {
|
FluIcon {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
icon: FluentIcons.FA_check
|
icon: FluentIcons.AcceptMedium
|
||||||
iconSize: 15
|
iconSize: 15
|
||||||
visible: modelData === FluTheme.primaryColor
|
visible: modelData === FluTheme.primaryColor
|
||||||
color: FluTheme.isDark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
color: FluTheme.isDark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||||
|
|
|
@ -82,7 +82,7 @@ QJsonArray FluApp::awesomelist(const QString& keyword)
|
||||||
obj.insert("icon",icon);
|
obj.insert("icon",icon);
|
||||||
arr.append(obj);
|
arr.append(obj);
|
||||||
}else{
|
}else{
|
||||||
if(name.mid(3).contains(keyword)){
|
if(name.contains(keyword)){
|
||||||
QJsonObject obj;
|
QJsonObject obj;
|
||||||
obj.insert("name",name);
|
obj.insert("name",name);
|
||||||
obj.insert("icon",icon);
|
obj.insert("icon",icon);
|
||||||
|
|
|
@ -17,6 +17,6 @@ FluTheme::FluTheme(QObject *parent)
|
||||||
{
|
{
|
||||||
primaryColor(FluColors::getInstance()->Blue());
|
primaryColor(FluColors::getInstance()->Blue());
|
||||||
textSize(13);
|
textSize(13);
|
||||||
isFrameless(true);
|
isFrameless(false);
|
||||||
isDark(false);
|
isDark(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,9 +86,9 @@ void Fluent::initializeEngine(QQmlEngine *engine, const char *uri)
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setFamily("Microsoft YaHei");
|
font.setFamily("Microsoft YaHei");
|
||||||
QGuiApplication::setFont(font);
|
QGuiApplication::setFont(font);
|
||||||
QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering);
|
// QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering);
|
||||||
#endif
|
#endif
|
||||||
QFontDatabase::addApplicationFont(":/com.zhuzichu/res/font/fontawesome-webfont.ttf");
|
QFontDatabase::addApplicationFont(":/com.zhuzichu/res/font/Segoe_Fluent_Icons.ttf");
|
||||||
FluApp* app = FluApp::getInstance();
|
FluApp* app = FluApp::getInstance();
|
||||||
engine->rootContext()->setContextProperty("FluApp",app);
|
engine->rootContext()->setContextProperty("FluApp",app);
|
||||||
FluColors* colors = FluColors::getInstance();
|
FluColors* colors = FluColors::getInstance();
|
||||||
|
|
|
@ -101,7 +101,7 @@ Rectangle{
|
||||||
}
|
}
|
||||||
|
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
icon : FluentIcons.FA_window_minimize
|
icon : FluentIcons.ChromeMinimizeContrast
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
iconSize: 15
|
iconSize: 15
|
||||||
text:"最小化"
|
text:"最小化"
|
||||||
|
@ -117,7 +117,7 @@ Rectangle{
|
||||||
return false
|
return false
|
||||||
return Window.Maximized === window.visibility
|
return Window.Maximized === window.visibility
|
||||||
}
|
}
|
||||||
icon : isRestore ? FluentIcons.FA_window_restore : FluentIcons.FA_window_maximize
|
icon : isRestore ? FluentIcons.ChromeRestoreContrast : FluentIcons.ChromeMaximizeContrast
|
||||||
color:hovered ? "#20000000" : "#00000000"
|
color:hovered ? "#20000000" : "#00000000"
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: resizable
|
visible: resizable
|
||||||
|
@ -129,9 +129,10 @@ Rectangle{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
icon : FluentIcons.FA_close
|
icon : FluentIcons.ChromeCloseContrast
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
text:"关闭"
|
text:"关闭"
|
||||||
|
iconSize: 13
|
||||||
textColor: root.textColor
|
textColor: root.textColor
|
||||||
color:hovered ? "#20000000" : "#00000000"
|
color:hovered ? "#20000000" : "#00000000"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -74,7 +74,7 @@ TextField{
|
||||||
inputItem: input
|
inputItem: input
|
||||||
|
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
icon:FluentIcons.FA_close
|
icon:FluentIcons.ChromeClose
|
||||||
iconSize: 14
|
iconSize: 14
|
||||||
width: 20
|
width: 20
|
||||||
height: 20
|
height: 20
|
||||||
|
|
|
@ -66,7 +66,7 @@ Item {
|
||||||
|
|
||||||
FluIcon {
|
FluIcon {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
icon: FluentIcons.FA_check
|
icon: FluentIcons.AcceptMedium
|
||||||
iconSize: 15
|
iconSize: 15
|
||||||
visible: checked
|
visible: checked
|
||||||
color: FluTheme.isDark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
color: FluTheme.isDark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||||
|
|
|
@ -53,7 +53,8 @@ Item {
|
||||||
hoverColor: FluTheme.isDark ? Qt.rgba(73/255,73/255,73/255,1) : Qt.rgba(245/255,245/255,245/255,1)
|
hoverColor: FluTheme.isDark ? Qt.rgba(73/255,73/255,73/255,1) : Qt.rgba(245/255,245/255,245/255,1)
|
||||||
normalColor: FluTheme.isDark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(254/255,254/255,254/255,1)
|
normalColor: FluTheme.isDark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(254/255,254/255,254/255,1)
|
||||||
hovered: root_mouse.containsMouse
|
hovered: root_mouse.containsMouse
|
||||||
icon: expand ? FluentIcons.FA_angle_up : FluentIcons.FA_angle_down
|
iconSize: 15
|
||||||
|
icon: expand ? FluentIcons.ChevronUp : FluentIcons.ChevronDown
|
||||||
onClicked: {
|
onClicked: {
|
||||||
expand = !expand
|
expand = !expand
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ Text {
|
||||||
property color iconColor: FluTheme.isDark ? "#FFFFFF" : "#000000"
|
property color iconColor: FluTheme.isDark ? "#FFFFFF" : "#000000"
|
||||||
|
|
||||||
id:text_icon
|
id:text_icon
|
||||||
font.family: "fontawesome"
|
font.family: "Segoe Fluent Icons"
|
||||||
font.pixelSize: iconSize
|
font.pixelSize: iconSize
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
|
@ -42,7 +42,7 @@ Rectangle {
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id:text_icon
|
id:text_icon
|
||||||
font.family: "fontawesome"
|
font.family: "Segoe Fluent Icons"
|
||||||
font.pixelSize: iconSize
|
font.pixelSize: iconSize
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
|
@ -192,11 +192,11 @@ FluObject {
|
||||||
FluIcon{
|
FluIcon{
|
||||||
icon:{
|
icon:{
|
||||||
switch(_super.type){
|
switch(_super.type){
|
||||||
case mcontrol.const_success: return FluentIcons.FA_check_circle;
|
case mcontrol.const_success: return FluentIcons.CompletedSolid;
|
||||||
case mcontrol.const_warning: return FluentIcons.FA_info_circle;
|
case mcontrol.const_warning: return FluentIcons.InfoSolid;
|
||||||
case mcontrol.const_info: return FluentIcons.FA_info_circle;
|
case mcontrol.const_info: return FluentIcons.InfoSolid;
|
||||||
case mcontrol.const_error: return FluentIcons.FA_times_circle;
|
case mcontrol.const_error: return FluentIcons.StatusErrorFull;
|
||||||
}
|
}FluentIcons.StatusErrorFull
|
||||||
return FluentIcons.FA_info_circle
|
return FluentIcons.FA_info_circle
|
||||||
}
|
}
|
||||||
iconSize:20
|
iconSize:20
|
||||||
|
|
|
@ -145,10 +145,11 @@ Item {
|
||||||
height:parent.height
|
height:parent.height
|
||||||
spacing: 0
|
spacing: 0
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
icon: FluentIcons.FA_arrow_left
|
icon: FluentIcons.ChromeBack
|
||||||
Layout.leftMargin: 5
|
Layout.leftMargin: 5
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
disabled: nav_swipe.depth === 1
|
disabled: nav_swipe.depth === 1
|
||||||
|
iconSize: 15
|
||||||
onClicked: {
|
onClicked: {
|
||||||
nav_swipe.pop()
|
nav_swipe.pop()
|
||||||
nav_list.stackIndex.pop()
|
nav_list.stackIndex.pop()
|
||||||
|
@ -159,8 +160,9 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
icon: FluentIcons.FA_navicon
|
icon: FluentIcons.GlobalNavButton
|
||||||
Layout.leftMargin: 5
|
Layout.leftMargin: 5
|
||||||
|
iconSize: 15
|
||||||
visible: displayMode === FluNavigationView.Minimal
|
visible: displayMode === FluNavigationView.Minimal
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -222,8 +222,9 @@ Item {
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
id:item_layout_expanded
|
id:item_layout_expanded
|
||||||
color:"#00000000"
|
color:"#00000000"
|
||||||
icon:item_layout.expanded?FluentIcons.FA_angle_down:FluentIcons.FA_angle_right
|
icon:item_layout.expanded?FluentIcons.ChevronDown:FluentIcons.ChevronRight
|
||||||
opacity: item_layout.hasChild
|
opacity: item_layout.hasChild
|
||||||
|
iconSize: 15
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if(!item_layout.hasChild){
|
if(!item_layout.hasChild){
|
||||||
item_layout_rect.onClickItem()
|
item_layout_rect.onClickItem()
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
<file>controls/FluDropDownButton.qml</file>
|
<file>controls/FluDropDownButton.qml</file>
|
||||||
<file>controls/FluTextBox.qml</file>
|
<file>controls/FluTextBox.qml</file>
|
||||||
<file>controls/FluTimePicker.qml</file>
|
<file>controls/FluTimePicker.qml</file>
|
||||||
<file>res/font/fontawesome-webfont.ttf</file>
|
|
||||||
<file>controls/FluAppBar.qml</file>
|
<file>controls/FluAppBar.qml</file>
|
||||||
<file>controls/FluRectangle.qml</file>
|
<file>controls/FluRectangle.qml</file>
|
||||||
<file>controls/FluWindow.qml</file>
|
<file>controls/FluWindow.qml</file>
|
||||||
|
@ -43,5 +42,6 @@
|
||||||
<file>controls/FluScrollablePage.qml</file>
|
<file>controls/FluScrollablePage.qml</file>
|
||||||
<file>controls/FluContentPage.qml</file>
|
<file>controls/FluContentPage.qml</file>
|
||||||
<file>controls/FluArea.qml</file>
|
<file>controls/FluArea.qml</file>
|
||||||
|
<file>res/font/Segoe_Fluent_Icons.ttf</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue