update
parent
09fa471a10
commit
09dd381bbc
|
@ -24,7 +24,7 @@ FluScrollablePage{
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
source: "qrc:/example/res/image/banner_3.jpg"
|
source: "qrc:/example/res/image/banner_3.jpg"
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
sourceSize: Qt.size(width,height)
|
sourceSize: Qt.size(2*width,2*height)
|
||||||
}
|
}
|
||||||
FluAcrylic {
|
FluAcrylic {
|
||||||
sourceItem:image
|
sourceItem:image
|
||||||
|
|
|
@ -121,7 +121,7 @@ FluScrollablePage{
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
source: "qrc:/example/res/image/banner_1.jpg"
|
source: "qrc:/example/res/image/banner_1.jpg"
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
sourceSize: Qt.size(width,height)
|
sourceSize: Qt.size(2*width,2*height)
|
||||||
}
|
}
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QQuickWindow>
|
#include <QQuickWindow>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
#include <FluentUI/FluentUI.h>
|
||||||
#include "lang/Lang.h"
|
#include "lang/Lang.h"
|
||||||
#include "AppInfo.h"
|
#include "AppInfo.h"
|
||||||
#include "tool/IPC.h"
|
#include "tool/IPC.h"
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
//将样式设置为Basic,不然会导致组件显示异常
|
//将样式设置为Basic,不然会导致组件显示异常
|
||||||
|
FluentUI::init();
|
||||||
qputenv("QT_QUICK_CONTROLS_STYLE","Basic");
|
qputenv("QT_QUICK_CONTROLS_STYLE","Basic");
|
||||||
//6.4及以下监听系统深色模式变化
|
//6.4及以下监听系统深色模式变化
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
|
@ -44,6 +44,8 @@ foreach(filepath IN LISTS qml_files resource_files)
|
||||||
set_source_files_properties(${filepath} PROPERTIES QT_RESOURCE_ALIAS ${filename})
|
set_source_files_properties(${filepath} PROPERTIES QT_RESOURCE_ALIAS ${filename})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
set_source_files_properties(FluentUI.h PROPERTIES QT_RESOURCE_ALIAS "../../include/FluentUI/FluentUI.h")
|
||||||
|
|
||||||
#添加qml模块
|
#添加qml模块
|
||||||
qt_add_library(fluentuiplugin SHARED)
|
qt_add_library(fluentuiplugin SHARED)
|
||||||
qt_add_qml_module(fluentuiplugin
|
qt_add_qml_module(fluentuiplugin
|
||||||
|
@ -54,7 +56,7 @@ qt_add_qml_module(fluentuiplugin
|
||||||
URI "FluentUI"
|
URI "FluentUI"
|
||||||
SOURCES ${sources_files} fluentui.rc
|
SOURCES ${sources_files} fluentui.rc
|
||||||
QML_FILES ${qml_files}
|
QML_FILES ${qml_files}
|
||||||
RESOURCES ${resource_files}
|
RESOURCES ${resource_files} FluentUI.h
|
||||||
#支持designer
|
#支持designer
|
||||||
DESIGNER_SUPPORTED
|
DESIGNER_SUPPORTED
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
#include "FluTheme.h"
|
|
||||||
#include "FluTools.h"
|
|
||||||
#include "FluColors.h"
|
|
||||||
#include "FluRegister.h"
|
#include "FluRegister.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#include "FluTheme.h"
|
#include "FluTheme.h"
|
||||||
|
|
||||||
#include "Def.h"
|
#include "Def.h"
|
||||||
|
#include "FluColors.h"
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
#include "FluApp.h"
|
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
|
||||||
FluTheme* FluTheme::m_instance = nullptr;
|
FluTheme* FluTheme::m_instance = nullptr;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#include "FluentUI.h"
|
||||||
|
|
||||||
|
void FluentUI::init(){
|
||||||
|
qDebug()<<"FluentUI init";
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
#ifndef FLUENTUI_H
|
||||||
|
#define FLUENTUI_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
class Q_DECL_EXPORT FluentUI
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
static void init();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // FLUENTUI_H
|
Loading…
Reference in New Issue