diff --git a/example/example_en_US.ts b/example/example_en_US.ts index 8d3c2fce..af16a652 100644 --- a/example/example_en_US.ts +++ b/example/example_en_US.ts @@ -87,29 +87,21 @@ InitializrHelper - - The name cannot be empty - - The creation path cannot be empty - - The path does not exist - - %1 folder already exists diff --git a/example/example_zh_CN.ts b/example/example_zh_CN.ts index 659077c2..ce01e5a8 100644 --- a/example/example_zh_CN.ts +++ b/example/example_zh_CN.ts @@ -87,29 +87,21 @@ InitializrHelper - - The name cannot be empty 名称不能为空 - - The creation path cannot be empty 创建路径不能为空 - - The path does not exist 路径不存在 - - %1 folder already exists %1 文件夹已经存在 diff --git a/example/src/singleton.h b/example/src/singleton.h index 9583c687..466ce43c 100644 --- a/example/src/singleton.h +++ b/example/src/singleton.h @@ -21,4 +21,4 @@ private: \ public: \ static Class* getInstance() { \ return Singleton::getInstance(); \ -} +} \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bb916ab9..0ed7b59a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,7 +13,7 @@ set(CMAKE_CXX_STANDARD 17) 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) add_definitions(-DFLUENTUI_BUILD_STATIC_LIB) diff --git a/src/FluApp.cpp b/src/FluApp.cpp index 13bf6df7..f2c3c3b4 100644 --- a/src/FluApp.cpp +++ b/src/FluApp.cpp @@ -8,6 +8,7 @@ #include #include #include +#include FluApp::FluApp(QObject *parent) : QObject{parent} { _useSystemAppBar = false; @@ -16,10 +17,10 @@ FluApp::FluApp(QObject *parent) : QObject{parent} { FluApp::~FluApp() = default; void FluApp::init(QObject *target, QLocale locale) { - _locale = locale; + _locale = std::move(locale); _engine = qmlEngine(target); _translator = new QTranslator(this); - qApp->installTranslator(_translator); + QGuiApplication::installTranslator(_translator); const QStringList uiLanguages = _locale.uiLanguages(); for (const QString &name: uiLanguages) { const QString baseName = "fluentui_" + QLocale(name).name(); diff --git a/src/FluCaptcha.cpp b/src/FluCaptcha.cpp index bc849009..6dc4e94c 100644 --- a/src/FluCaptcha.cpp +++ b/src/FluCaptcha.cpp @@ -11,6 +11,9 @@ int generaNumber(int number) { FluCaptcha::FluCaptcha(QQuickItem *parent) : QQuickPaintedItem(parent) { _ignoreCase = false; QFont fontStyle; +#ifdef Q_OS_WIN + fontStyle.setFamily("微软雅黑"); +#endif fontStyle.setPixelSize(28); fontStyle.setBold(true); font(fontStyle); diff --git a/src/FluColors.cpp b/src/FluColors.cpp index 3a38044b..10cbe472 100644 --- a/src/FluColors.cpp +++ b/src/FluColors.cpp @@ -109,7 +109,7 @@ FluColors::FluColors(QObject *parent) : QObject{parent} { _Green = green; } -[[maybe_unused]] FluAccentColor *FluColors::createAccentColor(QColor primaryColor) { +[[maybe_unused]] FluAccentColor *FluColors::createAccentColor(const QColor& primaryColor) { auto accentColor = new FluAccentColor(this); accentColor->normal(primaryColor); accentColor->dark(FluTools::getInstance()->withOpacity(primaryColor, 0.9)); diff --git a/src/FluColors.h b/src/FluColors.h index 32ee84c6..16452654 100644 --- a/src/FluColors.h +++ b/src/FluColors.h @@ -55,7 +55,7 @@ private: public: 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(); } }; diff --git a/src/Qt5/imports/FluentUI/Controls/FluSpinBox.qml b/src/Qt5/imports/FluentUI/Controls/FluSpinBox.qml index 299fb1ab..2f562e35 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluSpinBox.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluSpinBox.qml @@ -21,6 +21,7 @@ T.SpinBox { bottom: Math.min(control.from, control.to) top: Math.max(control.from, control.to) } + font: FluTextStyle.Body 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) diff --git a/src/Qt6/imports/FluentUI/Controls/FluSpinBox.qml b/src/Qt6/imports/FluentUI/Controls/FluSpinBox.qml index ea21bf97..7dcc6294 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluSpinBox.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluSpinBox.qml @@ -22,6 +22,7 @@ T.SpinBox { bottom: Math.min(control.from, control.to) top: Math.max(control.from, control.to) } + font: FluTextStyle.Body 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) diff --git a/src/singleton.h b/src/singleton.h index 9583c687..466ce43c 100644 --- a/src/singleton.h +++ b/src/singleton.h @@ -21,4 +21,4 @@ private: \ public: \ static Class* getInstance() { \ return Singleton::getInstance(); \ -} +} \