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