This commit is contained in:
朱子楚\zhuzi 2024-04-11 20:29:59 +08:00
parent 3997daaa11
commit 44acdbcf7f
11 changed files with 13 additions and 23 deletions

View File

@ -87,29 +87,21 @@
<context> <context>
<name>InitializrHelper</name> <name>InitializrHelper</name>
<message> <message>
<location filename="bin/Debug/source/helper/InitializrHelper.cpp" line="69"/>
<location filename="bin/Release/source/helper/InitializrHelper.cpp" line="69"/>
<location filename="src/helper/InitializrHelper.cpp" line="69"/> <location filename="src/helper/InitializrHelper.cpp" line="69"/>
<source>The name cannot be empty</source> <source>The name cannot be empty</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="bin/Debug/source/helper/InitializrHelper.cpp" line="73"/>
<location filename="bin/Release/source/helper/InitializrHelper.cpp" line="73"/>
<location filename="src/helper/InitializrHelper.cpp" line="73"/> <location filename="src/helper/InitializrHelper.cpp" line="73"/>
<source>The creation path cannot be empty</source> <source>The creation path cannot be empty</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="bin/Debug/source/helper/InitializrHelper.cpp" line="78"/>
<location filename="bin/Release/source/helper/InitializrHelper.cpp" line="78"/>
<location filename="src/helper/InitializrHelper.cpp" line="78"/> <location filename="src/helper/InitializrHelper.cpp" line="78"/>
<source>The path does not exist</source> <source>The path does not exist</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="bin/Debug/source/helper/InitializrHelper.cpp" line="84"/>
<location filename="bin/Release/source/helper/InitializrHelper.cpp" line="84"/>
<location filename="src/helper/InitializrHelper.cpp" line="84"/> <location filename="src/helper/InitializrHelper.cpp" line="84"/>
<source>%1 folder already exists</source> <source>%1 folder already exists</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

View File

@ -87,29 +87,21 @@
<context> <context>
<name>InitializrHelper</name> <name>InitializrHelper</name>
<message> <message>
<location filename="bin/Debug/source/helper/InitializrHelper.cpp" line="69"/>
<location filename="bin/Release/source/helper/InitializrHelper.cpp" line="69"/>
<location filename="src/helper/InitializrHelper.cpp" line="69"/> <location filename="src/helper/InitializrHelper.cpp" line="69"/>
<source>The name cannot be empty</source> <source>The name cannot be empty</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="bin/Debug/source/helper/InitializrHelper.cpp" line="73"/>
<location filename="bin/Release/source/helper/InitializrHelper.cpp" line="73"/>
<location filename="src/helper/InitializrHelper.cpp" line="73"/> <location filename="src/helper/InitializrHelper.cpp" line="73"/>
<source>The creation path cannot be empty</source> <source>The creation path cannot be empty</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="bin/Debug/source/helper/InitializrHelper.cpp" line="78"/>
<location filename="bin/Release/source/helper/InitializrHelper.cpp" line="78"/>
<location filename="src/helper/InitializrHelper.cpp" line="78"/> <location filename="src/helper/InitializrHelper.cpp" line="78"/>
<source>The path does not exist</source> <source>The path does not exist</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="bin/Debug/source/helper/InitializrHelper.cpp" line="84"/>
<location filename="bin/Release/source/helper/InitializrHelper.cpp" line="84"/>
<location filename="src/helper/InitializrHelper.cpp" line="84"/> <location filename="src/helper/InitializrHelper.cpp" line="84"/>
<source>%1 folder already exists</source> <source>%1 folder already exists</source>
<translation type="unfinished">%1 </translation> <translation type="unfinished">%1 </translation>

View File

@ -21,4 +21,4 @@ private: \
public: \ public: \
static Class* getInstance() { \ static Class* getInstance() { \
return Singleton<Class>::getInstance(); \ return Singleton<Class>::getInstance(); \
} } \

View File

@ -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,4,0) add_definitions(-DFLUENTUI_VERSION=1,7,5,0)
if (FLUENTUI_BUILD_STATIC_LIB) if (FLUENTUI_BUILD_STATIC_LIB)
add_definitions(-DFLUENTUI_BUILD_STATIC_LIB) add_definitions(-DFLUENTUI_BUILD_STATIC_LIB)

View File

@ -8,6 +8,7 @@
#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;
@ -16,10 +17,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 = locale; _locale = std::move(locale);
_engine = qmlEngine(target); _engine = qmlEngine(target);
_translator = new QTranslator(this); _translator = new QTranslator(this);
qApp->installTranslator(_translator); QGuiApplication::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();

View File

@ -11,6 +11,9 @@ 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);

View File

@ -109,7 +109,7 @@ FluColors::FluColors(QObject *parent) : QObject{parent} {
_Green = green; _Green = green;
} }
[[maybe_unused]] FluAccentColor *FluColors::createAccentColor(QColor primaryColor) { [[maybe_unused]] FluAccentColor *FluColors::createAccentColor(const QColor& primaryColor) {
auto accentColor = new FluAccentColor(this); auto accentColor = new FluAccentColor(this);
accentColor->normal(primaryColor); accentColor->normal(primaryColor);
accentColor->dark(FluTools::getInstance()->withOpacity(primaryColor, 0.9)); accentColor->dark(FluTools::getInstance()->withOpacity(primaryColor, 0.9));

View File

@ -55,7 +55,7 @@ private:
public: public:
SINGLETON(FluColors) SINGLETON(FluColors)
[[maybe_unused]] Q_INVOKABLE FluAccentColor *createAccentColor(QColor primaryColor); [[maybe_unused]] Q_INVOKABLE FluAccentColor *createAccentColor(const QColor& primaryColor);
static FluColors *create(QQmlEngine *, QJSEngine *) { return getInstance(); } static FluColors *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
}; };

View File

@ -21,6 +21,7 @@ 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)

View File

@ -22,6 +22,7 @@ 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)

View File

@ -21,4 +21,4 @@ private: \
public: \ public: \
static Class* getInstance() { \ static Class* getInstance() { \
return Singleton<Class>::getInstance(); \ return Singleton<Class>::getInstance(); \
} } \