mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-12-01 07:22:21 +08:00
Compare commits
No commits in common. "44acdbcf7f861e1747875365659e71df5e83279a" and "531f659e591402c4b390d0b445744a44368758b3" have entirely different histories.
44acdbcf7f
...
531f659e59
@ -171,5 +171,10 @@ if (CMAKE_BUILD_TYPE MATCHES "Release")
|
|||||||
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_sources(Script-DeployRelease
|
||||||
|
PRIVATE
|
||||||
|
src/component/OpenGLItem.h src/component/OpenGLItem.cpp
|
||||||
|
)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -127,6 +127,7 @@
|
|||||||
<file>qml/global/ItemsOriginal.qml</file>
|
<file>qml/global/ItemsOriginal.qml</file>
|
||||||
<file>qml/global/qmldir</file>
|
<file>qml/global/qmldir</file>
|
||||||
<file>qml/page/T_Acrylic.qml</file>
|
<file>qml/page/T_Acrylic.qml</file>
|
||||||
|
<file>qml/page/T_Awesome.qml</file>
|
||||||
<file>qml/page/T_Badge.qml</file>
|
<file>qml/page/T_Badge.qml</file>
|
||||||
<file>qml/page/T_BreadcrumbBar.qml</file>
|
<file>qml/page/T_BreadcrumbBar.qml</file>
|
||||||
<file>qml/page/T_Buttons.qml</file>
|
<file>qml/page/T_Buttons.qml</file>
|
||||||
@ -209,7 +210,6 @@
|
|||||||
<file>res/image/bg_scenic.jpg</file>
|
<file>res/image/bg_scenic.jpg</file>
|
||||||
<file>qml/window/FluentInitializrWindow.qml</file>
|
<file>qml/window/FluentInitializrWindow.qml</file>
|
||||||
<file>qml/page/T_OpenGL.qml</file>
|
<file>qml/page/T_OpenGL.qml</file>
|
||||||
<file>qml/page/T_Icons.qml</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/"/>
|
<qresource prefix="/"/>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -425,7 +425,7 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/global/ItemsOriginal.qml" line="367"/>
|
<location filename="qml/global/ItemsOriginal.qml" line="367"/>
|
||||||
<source>Icons</source>
|
<source>Awesome</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -774,6 +774,29 @@ Updated content:
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</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>
|
<context>
|
||||||
<name>T_Badge</name>
|
<name>T_Badge</name>
|
||||||
<message>
|
<message>
|
||||||
@ -1363,29 +1386,6 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>T_Icons</name>
|
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="9"/>
|
|
||||||
<source>Icons</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="13"/>
|
|
||||||
<source>Please enter a keyword</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="20"/>
|
|
||||||
<source>Search</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="60"/>
|
|
||||||
<source>You Copied </source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>T_Image</name>
|
<name>T_Image</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -425,7 +425,7 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/global/ItemsOriginal.qml" line="367"/>
|
<location filename="qml/global/ItemsOriginal.qml" line="367"/>
|
||||||
<source>Icons</source>
|
<source>Awesome</source>
|
||||||
<translation type="unfinished">图标</translation>
|
<translation type="unfinished">图标</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -781,20 +781,24 @@ Updated content:
|
|||||||
<context>
|
<context>
|
||||||
<name>T_Awesome</name>
|
<name>T_Awesome</name>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_Awesome.qml" line="9"/>
|
||||||
<source>Awesome</source>
|
<source>Awesome</source>
|
||||||
<translation type="obsolete">图标</translation>
|
<translation type="unfinished">图标</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_Awesome.qml" line="13"/>
|
||||||
<source>Please enter a keyword</source>
|
<source>Please enter a keyword</source>
|
||||||
<translation type="obsolete">请输入关键字</translation>
|
<translation type="unfinished">请输入关键字</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_Awesome.qml" line="20"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="obsolete">搜索</translation>
|
<translation type="unfinished">搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_Awesome.qml" line="55"/>
|
||||||
<source>You Copied </source>
|
<source>You Copied </source>
|
||||||
<translation type="obsolete">您复制</translation>
|
<translation type="unfinished">您复制</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -1413,29 +1417,6 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||||||
<translation type="unfinished">FluentUI 脚手架是一个快速创建项目工具,可帮助您创建和自定义具有各种选项的 Fluent UI 项目</translation>
|
<translation type="unfinished">FluentUI 脚手架是一个快速创建项目工具,可帮助您创建和自定义具有各种选项的 Fluent UI 项目</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>T_Icons</name>
|
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="9"/>
|
|
||||||
<source>Icons</source>
|
|
||||||
<translation type="unfinished">图标</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="13"/>
|
|
||||||
<source>Please enter a keyword</source>
|
|
||||||
<translation type="unfinished">请输入关键字</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="20"/>
|
|
||||||
<source>Search</source>
|
|
||||||
<translation type="unfinished">搜索</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="60"/>
|
|
||||||
<source>You Copied </source>
|
|
||||||
<translation type="unfinished">您复制</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>T_Image</name>
|
<name>T_Image</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -364,9 +364,9 @@ FluObject{
|
|||||||
onTap: { navigationView.push(url) }
|
onTap: { navigationView.push(url) }
|
||||||
}
|
}
|
||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title: qsTr("Icons")
|
title: qsTr("Awesome")
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
url: "qrc:/example/qml/page/T_Icons.qml"
|
url: "qrc:/example/qml/page/T_Awesome.qml"
|
||||||
onTap: { navigationView.push(url) }
|
onTap: { navigationView.push(url) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,13 +6,13 @@ import FluentUI 1.0
|
|||||||
|
|
||||||
FluContentPage {
|
FluContentPage {
|
||||||
|
|
||||||
title: qsTr("Icons")
|
title: qsTr("Awesome")
|
||||||
|
|
||||||
FluTextBox{
|
FluTextBox{
|
||||||
id: text_box
|
id:text_box
|
||||||
placeholderText: qsTr("Please enter a keyword")
|
placeholderText: qsTr("Please enter a keyword")
|
||||||
anchors{
|
anchors{
|
||||||
top: parent.top
|
top:parent.top
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,45 +28,43 @@ FluContentPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
GridView{
|
GridView{
|
||||||
id: grid_view
|
id:grid_view
|
||||||
cellWidth: 110
|
cellWidth: 80
|
||||||
cellHeight: 110
|
cellHeight: 80
|
||||||
clip: true
|
clip: true
|
||||||
boundsBehavior: GridView.StopAtBounds
|
boundsBehavior: GridView.StopAtBounds
|
||||||
model:FluTheme.awesomeList()
|
model:FluTheme.awesomeList()
|
||||||
ScrollBar.vertical: FluScrollBar {}
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
anchors{
|
anchors{
|
||||||
topMargin: 10
|
topMargin: 10
|
||||||
top: text_box.bottom
|
top:text_box.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width: 100
|
width: 68
|
||||||
height: 100
|
height: 80
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
id:item_icon
|
id:item_icon
|
||||||
iconSource: modelData.icon
|
iconSource:modelData.icon
|
||||||
iconSize: 30
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
padding: 0
|
|
||||||
verticalPadding: 0
|
|
||||||
horizontalPadding: 0
|
|
||||||
bottomPadding: 30
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var text ="FluentIcons."+modelData.name;
|
var text ="FluentIcons."+modelData.name;
|
||||||
FluTools.clipText(text)
|
FluTools.clipText(text)
|
||||||
showSuccess(qsTr("You Copied ")+text)
|
showSuccess(qsTr("You Copied ")+text)
|
||||||
}
|
}
|
||||||
FluText{
|
}
|
||||||
width: parent.width
|
FluText {
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
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
|
wrapMode: Text.WrapAnywhere
|
||||||
text: modelData.name
|
text: modelData.name
|
||||||
anchors.top: parent.top
|
horizontalAlignment: Text.AlignHCenter
|
||||||
anchors.topMargin: 60
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,5 +14,5 @@ private:
|
|||||||
public:
|
public:
|
||||||
SINGLETON(AppInfo)
|
SINGLETON(AppInfo)
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE void testCrash();
|
Q_INVOKABLE [[maybe_unused]] void testCrash();
|
||||||
};
|
};
|
||||||
|
@ -21,4 +21,4 @@ private: \
|
|||||||
public: \
|
public: \
|
||||||
static Class* getInstance() { \
|
static Class* getInstance() { \
|
||||||
return Singleton<Class>::getInstance(); \
|
return Singleton<Class>::getInstance(); \
|
||||||
} \
|
}
|
||||||
|
@ -13,7 +13,7 @@ set(CMAKE_CXX_STANDARD 17)
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
#设置版本号
|
#设置版本号
|
||||||
add_definitions(-DFLUENTUI_VERSION=1,7,5,0)
|
add_definitions(-DFLUENTUI_VERSION=1,7,4,0)
|
||||||
|
|
||||||
if (FLUENTUI_BUILD_STATIC_LIB)
|
if (FLUENTUI_BUILD_STATIC_LIB)
|
||||||
add_definitions(-DFLUENTUI_BUILD_STATIC_LIB)
|
add_definitions(-DFLUENTUI_BUILD_STATIC_LIB)
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
FluApp::FluApp(QObject *parent) : QObject{parent} {
|
FluApp::FluApp(QObject *parent) : QObject{parent} {
|
||||||
_useSystemAppBar = false;
|
_useSystemAppBar = false;
|
||||||
@ -17,10 +16,10 @@ FluApp::FluApp(QObject *parent) : QObject{parent} {
|
|||||||
FluApp::~FluApp() = default;
|
FluApp::~FluApp() = default;
|
||||||
|
|
||||||
void FluApp::init(QObject *target, QLocale locale) {
|
void FluApp::init(QObject *target, QLocale locale) {
|
||||||
_locale = std::move(locale);
|
_locale = locale;
|
||||||
_engine = qmlEngine(target);
|
_engine = qmlEngine(target);
|
||||||
_translator = new QTranslator(this);
|
_translator = new QTranslator(this);
|
||||||
QGuiApplication::installTranslator(_translator);
|
qApp->installTranslator(_translator);
|
||||||
const QStringList uiLanguages = _locale.uiLanguages();
|
const QStringList uiLanguages = _locale.uiLanguages();
|
||||||
for (const QString &name: uiLanguages) {
|
for (const QString &name: uiLanguages) {
|
||||||
const QString baseName = "fluentui_" + QLocale(name).name();
|
const QString baseName = "fluentui_" + QLocale(name).name();
|
||||||
|
@ -11,9 +11,6 @@ int generaNumber(int number) {
|
|||||||
FluCaptcha::FluCaptcha(QQuickItem *parent) : QQuickPaintedItem(parent) {
|
FluCaptcha::FluCaptcha(QQuickItem *parent) : QQuickPaintedItem(parent) {
|
||||||
_ignoreCase = false;
|
_ignoreCase = false;
|
||||||
QFont fontStyle;
|
QFont fontStyle;
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
fontStyle.setFamily("微软雅黑");
|
|
||||||
#endif
|
|
||||||
fontStyle.setPixelSize(28);
|
fontStyle.setPixelSize(28);
|
||||||
fontStyle.setBold(true);
|
fontStyle.setBold(true);
|
||||||
font(fontStyle);
|
font(fontStyle);
|
||||||
|
@ -22,7 +22,7 @@ public:
|
|||||||
|
|
||||||
Q_INVOKABLE void refresh();
|
Q_INVOKABLE void refresh();
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE bool verify(const QString &code);
|
Q_INVOKABLE [[maybe_unused]] bool verify(const QString &code);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString _code;
|
QString _code;
|
||||||
|
@ -109,14 +109,14 @@ FluColors::FluColors(QObject *parent) : QObject{parent} {
|
|||||||
_Green = green;
|
_Green = green;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[maybe_unused]] FluAccentColor *FluColors::createAccentColor(const QColor& primaryColor) {
|
[[maybe_unused]] FluAccentColor *FluColors::createAccentColor(QColor primaryColor) {
|
||||||
auto accentColor = new FluAccentColor(this);
|
auto accentColor = new FluAccentColor(this);
|
||||||
accentColor->normal(primaryColor);
|
accentColor->darkest(FluTools::getInstance()->withOpacity(primaryColor, 0.7));
|
||||||
|
accentColor->darker(FluTools::getInstance()->withOpacity(primaryColor, 0.8));
|
||||||
accentColor->dark(FluTools::getInstance()->withOpacity(primaryColor, 0.9));
|
accentColor->dark(FluTools::getInstance()->withOpacity(primaryColor, 0.9));
|
||||||
|
accentColor->normal(primaryColor);
|
||||||
accentColor->light(FluTools::getInstance()->withOpacity(primaryColor, 0.9));
|
accentColor->light(FluTools::getInstance()->withOpacity(primaryColor, 0.9));
|
||||||
accentColor->darker(FluTools::getInstance()->withOpacity(accentColor->dark(), 0.8));
|
accentColor->lighter(FluTools::getInstance()->withOpacity(primaryColor, 0.8));
|
||||||
accentColor->lighter(FluTools::getInstance()->withOpacity(accentColor->light(), 0.8));
|
accentColor->lightest(FluTools::getInstance()->withOpacity(primaryColor, 0.7));
|
||||||
accentColor->darkest(FluTools::getInstance()->withOpacity(accentColor->darker(), 0.7));
|
|
||||||
accentColor->lightest(FluTools::getInstance()->withOpacity(accentColor->lighter(), 0.7));
|
|
||||||
return accentColor;
|
return accentColor;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
SINGLETON(FluColors)
|
SINGLETON(FluColors)
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE FluAccentColor *createAccentColor(const QColor& primaryColor);
|
Q_INVOKABLE [[maybe_unused]] FluAccentColor *createAccentColor(QColor primaryColor);
|
||||||
|
|
||||||
static FluColors *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
static FluColors *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
||||||
};
|
};
|
@ -33,17 +33,17 @@ public:
|
|||||||
|
|
||||||
[[maybe_unused]] bool nativeEventFilter(const QByteArray &eventType, void *message, QT_NATIVE_EVENT_RESULT_TYPE *result) override;
|
[[maybe_unused]] bool nativeEventFilter(const QByteArray &eventType, void *message, QT_NATIVE_EVENT_RESULT_TYPE *result) override;
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE void showFullScreen();
|
Q_INVOKABLE [[maybe_unused]] void showFullScreen();
|
||||||
|
|
||||||
Q_INVOKABLE void showMaximized();
|
Q_INVOKABLE void showMaximized();
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE void showMinimized();
|
Q_INVOKABLE [[maybe_unused]] void showMinimized();
|
||||||
|
|
||||||
Q_INVOKABLE void showNormal();
|
Q_INVOKABLE void showNormal();
|
||||||
|
|
||||||
Q_INVOKABLE void setHitTestVisible(QQuickItem *);
|
Q_INVOKABLE void setHitTestVisible(QQuickItem *);
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE void onDestruction();
|
Q_INVOKABLE [[maybe_unused]] void onDestruction();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||||
|
@ -19,15 +19,15 @@ public:
|
|||||||
|
|
||||||
bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override;
|
bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override;
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE QVariant getRow(int rowIndex);
|
Q_INVOKABLE [[maybe_unused]] QVariant getRow(int rowIndex);
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE void setRow(int rowIndex, const QVariant &val);
|
Q_INVOKABLE [[maybe_unused]] void setRow(int rowIndex, const QVariant &val);
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE void removeRow(int rowIndex, int rows);
|
Q_INVOKABLE [[maybe_unused]] void removeRow(int rowIndex, int rows);
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE void setComparator(const QJSValue &comparator);
|
Q_INVOKABLE [[maybe_unused]] [[maybe_unused]] void setComparator(const QJSValue &comparator);
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE void setFilter(const QJSValue &filter);
|
Q_INVOKABLE [[maybe_unused]] void setFilter(const QJSValue &filter);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QJSValue _filter;
|
QJSValue _filter;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
#include "Def.h"
|
#include "Def.h"
|
||||||
#include "FluentIconDef.h"
|
|
||||||
#include "FluColors.h"
|
#include "FluColors.h"
|
||||||
|
|
||||||
bool systemDark() {
|
bool systemDark() {
|
||||||
@ -55,7 +54,7 @@ bool FluTheme::eventFilter(QObject *, QEvent *event) {
|
|||||||
|
|
||||||
[[maybe_unused]] QJsonArray FluTheme::awesomeList(const QString &keyword) {
|
[[maybe_unused]] QJsonArray FluTheme::awesomeList(const QString &keyword) {
|
||||||
QJsonArray arr;
|
QJsonArray arr;
|
||||||
QMetaEnum enumType = Fluent_Icons::staticMetaObject.enumerator(Fluent_Icons::staticMetaObject.indexOfEnumerator("Fluent_IconType"));
|
QMetaEnum enumType = Fluent_Awesome::staticMetaObject.enumerator(Fluent_Awesome::staticMetaObject.indexOfEnumerator("Fluent_AwesomeType"));
|
||||||
for (int i = 0; i <= enumType.keyCount() - 1; ++i) {
|
for (int i = 0; i <= enumType.keyCount() - 1; ++i) {
|
||||||
QString name = enumType.key(i);
|
QString name = enumType.key(i);
|
||||||
int icon = enumType.value(i);
|
int icon = enumType.value(i);
|
||||||
|
@ -45,7 +45,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
SINGLETON(FluTheme)
|
SINGLETON(FluTheme)
|
||||||
|
|
||||||
[[maybe_unused]] Q_INVOKABLE static QJsonArray awesomeList(const QString &keyword = "");
|
Q_INVOKABLE [[maybe_unused]] static QJsonArray awesomeList(const QString &keyword = "");
|
||||||
|
|
||||||
Q_SIGNAL void darkChanged();
|
Q_SIGNAL void darkChanged();
|
||||||
|
|
||||||
|
1417
src/FluentIconDef.h
1417
src/FluentIconDef.h
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include "Def.h"
|
#include "Def.h"
|
||||||
#include "FluentIconDef.h"
|
|
||||||
#include "FluApp.h"
|
#include "FluApp.h"
|
||||||
#include "FluColors.h"
|
#include "FluColors.h"
|
||||||
#include "FluTheme.h"
|
#include "FluTheme.h"
|
||||||
@ -132,7 +131,7 @@ void FluentUI::registerTypes(const char *uri) const {
|
|||||||
qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRouter.qml"), uri, major, minor, "FluRouter");
|
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");
|
qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluEventBus.qml"), uri, major, minor, "FluEventBus");
|
||||||
|
|
||||||
qmlRegisterUncreatableMetaObject(Fluent_Icons::staticMetaObject, uri, major, minor, "FluentIcons", "Access to enums & flags only");
|
qmlRegisterUncreatableMetaObject(Fluent_Awesome::staticMetaObject, uri, major, minor, "FluentIcons", "Access to enums & flags only");
|
||||||
qmlRegisterUncreatableMetaObject(FluThemeType::staticMetaObject, uri, major, minor, "FluThemeType", "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(FluPageType::staticMetaObject, uri, major, minor, "FluPageType", "Access to enums & flags only");
|
||||||
qmlRegisterUncreatableMetaObject(FluWindowType::staticMetaObject, uri, major, minor, "FluWindowType", "Access to enums & flags only");
|
qmlRegisterUncreatableMetaObject(FluWindowType::staticMetaObject, uri, major, minor, "FluWindowType", "Access to enums & flags only");
|
||||||
|
@ -7,15 +7,13 @@ Text {
|
|||||||
property int iconSize: 20
|
property int iconSize: 20
|
||||||
property color iconColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
property color iconColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
||||||
id:control
|
id:control
|
||||||
font.family: font_loader.name
|
font.family: "Segoe Fluent Icons"
|
||||||
font.pixelSize: iconSize
|
font.pixelSize: iconSize
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
color: iconColor
|
color: iconColor
|
||||||
text: (String.fromCharCode(iconSource).toString(16))
|
text: (String.fromCharCode(iconSource).toString(16))
|
||||||
opacity: iconSource>0
|
|
||||||
FontLoader{
|
FontLoader{
|
||||||
id: font_loader
|
source: "../Font/Segoe_Fluent_Icons.ttf"
|
||||||
source: "qrc:/qt/qml/FluentUI/Font/FluentIcons.ttf"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ T.SpinBox {
|
|||||||
bottom: Math.min(control.from, control.to)
|
bottom: Math.min(control.from, control.to)
|
||||||
top: Math.max(control.from, control.to)
|
top: Math.max(control.from, control.to)
|
||||||
}
|
}
|
||||||
font: FluTextStyle.Body
|
|
||||||
|
|
||||||
contentItem: TextInput {
|
contentItem: TextInput {
|
||||||
property color normalColor: FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1)
|
property color normalColor: FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<qresource prefix="/qt/qml">
|
<qresource prefix="/qt/qml">
|
||||||
<file>FluentUI/JS/Chart.js</file>
|
<file>FluentUI/JS/Chart.js</file>
|
||||||
<file>FluentUI/Image/noise.png</file>
|
<file>FluentUI/Image/noise.png</file>
|
||||||
|
<file>FluentUI/Font/Segoe_Fluent_Icons.ttf</file>
|
||||||
<file>FluentUI/Controls/FluAcrylic.qml</file>
|
<file>FluentUI/Controls/FluAcrylic.qml</file>
|
||||||
<file>FluentUI/Controls/FluAppBar.qml</file>
|
<file>FluentUI/Controls/FluAppBar.qml</file>
|
||||||
<file>FluentUI/Controls/FluAutoSuggestBox.qml</file>
|
<file>FluentUI/Controls/FluAutoSuggestBox.qml</file>
|
||||||
@ -109,6 +110,5 @@
|
|||||||
<file>FluentUI/Controls/FluSheet.qml</file>
|
<file>FluentUI/Controls/FluSheet.qml</file>
|
||||||
<file>FluentUI/Controls/FluGroupBox.qml</file>
|
<file>FluentUI/Controls/FluGroupBox.qml</file>
|
||||||
<file>FluentUI/Controls/FluControlBackground.qml</file>
|
<file>FluentUI/Controls/FluControlBackground.qml</file>
|
||||||
<file>FluentUI/Font/FluentIcons.ttf</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -7,15 +7,13 @@ Text {
|
|||||||
property int iconSize: 20
|
property int iconSize: 20
|
||||||
property color iconColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
property color iconColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
||||||
id:control
|
id:control
|
||||||
font.family: font_loader.name
|
font.family: "Segoe Fluent Icons"
|
||||||
font.pixelSize: iconSize
|
font.pixelSize: iconSize
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
color: iconColor
|
color: iconColor
|
||||||
text: (String.fromCharCode(iconSource).toString(16))
|
text: (String.fromCharCode(iconSource).toString(16))
|
||||||
opacity: iconSource>0
|
|
||||||
FontLoader{
|
FontLoader{
|
||||||
id: font_loader
|
source: "../Font/Segoe_Fluent_Icons.ttf"
|
||||||
source: "qrc:/qt/qml/FluentUI/Font/FluentIcons.ttf"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ T.SpinBox {
|
|||||||
bottom: Math.min(control.from, control.to)
|
bottom: Math.min(control.from, control.to)
|
||||||
top: Math.max(control.from, control.to)
|
top: Math.max(control.from, control.to)
|
||||||
}
|
}
|
||||||
font: FluTextStyle.Body
|
|
||||||
|
|
||||||
contentItem: TextInput {
|
contentItem: TextInput {
|
||||||
property color normalColor: FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1)
|
property color normalColor: FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1)
|
||||||
|
@ -21,4 +21,4 @@ private: \
|
|||||||
public: \
|
public: \
|
||||||
static Class* getInstance() { \
|
static Class* getInstance() { \
|
||||||
return Singleton<Class>::getInstance(); \
|
return Singleton<Class>::getInstance(); \
|
||||||
} \
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user