mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-27 13:49:08 +08:00
Merge branch 'main' of https://github.com/zhuzichu520/FluentUI
This commit is contained in:
commit
a3b4c6cb28
@ -2262,20 +2262,21 @@ Some contents...</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Theme.qml" line="123"/>
|
<location filename="qml/page/T_Theme.qml" line="123"/>
|
||||||
<source>Open Blur Window</source>
|
<source>Open Blur Window</source>
|
||||||
|
<oldsource>Rounded Window</oldsource>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Theme.qml" line="136"/>
|
<location filename="qml/page/T_Theme.qml" line="158"/>
|
||||||
<source>window tintOpacity</source>
|
<source>window tintOpacity</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Theme.qml" line="153"/>
|
<location filename="qml/page/T_Theme.qml" line="175"/>
|
||||||
<source>window blurRadius</source>
|
<source>window blurRadius</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Theme.qml" line="169"/>
|
<location filename="qml/page/T_Theme.qml" line="135"/>
|
||||||
<source>window effect</source>
|
<source>window effect</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2444,22 +2444,23 @@ Some contents...</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Theme.qml" line="123"/>
|
<location filename="qml/page/T_Theme.qml" line="123"/>
|
||||||
<source>Open Blur Window</source>
|
<source>Open Blur Window</source>
|
||||||
<translation type="unfinished"></translation>
|
<oldsource>Rounded Window</oldsource>
|
||||||
|
<translation>亚克力背景</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Theme.qml" line="136"/>
|
<location filename="qml/page/T_Theme.qml" line="158"/>
|
||||||
<source>window tintOpacity</source>
|
<source>window tintOpacity</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>背景透明度</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Theme.qml" line="153"/>
|
<location filename="qml/page/T_Theme.qml" line="175"/>
|
||||||
<source>window blurRadius</source>
|
<source>window blurRadius</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>背景模糊度</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Theme.qml" line="169"/>
|
<location filename="qml/page/T_Theme.qml" line="135"/>
|
||||||
<source>window effect</source>
|
<source>window effect</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>窗口效果</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Theme.qml" line="178"/>
|
<location filename="qml/page/T_Theme.qml" line="178"/>
|
||||||
|
@ -131,6 +131,28 @@ FluScrollablePage{
|
|||||||
FluTheme.blurBehindWindowEnabled = !FluTheme.blurBehindWindowEnabled
|
FluTheme.blurBehindWindowEnabled = !FluTheme.blurBehindWindowEnabled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FluText{
|
||||||
|
text: qsTr("window effect")
|
||||||
|
Layout.topMargin: 20
|
||||||
|
}
|
||||||
|
Row{
|
||||||
|
spacing: 10
|
||||||
|
Repeater{
|
||||||
|
model: window.availableEffects
|
||||||
|
delegate: FluRadioButton{
|
||||||
|
checked: window.effect === modelData
|
||||||
|
text: qsTr(`${modelData}`)
|
||||||
|
clickListener:function(){
|
||||||
|
window.effect = modelData
|
||||||
|
if(window.effective){
|
||||||
|
FluTheme.blurBehindWindowEnabled = false
|
||||||
|
toggle_blur.checked = Qt.binding( function() {return FluTheme.blurBehindWindowEnabled})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
FluText{
|
FluText{
|
||||||
visible: FluTheme.blurBehindWindowEnabled || window.effect === "dwm-blur"
|
visible: FluTheme.blurBehindWindowEnabled || window.effect === "dwm-blur"
|
||||||
text: qsTr("window tintOpacity")
|
text: qsTr("window tintOpacity")
|
||||||
@ -165,28 +187,6 @@ FluScrollablePage{
|
|||||||
value = window.blurRadius
|
value = window.blurRadius
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluText{
|
|
||||||
text: qsTr("window effect")
|
|
||||||
Layout.topMargin: 20
|
|
||||||
}
|
|
||||||
Row{
|
|
||||||
spacing: 10
|
|
||||||
Repeater{
|
|
||||||
model: window.availableEffects
|
|
||||||
delegate: FluRadioButton{
|
|
||||||
checked: window.effect === modelData
|
|
||||||
text: qsTr(`${modelData}`)
|
|
||||||
clickListener:function(){
|
|
||||||
window.effect = modelData
|
|
||||||
if(window.effective){
|
|
||||||
FluTheme.blurBehindWindowEnabled = false
|
|
||||||
toggle_blur.checked = Qt.binding( function() {return FluTheme.blurBehindWindowEnabled})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CodeExpander{
|
CodeExpander{
|
||||||
|
@ -227,7 +227,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
|
|||||||
if ((${QT_VERSION_MAJOR} LESS_EQUAL 6) AND (CMAKE_BUILD_TYPE MATCHES "Release"))
|
if ((${QT_VERSION_MAJOR} LESS_EQUAL 6) AND (CMAKE_BUILD_TYPE MATCHES "Release"))
|
||||||
find_program(QML_PLUGIN_DUMP NAMES qmlplugindump)
|
find_program(QML_PLUGIN_DUMP NAMES qmlplugindump)
|
||||||
add_custom_target(Script-Generate-QmlTypes
|
add_custom_target(Script-Generate-QmlTypes
|
||||||
COMMAND ${QML_PLUGIN_DUMP} -nonrelocatable FluentUI 1.0 ${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes
|
COMMAND ${QML_PLUGIN_DUMP} -nonrelocatable -noinstantiate FluentUI 1.0 ${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes
|
||||||
COMMENT "Generate qmltypes........."
|
COMMENT "Generate qmltypes........."
|
||||||
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes
|
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "FluFrameless.h"
|
#include "FluFrameless.h"
|
||||||
#include "FluTheme.h"
|
|
||||||
|
|
||||||
#include <QQuickWindow>
|
#include <QQuickWindow>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
@ -76,7 +75,7 @@ static inline bool isWin10Only() {
|
|||||||
|
|
||||||
static inline bool isWin7Only() {
|
static inline bool isWin7Only() {
|
||||||
RTL_OSVERSIONINFOW rovi = GetRealOSVersion();
|
RTL_OSVERSIONINFOW rovi = GetRealOSVersion();
|
||||||
return rovi.dwMajorVersion = 7;
|
return rovi.dwMajorVersion == 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QByteArray qtNativeEventType() {
|
static inline QByteArray qtNativeEventType() {
|
||||||
@ -84,14 +83,57 @@ static inline QByteArray qtNativeEventType() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool isCompositionEnabled() {
|
static inline bool initializeFunctionPointers() {
|
||||||
HMODULE module = ::LoadLibraryW(L"dwmapi.dll");
|
HMODULE module = LoadLibraryW(L"dwmapi.dll");
|
||||||
if (module) {
|
if (module) {
|
||||||
BOOL composition_enabled = false;
|
if (!pDwmSetWindowAttribute) {
|
||||||
pDwmIsCompositionEnabled = reinterpret_cast<DwmIsCompositionEnabledFunc>(::GetProcAddress(module, "DwmIsCompositionEnabled"));
|
pDwmSetWindowAttribute = reinterpret_cast<DwmSetWindowAttributeFunc>(
|
||||||
if (pDwmIsCompositionEnabled) {
|
GetProcAddress(module, "DwmSetWindowAttribute"));
|
||||||
pDwmIsCompositionEnabled(&composition_enabled);
|
if (!pDwmSetWindowAttribute) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!pDwmExtendFrameIntoClientArea) {
|
||||||
|
pDwmExtendFrameIntoClientArea = reinterpret_cast<DwmExtendFrameIntoClientAreaFunc>(
|
||||||
|
GetProcAddress(module, "DwmExtendFrameIntoClientArea"));
|
||||||
|
if (!pDwmExtendFrameIntoClientArea) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!pDwmIsCompositionEnabled) {
|
||||||
|
pDwmIsCompositionEnabled = reinterpret_cast<DwmIsCompositionEnabledFunc>(
|
||||||
|
::GetProcAddress(module, "DwmIsCompositionEnabled"));
|
||||||
|
if (!pDwmIsCompositionEnabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!pDwmEnableBlurBehindWindow) {
|
||||||
|
pDwmEnableBlurBehindWindow =
|
||||||
|
reinterpret_cast<DwmEnableBlurBehindWindowFunc>(
|
||||||
|
GetProcAddress(module, "DwmEnableBlurBehindWindow"));
|
||||||
|
if (!pDwmEnableBlurBehindWindow) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!pSetWindowCompositionAttribute) {
|
||||||
|
HMODULE user32 = LoadLibraryW(L"user32.dll");
|
||||||
|
if (!user32) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
pSetWindowCompositionAttribute = reinterpret_cast<SetWindowCompositionAttributeFunc>(
|
||||||
|
GetProcAddress(user32, "SetWindowCompositionAttribute"));
|
||||||
|
if (!pSetWindowCompositionAttribute) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool isCompositionEnabled() {
|
||||||
|
if(initializeFunctionPointers()){
|
||||||
|
BOOL composition_enabled = false;
|
||||||
|
pDwmIsCompositionEnabled(&composition_enabled);
|
||||||
return composition_enabled;
|
return composition_enabled;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -99,41 +141,25 @@ static inline bool isCompositionEnabled() {
|
|||||||
|
|
||||||
static inline void setShadow(HWND hwnd) {
|
static inline void setShadow(HWND hwnd) {
|
||||||
const MARGINS shadow = {1, 0, 0, 0};
|
const MARGINS shadow = {1, 0, 0, 0};
|
||||||
HMODULE module = LoadLibraryW(L"dwmapi.dll");
|
if (initializeFunctionPointers()) {
|
||||||
if (module) {
|
|
||||||
pDwmExtendFrameIntoClientArea = reinterpret_cast<DwmExtendFrameIntoClientAreaFunc>(GetProcAddress(module, "DwmExtendFrameIntoClientArea"));
|
|
||||||
if (pDwmExtendFrameIntoClientArea) {
|
|
||||||
pDwmExtendFrameIntoClientArea(hwnd, &shadow);
|
pDwmExtendFrameIntoClientArea(hwnd, &shadow);
|
||||||
}
|
}
|
||||||
|
if(isWin7Only()){
|
||||||
|
SetClassLong(hwnd, GCL_STYLE, GetClassLong(hwnd, GCL_STYLE) | CS_DROPSHADOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool setWindowDarkMode(HWND hwnd, const BOOL enable) {
|
static inline bool setWindowDarkMode(HWND hwnd, const BOOL enable) {
|
||||||
if (!pDwmSetWindowAttribute) {
|
if (!initializeFunctionPointers()) {
|
||||||
HMODULE module = LoadLibraryW(L"dwmapi.dll");
|
|
||||||
if (module) {
|
|
||||||
pDwmSetWindowAttribute = reinterpret_cast<DwmSetWindowAttributeFunc>(
|
|
||||||
GetProcAddress(module, "DwmSetWindowAttribute"));
|
|
||||||
}
|
|
||||||
if (!pDwmSetWindowAttribute) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return bool(pDwmSetWindowAttribute(hwnd, 20, &enable, sizeof(BOOL)));
|
return bool(pDwmSetWindowAttribute(hwnd, 20, &enable, sizeof(BOOL)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool setWindowEffect(HWND hwnd, const QString &key, const bool &enable) {
|
static inline bool setWindowEffect(HWND hwnd, const QString &key, const bool &enable) {
|
||||||
static constexpr const MARGINS extendedMargins = {-1, -1, -1, -1};
|
static constexpr const MARGINS extendedMargins = {-1, -1, -1, -1};
|
||||||
HMODULE module = LoadLibraryW(L"dwmapi.dll");
|
|
||||||
if (module) {
|
|
||||||
pDwmExtendFrameIntoClientArea = reinterpret_cast<DwmExtendFrameIntoClientAreaFunc>(
|
|
||||||
GetProcAddress(module, "DwmExtendFrameIntoClientArea"));
|
|
||||||
if (!pDwmExtendFrameIntoClientArea) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (key == QStringLiteral("mica")) {
|
if (key == QStringLiteral("mica")) {
|
||||||
if (!isWin11OrGreater()) {
|
if (!isWin11OrGreater() || !initializeFunctionPointers()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (enable) {
|
if (enable) {
|
||||||
@ -154,13 +180,11 @@ static inline bool setWindowEffect(HWND hwnd, const QString &key, const bool &en
|
|||||||
pDwmSetWindowAttribute(hwnd, 1029, &enable, sizeof(enable));
|
pDwmSetWindowAttribute(hwnd, 1029, &enable, sizeof(enable));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BOOL isDark = FluTheme::getInstance()->dark();
|
|
||||||
setWindowDarkMode(hwnd, isDark);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == QStringLiteral("mica-alt")) {
|
if (key == QStringLiteral("mica-alt")) {
|
||||||
if (!isWin1122H2OrGreater()) {
|
if (!isWin1122H2OrGreater() || !initializeFunctionPointers()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (enable) {
|
if (enable) {
|
||||||
@ -171,43 +195,28 @@ static inline bool setWindowEffect(HWND hwnd, const QString &key, const bool &en
|
|||||||
const DWORD backdropType = _DWMSBT_AUTO;
|
const DWORD backdropType = _DWMSBT_AUTO;
|
||||||
pDwmSetWindowAttribute(hwnd, 38, &backdropType, sizeof(backdropType));
|
pDwmSetWindowAttribute(hwnd, 38, &backdropType, sizeof(backdropType));
|
||||||
}
|
}
|
||||||
BOOL isDark = FluTheme::getInstance()->dark();
|
|
||||||
setWindowDarkMode(hwnd, isDark);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == QStringLiteral("acrylic")) {
|
if (key == QStringLiteral("acrylic")) {
|
||||||
if (!isWin11OrGreater()) {
|
if (!isWin11OrGreater() || !initializeFunctionPointers()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (enable) {
|
if (enable) {
|
||||||
MARGINS margins{-1, -1, -1, -1};
|
pDwmExtendFrameIntoClientArea(hwnd, &extendedMargins);
|
||||||
pDwmExtendFrameIntoClientArea(hwnd, &margins);
|
|
||||||
DWORD system_backdrop_type = _DWMSBT_TRANSIENTWINDOW;
|
DWORD system_backdrop_type = _DWMSBT_TRANSIENTWINDOW;
|
||||||
pDwmSetWindowAttribute(hwnd, 38, &system_backdrop_type, sizeof(DWORD));
|
pDwmSetWindowAttribute(hwnd, 38, &system_backdrop_type, sizeof(DWORD));
|
||||||
} else {
|
} else {
|
||||||
const DWORD backdropType = _DWMSBT_AUTO;
|
const DWORD backdropType = _DWMSBT_AUTO;
|
||||||
pDwmSetWindowAttribute(hwnd, 38, &backdropType, sizeof(backdropType));
|
pDwmSetWindowAttribute(hwnd, 38, &backdropType, sizeof(backdropType));
|
||||||
}
|
}
|
||||||
BOOL isDark = FluTheme::getInstance()->dark();
|
|
||||||
setWindowDarkMode(hwnd, isDark);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == QStringLiteral("dwm-blur")) {
|
if (key == QStringLiteral("dwm-blur")) {
|
||||||
if (isWin7Only() && !isCompositionEnabled()) {
|
if ((isWin7Only() && !isCompositionEnabled()) || !initializeFunctionPointers()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
BOOL isDark = FluTheme::getInstance()->dark();
|
|
||||||
setWindowDarkMode(hwnd, isDark && enable);
|
|
||||||
if (isWin8OrGreater() && !pSetWindowCompositionAttribute) {
|
|
||||||
HMODULE module = LoadLibraryW(L"user32.dll");
|
|
||||||
pSetWindowCompositionAttribute = reinterpret_cast<SetWindowCompositionAttributeFunc>(
|
|
||||||
GetProcAddress(module, "SetWindowCompositionAttribute"));
|
|
||||||
if (!pSetWindowCompositionAttribute) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (enable) {
|
if (enable) {
|
||||||
if (isWin8OrGreater()) {
|
if (isWin8OrGreater()) {
|
||||||
ACCENT_POLICY policy{};
|
ACCENT_POLICY policy{};
|
||||||
@ -222,15 +231,6 @@ static inline bool setWindowEffect(HWND hwnd, const QString &key, const bool &en
|
|||||||
DWM_BLURBEHIND bb{};
|
DWM_BLURBEHIND bb{};
|
||||||
bb.fEnable = TRUE;
|
bb.fEnable = TRUE;
|
||||||
bb.dwFlags = DWM_BB_ENABLE;
|
bb.dwFlags = DWM_BB_ENABLE;
|
||||||
if (!pDwmEnableBlurBehindWindow) {
|
|
||||||
HMODULE module = LoadLibraryW(L"user32.dll");
|
|
||||||
pDwmEnableBlurBehindWindow =
|
|
||||||
reinterpret_cast<DwmEnableBlurBehindWindowFunc>(
|
|
||||||
GetProcAddress(module, "DwmEnableBlurBehindWindowFunc"));
|
|
||||||
if (!pDwmEnableBlurBehindWindow) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pDwmEnableBlurBehindWindow(hwnd, &bb);
|
pDwmEnableBlurBehindWindow(hwnd, &bb);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -247,21 +247,11 @@ static inline bool setWindowEffect(HWND hwnd, const QString &key, const bool &en
|
|||||||
DWM_BLURBEHIND bb{};
|
DWM_BLURBEHIND bb{};
|
||||||
bb.fEnable = FALSE;
|
bb.fEnable = FALSE;
|
||||||
bb.dwFlags = DWM_BB_ENABLE;
|
bb.dwFlags = DWM_BB_ENABLE;
|
||||||
if (!pDwmEnableBlurBehindWindow) {
|
|
||||||
HMODULE module = LoadLibraryW(L"user32.dll");
|
|
||||||
pDwmEnableBlurBehindWindow =
|
|
||||||
reinterpret_cast<DwmEnableBlurBehindWindowFunc>(
|
|
||||||
GetProcAddress(module, "DwmEnableBlurBehindWindowFunc"));
|
|
||||||
if (!pDwmEnableBlurBehindWindow) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pDwmEnableBlurBehindWindow(hwnd, &bb);
|
pDwmEnableBlurBehindWindow(hwnd, &bb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,6 +278,7 @@ FluFrameless::FluFrameless(QQuickItem *parent) : QQuickItem{parent} {
|
|||||||
_topmost = false;
|
_topmost = false;
|
||||||
_disabled = false;
|
_disabled = false;
|
||||||
_effect = "normal";
|
_effect = "normal";
|
||||||
|
_effective = false;
|
||||||
_isWindows11OrGreater = FluTools::getInstance()->isWindows11OrGreater();
|
_isWindows11OrGreater = FluTools::getInstance()->isWindows11OrGreater();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,6 +289,47 @@ FluFrameless::~FluFrameless() = default;
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FluFrameless::componentComplete() {
|
void FluFrameless::componentComplete() {
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||||
|
if (isWin11OrGreater()) {
|
||||||
|
availableEffects({"mica", "mica-alt", "acrylic", "dwm-blur", "normal"});
|
||||||
|
} else {
|
||||||
|
availableEffects({"dwm-blur","normal"});
|
||||||
|
}
|
||||||
|
if (!_effect.isEmpty() && _useSystemEffect) {
|
||||||
|
effective(setWindowEffect(hwnd, _effect, true));
|
||||||
|
if (effective()) {
|
||||||
|
_currentEffect = effect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
connect(this, &FluFrameless::effectChanged, this, [hwnd, this] {
|
||||||
|
if (effect() == _currentEffect) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (effective()) {
|
||||||
|
setWindowEffect(hwnd, _currentEffect, false);
|
||||||
|
}
|
||||||
|
effective(setWindowEffect(hwnd, effect(), true));
|
||||||
|
if (effective()) {
|
||||||
|
_currentEffect = effect();
|
||||||
|
_useSystemEffect = true;
|
||||||
|
} else {
|
||||||
|
_effect = "normal";
|
||||||
|
_currentEffect = "normal";
|
||||||
|
_useSystemEffect = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
connect(this, &FluFrameless::useSystemEffectChanged, this, [this] {
|
||||||
|
if (!_useSystemEffect) {
|
||||||
|
effect("normal");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
connect(this, &FluFrameless::isDarkModeChanged, this, [hwnd, this] {
|
||||||
|
if (effective() && !_currentEffect.isEmpty() && _currentEffect != "normal") {
|
||||||
|
setWindowDarkMode(hwnd, _isDarkMode);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
#endif
|
||||||
if (_disabled) {
|
if (_disabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -323,7 +355,9 @@ void FluFrameless::componentComplete() {
|
|||||||
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3))
|
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3))
|
||||||
qWarning()<<"Qt's own frameless bug, currently only exist in 6.5.3, please use other versions";
|
qWarning()<<"Qt's own frameless bug, currently only exist in 6.5.3, please use other versions";
|
||||||
#endif
|
#endif
|
||||||
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
if(!hwnd){
|
||||||
|
hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||||
|
}
|
||||||
DWORD style = ::GetWindowLongPtr(hwnd, GWL_STYLE);
|
DWORD style = ::GetWindowLongPtr(hwnd, GWL_STYLE);
|
||||||
# if (QT_VERSION == QT_VERSION_CHECK(6, 7, 2))
|
# if (QT_VERSION == QT_VERSION_CHECK(6, 7, 2))
|
||||||
style &= ~(WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU);
|
style &= ~(WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU);
|
||||||
@ -346,42 +380,6 @@ void FluFrameless::componentComplete() {
|
|||||||
if (!window()->property("_hideShadow").toBool()) {
|
if (!window()->property("_hideShadow").toBool()) {
|
||||||
setShadow(hwnd);
|
setShadow(hwnd);
|
||||||
}
|
}
|
||||||
if (isWin11OrGreater()) {
|
|
||||||
availableEffects({"mica", "mica-alt", "acrylic", "dwm-blur", "normal"});
|
|
||||||
} else if (isWin7Only()) {
|
|
||||||
availableEffects({"dwm-blur","normal"});
|
|
||||||
}
|
|
||||||
if (!_effect.isEmpty()) {
|
|
||||||
effective(setWindowEffect(hwnd, _effect, true));
|
|
||||||
if (effective()) {
|
|
||||||
_currentEffect = effect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
connect(this, &FluFrameless::effectChanged, this, [hwnd, this] {
|
|
||||||
if (effect() == _currentEffect) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (effective()) {
|
|
||||||
setWindowEffect(hwnd, _currentEffect, false);
|
|
||||||
}
|
|
||||||
effective(setWindowEffect(hwnd, effect(), true));
|
|
||||||
if (effective()) {
|
|
||||||
_currentEffect = effect();
|
|
||||||
} else {
|
|
||||||
_effect = "normal";
|
|
||||||
_currentEffect = "normal";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
connect(FluTheme::getInstance(), &FluTheme::blurBehindWindowEnabledChanged, this, [this] {
|
|
||||||
if (FluTheme::getInstance()->blurBehindWindowEnabled()) {
|
|
||||||
effect("normal");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
connect(FluTheme::getInstance(), &FluTheme::darkChanged, this, [hwnd, this] {
|
|
||||||
if (effective() && !_currentEffect.isEmpty() && _currentEffect != "normal") {
|
|
||||||
setWindowDarkMode(hwnd, FluTheme::getInstance()->dark());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
#endif
|
#endif
|
||||||
auto appBarHeight = _appbar->height();
|
auto appBarHeight = _appbar->height();
|
||||||
h = qRound(h + appBarHeight);
|
h = qRound(h + appBarHeight);
|
||||||
@ -491,10 +489,10 @@ void FluFrameless::componentComplete() {
|
|||||||
*result = FALSE;
|
*result = FALSE;
|
||||||
return false;
|
return false;
|
||||||
} else if (uMsg == WM_NCACTIVATE) {
|
} else if (uMsg == WM_NCACTIVATE) {
|
||||||
|
*result = TRUE;
|
||||||
if (effective() || (!effect().isEmpty() && _currentEffect!="normal")) {
|
if (effective() || (!effect().isEmpty() && _currentEffect!="normal")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*result = TRUE;
|
|
||||||
return true;
|
return true;
|
||||||
} else if (_isWindows11OrGreater && (uMsg == WM_NCLBUTTONDBLCLK || uMsg == WM_NCLBUTTONDOWN)) {
|
} else if (_isWindows11OrGreater && (uMsg == WM_NCLBUTTONDBLCLK || uMsg == WM_NCLBUTTONDOWN)) {
|
||||||
if (_hitMaximizeButton()) {
|
if (_hitMaximizeButton()) {
|
||||||
|
@ -117,6 +117,8 @@ class FluFrameless : public QQuickItem, QAbstractNativeEventFilter {
|
|||||||
Q_PROPERTY_AUTO(QString, effect)
|
Q_PROPERTY_AUTO(QString, effect)
|
||||||
Q_PROPERTY_READONLY_AUTO(bool, effective)
|
Q_PROPERTY_READONLY_AUTO(bool, effective)
|
||||||
Q_PROPERTY_READONLY_AUTO(QStringList, availableEffects)
|
Q_PROPERTY_READONLY_AUTO(QStringList, availableEffects)
|
||||||
|
Q_PROPERTY_AUTO(bool, isDarkMode)
|
||||||
|
Q_PROPERTY_AUTO(bool, useSystemEffect)
|
||||||
QML_NAMED_ELEMENT(FluFrameless)
|
QML_NAMED_ELEMENT(FluFrameless)
|
||||||
public:
|
public:
|
||||||
explicit FluFrameless(QQuickItem *parent = nullptr);
|
explicit FluFrameless(QQuickItem *parent = nullptr);
|
||||||
@ -162,6 +164,7 @@ private:
|
|||||||
|
|
||||||
void _setMaximizeHovered(bool val);
|
void _setMaximizeHovered(bool val);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
quint64 _current = 0;
|
quint64 _current = 0;
|
||||||
int _edges = 0;
|
int _edges = 0;
|
||||||
|
@ -162,31 +162,41 @@ void FluentUI::registerTypes(const char *uri) const {
|
|||||||
qmlRegisterUncreatableMetaObject(FluTimelineType::staticMetaObject, uri, major, minor, "FluTimelineType", "Access to enums & flags only");
|
qmlRegisterUncreatableMetaObject(FluTimelineType::staticMetaObject, uri, major, minor, "FluTimelineType", "Access to enums & flags only");
|
||||||
qmlRegisterUncreatableMetaObject(FluSheetType::staticMetaObject, uri, major, minor, "FluSheetType", "Access to enums & flags only");
|
qmlRegisterUncreatableMetaObject(FluSheetType::staticMetaObject, uri, major, minor, "FluSheetType", "Access to enums & flags only");
|
||||||
|
|
||||||
qmlRegisterSingletonType(uri, major, minor, "FluApp", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
qmlRegisterSingletonType<FluApp>(uri, major, minor, "FluApp",
|
||||||
Q_UNUSED(engine)
|
[](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* {
|
||||||
return scriptEngine->newQObject(FluApp::getInstance());
|
Q_UNUSED(scriptEngine)
|
||||||
|
QObject *instance = FluApp::getInstance();
|
||||||
|
engine->setObjectOwnership(instance, QQmlEngine::CppOwnership);
|
||||||
|
return instance;
|
||||||
});
|
});
|
||||||
qmlRegisterSingletonType(uri, major, minor, "FluColors", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
qmlRegisterSingletonType<FluColors>(uri, major, minor, "FluColors",
|
||||||
Q_UNUSED(engine)
|
[](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* {
|
||||||
return scriptEngine->newQObject(FluColors::getInstance());
|
Q_UNUSED(scriptEngine)
|
||||||
|
QObject *instance = FluColors::getInstance();
|
||||||
|
engine->setObjectOwnership(instance, QQmlEngine::CppOwnership);
|
||||||
|
return instance;
|
||||||
});
|
});
|
||||||
qmlRegisterSingletonType(uri, major, minor, "FluTheme", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
qmlRegisterSingletonType<FluTheme>(uri, major, minor, "FluTheme",
|
||||||
Q_UNUSED(engine)
|
[](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* {
|
||||||
return scriptEngine->newQObject(FluTheme::getInstance());
|
Q_UNUSED(scriptEngine)
|
||||||
|
QObject *instance = FluTheme::getInstance();
|
||||||
|
engine->setObjectOwnership(instance, QQmlEngine::CppOwnership);
|
||||||
|
return instance;
|
||||||
});
|
});
|
||||||
qmlRegisterSingletonType(uri, major, minor, "FluTools", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
qmlRegisterSingletonType<FluTools>(uri, major, minor, "FluTools",
|
||||||
Q_UNUSED(engine)
|
[](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* {
|
||||||
return scriptEngine->newQObject(FluTools::getInstance());
|
Q_UNUSED(scriptEngine)
|
||||||
|
QObject *instance = FluTools::getInstance();
|
||||||
|
engine->setObjectOwnership(instance, QQmlEngine::CppOwnership);
|
||||||
|
return instance;
|
||||||
});
|
});
|
||||||
qmlRegisterSingletonType(uri, major, minor, "FluTextStyle", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
qmlRegisterSingletonType<FluTextStyle>(uri, major, minor, "FluTextStyle",
|
||||||
Q_UNUSED(engine)
|
[](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* {
|
||||||
return scriptEngine->newQObject(FluTextStyle::getInstance());
|
Q_UNUSED(scriptEngine)
|
||||||
|
QObject *instance = FluTextStyle::getInstance();
|
||||||
|
engine->setObjectOwnership(instance, QQmlEngine::CppOwnership);
|
||||||
|
return instance;
|
||||||
});
|
});
|
||||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluApp", FluApp::getInstance());
|
|
||||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluColors", FluColors::getInstance());
|
|
||||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluTheme", FluTheme::getInstance());
|
|
||||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluTools", FluTools::getInstance());
|
|
||||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluTextStyle", FluTextStyle::getInstance());
|
|
||||||
qmlRegisterModule(uri, major, minor);
|
qmlRegisterModule(uri, major, minor);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ Window {
|
|||||||
property int blurRadius: 60
|
property int blurRadius: 60
|
||||||
property alias effect: frameless.effect
|
property alias effect: frameless.effect
|
||||||
readonly property alias effective: frameless.effective
|
readonly property alias effective: frameless.effective
|
||||||
readonly property var availableEffects: frameless.availableEffects
|
readonly property alias availableEffects: frameless.availableEffects
|
||||||
property Item appBar: FluAppBar {
|
property Item appBar: FluAppBar {
|
||||||
title: window.title
|
title: window.title
|
||||||
height: 30
|
height: 30
|
||||||
@ -114,6 +114,8 @@ Window {
|
|||||||
fixSize: window.fixSize
|
fixSize: window.fixSize
|
||||||
topmost: window.stayTop
|
topmost: window.stayTop
|
||||||
disabled: FluApp.useSystemAppBar
|
disabled: FluApp.useSystemAppBar
|
||||||
|
isDarkMode: FluTheme.dark
|
||||||
|
useSystemEffect: !FluTheme.blurBehindWindowEnabled
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
frameless.setHitTestVisible(appBar.layoutMacosButtons)
|
frameless.setHitTestVisible(appBar.layoutMacosButtons)
|
||||||
frameless.setHitTestVisible(appBar.layoutStandardbuttons)
|
frameless.setHitTestVisible(appBar.layoutStandardbuttons)
|
||||||
|
@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
|
|||||||
// It is used for QML tooling purposes only.
|
// It is used for QML tooling purposes only.
|
||||||
//
|
//
|
||||||
// This file was auto-generated by:
|
// This file was auto-generated by:
|
||||||
// 'qmlplugindump -nonrelocatable FluentUI 1.0 D:/QtProjects/build-FluentUI-Desktop_Qt_5_15_2_MSVC2019_64bit-Release/src'
|
// 'qmlplugindump -nonrelocatable -noinstantiate FluentUI 1.0 F:/FluentUI/build/Desktop_Qt_5_15_2_MSVC2019_32bit-Release/src'
|
||||||
|
|
||||||
Module {
|
Module {
|
||||||
dependencies: ["QtQuick 2.0"]
|
dependencies: ["QtQuick 2.0"]
|
||||||
@ -151,8 +151,10 @@ Module {
|
|||||||
Property { name: "disabled"; type: "bool" }
|
Property { name: "disabled"; type: "bool" }
|
||||||
Property { name: "fixSize"; type: "bool" }
|
Property { name: "fixSize"; type: "bool" }
|
||||||
Property { name: "effect"; type: "string" }
|
Property { name: "effect"; type: "string" }
|
||||||
Property { name: "effective"; type: "bool" }
|
Property { name: "effective"; type: "bool"; isReadonly: true }
|
||||||
Property {name: "availableEffects"; type: "QVariant"}
|
Property { name: "availableEffects"; type: "QStringList"; isReadonly: true }
|
||||||
|
Property { name: "isDarkMode"; type: "bool" }
|
||||||
|
Property { name: "useSystemEffect"; type: "bool" }
|
||||||
Method { name: "showFullScreen" }
|
Method { name: "showFullScreen" }
|
||||||
Method { name: "showMaximized" }
|
Method { name: "showMaximized" }
|
||||||
Method { name: "showMinimized" }
|
Method { name: "showMinimized" }
|
||||||
@ -399,7 +401,6 @@ Module {
|
|||||||
Property { name: "nativeText"; type: "bool" }
|
Property { name: "nativeText"; type: "bool" }
|
||||||
Property { name: "animationEnabled"; type: "bool" }
|
Property { name: "animationEnabled"; type: "bool" }
|
||||||
Property { name: "blurBehindWindowEnabled"; type: "bool" }
|
Property { name: "blurBehindWindowEnabled"; type: "bool" }
|
||||||
Property { name: "micaBackgroundColor"; type: "QColor" }
|
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
name: "FluThemeType"
|
name: "FluThemeType"
|
||||||
@ -673,12 +674,12 @@ Module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
name: "Fluent_Icons"
|
name: "FluentIcons"
|
||||||
exports: ["FluentUI/FluentIcons 1.0"]
|
exports: ["FluentUI/FluentIcons 1.0"]
|
||||||
isCreatable: false
|
isCreatable: false
|
||||||
exportMetaObjectRevisions: [0]
|
exportMetaObjectRevisions: [0]
|
||||||
Enum {
|
Enum {
|
||||||
name: "Fluent_IconType"
|
name: "Type"
|
||||||
values: {
|
values: {
|
||||||
"GlobalNavButton": 59136,
|
"GlobalNavButton": 59136,
|
||||||
"Wifi": 59137,
|
"Wifi": 59137,
|
||||||
@ -2453,6 +2454,240 @@ Module {
|
|||||||
Method { name: "clear" }
|
Method { name: "clear" }
|
||||||
Method { name: "invalidate" }
|
Method { name: "invalidate" }
|
||||||
}
|
}
|
||||||
|
Component {
|
||||||
|
name: "QmlQCustomPlot::Axis"
|
||||||
|
prototype: "QObject"
|
||||||
|
exports: ["FluentUI/Axis 1.0"]
|
||||||
|
isCreatable: false
|
||||||
|
exportMetaObjectRevisions: [0]
|
||||||
|
Enum {
|
||||||
|
name: "TickerType"
|
||||||
|
values: {
|
||||||
|
"Fixed": 0,
|
||||||
|
"Log": 1,
|
||||||
|
"Pi": 2,
|
||||||
|
"Text": 3,
|
||||||
|
"DateTime": 4,
|
||||||
|
"Time": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Property { name: "visible"; type: "bool" }
|
||||||
|
Property { name: "label"; type: "string" }
|
||||||
|
Property { name: "upper"; type: "float" }
|
||||||
|
Property { name: "lower"; type: "float" }
|
||||||
|
Property { name: "grid"; type: "QmlQCustomPlot::Grid"; isReadonly: true; isPointer: true }
|
||||||
|
Property { name: "ticker"; type: "QmlQCustomPlot::Ticker"; isReadonly: true; isPointer: true }
|
||||||
|
Signal {
|
||||||
|
name: "visibleChanged"
|
||||||
|
Parameter { type: "bool" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "labelChanged"
|
||||||
|
Parameter { type: "string" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "upperChanged"
|
||||||
|
Parameter { type: "float" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "lowerChanged"
|
||||||
|
Parameter { type: "float" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "gridChanged"
|
||||||
|
Parameter { type: "QmlQCustomPlot::Grid"; isPointer: true }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "tickerChanged"
|
||||||
|
Parameter { type: "QmlQCustomPlot::Ticker"; isPointer: true }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "setTickerType"
|
||||||
|
Parameter { name: "type"; type: "TickerType" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "setRange"
|
||||||
|
Parameter { name: "position"; type: "float" }
|
||||||
|
Parameter { name: "size"; type: "float" }
|
||||||
|
Parameter { name: "align"; type: "Qt::AlignmentFlag" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "setRange"
|
||||||
|
Parameter { name: "lower"; type: "float" }
|
||||||
|
Parameter { name: "upper"; type: "float" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
name: "QmlQCustomPlot::BasePlot"
|
||||||
|
defaultProperty: "data"
|
||||||
|
prototype: "QQuickPaintedItem"
|
||||||
|
exports: ["FluentUI/BasePlot 1.0"]
|
||||||
|
exportMetaObjectRevisions: [0]
|
||||||
|
Property { name: "backgroundColor"; type: "QColor" }
|
||||||
|
Property { name: "xAxis"; type: "QmlQCustomPlot::Axis"; isReadonly: true; isPointer: true }
|
||||||
|
Property { name: "x1Axis"; type: "QmlQCustomPlot::Axis"; isReadonly: true; isPointer: true }
|
||||||
|
Property { name: "yAxis"; type: "QmlQCustomPlot::Axis"; isReadonly: true; isPointer: true }
|
||||||
|
Property { name: "y1Axis"; type: "QmlQCustomPlot::Axis"; isReadonly: true; isPointer: true }
|
||||||
|
Property { name: "graphs"; type: "QVariantMap"; isReadonly: true }
|
||||||
|
Signal {
|
||||||
|
name: "backgroundColorChanged"
|
||||||
|
Parameter { type: "QColor" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "xAxisChanged"
|
||||||
|
Parameter { type: "QmlQCustomPlot::Axis"; isPointer: true }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "x1AxisChanged"
|
||||||
|
Parameter { type: "QmlQCustomPlot::Axis"; isPointer: true }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "yAxisChanged"
|
||||||
|
Parameter { type: "QmlQCustomPlot::Axis"; isPointer: true }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "y1AxisChanged"
|
||||||
|
Parameter { type: "QmlQCustomPlot::Axis"; isPointer: true }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "addGraph"
|
||||||
|
Parameter { name: "key"; type: "string" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "removeGraph"
|
||||||
|
Parameter { name: "key"; type: "string" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "rescaleAxes"
|
||||||
|
Parameter { name: "onlyVisiblePlottables"; type: "bool" }
|
||||||
|
}
|
||||||
|
Method { name: "rescaleAxes" }
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
name: "QmlQCustomPlot::Grid"
|
||||||
|
prototype: "QObject"
|
||||||
|
exports: ["FluentUI/PlotGrid 1.0"]
|
||||||
|
isCreatable: false
|
||||||
|
exportMetaObjectRevisions: [0]
|
||||||
|
Enum {
|
||||||
|
name: "LineType"
|
||||||
|
values: {
|
||||||
|
"NoPen": 0,
|
||||||
|
"SolidLine": 1,
|
||||||
|
"DashLine": 2,
|
||||||
|
"DotLine": 3,
|
||||||
|
"DashDotLine": 4,
|
||||||
|
"DashDotDotLine": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Property { name: "visible"; type: "bool" }
|
||||||
|
Property { name: "subVisible"; type: "bool" }
|
||||||
|
Property { name: "lineWidth"; type: "int" }
|
||||||
|
Property { name: "lineColor"; type: "QColor" }
|
||||||
|
Property { name: "lineType"; type: "LineType" }
|
||||||
|
Property { name: "subLineWidth"; type: "int" }
|
||||||
|
Property { name: "subLineColor"; type: "QColor" }
|
||||||
|
Property { name: "subLineType"; type: "LineType" }
|
||||||
|
Signal {
|
||||||
|
name: "visibleChanged"
|
||||||
|
Parameter { type: "bool" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "subVisibleChanged"
|
||||||
|
Parameter { type: "bool" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "lineWidthChanged"
|
||||||
|
Parameter { type: "int" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "lineColorChanged"
|
||||||
|
Parameter { type: "QColor" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "lineTypeChanged"
|
||||||
|
Parameter { type: "LineType" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "subLineWidthChanged"
|
||||||
|
Parameter { type: "int" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "subLineColorChanged"
|
||||||
|
Parameter { type: "QColor" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "subLineTypeChanged"
|
||||||
|
Parameter { type: "LineType" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
name: "QmlQCustomPlot::Ticker"
|
||||||
|
prototype: "QObject"
|
||||||
|
exports: ["FluentUI/Ticker 1.0"]
|
||||||
|
isCreatable: false
|
||||||
|
exportMetaObjectRevisions: [0]
|
||||||
|
Property { name: "ticks"; type: "bool" }
|
||||||
|
Property { name: "subTicks"; type: "bool" }
|
||||||
|
Property { name: "tickCount"; type: "int" }
|
||||||
|
Property { name: "baseWidth"; type: "int" }
|
||||||
|
Property { name: "baseColor"; type: "QColor" }
|
||||||
|
Property { name: "tickColor"; type: "QColor" }
|
||||||
|
Property { name: "subTickColor"; type: "QColor" }
|
||||||
|
Signal {
|
||||||
|
name: "ticksChanged"
|
||||||
|
Parameter { type: "bool" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "subTicksChanged"
|
||||||
|
Parameter { type: "bool" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "tickCountChanged"
|
||||||
|
Parameter { type: "int" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "baseWidthChanged"
|
||||||
|
Parameter { type: "int" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "baseColorChanged"
|
||||||
|
Parameter { type: "QColor" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "tickColorChanged"
|
||||||
|
Parameter { type: "QColor" }
|
||||||
|
}
|
||||||
|
Signal {
|
||||||
|
name: "subTickColorChanged"
|
||||||
|
Parameter { type: "QColor" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
name: "QmlQCustomPlot::TimePlot"
|
||||||
|
defaultProperty: "data"
|
||||||
|
prototype: "QmlQCustomPlot::BasePlot"
|
||||||
|
exports: ["FluentUI/TimePlot 1.0"]
|
||||||
|
exportMetaObjectRevisions: [0]
|
||||||
|
Property { name: "plotTimeRangeInMilliseconds"; type: "int" }
|
||||||
|
Signal {
|
||||||
|
name: "plotTimeRangeInMillisecondsChanged"
|
||||||
|
Parameter { type: "int" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "setTimeFormat"
|
||||||
|
Parameter { name: "format"; type: "string" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "addCurrentTimeValue"
|
||||||
|
Parameter { name: "name"; type: "string" }
|
||||||
|
Parameter { name: "value"; type: "double" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "addCurrentTimeValues"
|
||||||
|
Parameter { name: "values"; type: "QVariantMap" }
|
||||||
|
}
|
||||||
|
}
|
||||||
Component {
|
Component {
|
||||||
prototype: "QQuickItem"
|
prototype: "QQuickItem"
|
||||||
name: "FluentUI/FluAcrylic 1.0"
|
name: "FluentUI/FluAcrylic 1.0"
|
||||||
@ -2511,37 +2746,37 @@ Module {
|
|||||||
Property { name: "darkClickListener"; type: "QVariant" }
|
Property { name: "darkClickListener"; type: "QVariant" }
|
||||||
Property {
|
Property {
|
||||||
name: "buttonStayTop"
|
name: "buttonStayTop"
|
||||||
type: "FluIconButton_QMLTYPE_18"
|
type: "FluIconButton_QMLTYPE_19"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
Property {
|
Property {
|
||||||
name: "buttonMinimize"
|
name: "buttonMinimize"
|
||||||
type: "FluIconButton_QMLTYPE_18"
|
type: "FluIconButton_QMLTYPE_19"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
Property {
|
Property {
|
||||||
name: "buttonMaximize"
|
name: "buttonMaximize"
|
||||||
type: "FluIconButton_QMLTYPE_18"
|
type: "FluIconButton_QMLTYPE_19"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
Property {
|
Property {
|
||||||
name: "buttonClose"
|
name: "buttonClose"
|
||||||
type: "FluIconButton_QMLTYPE_18"
|
type: "FluIconButton_QMLTYPE_19"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
Property {
|
Property {
|
||||||
name: "buttonDark"
|
name: "buttonDark"
|
||||||
type: "FluIconButton_QMLTYPE_18"
|
type: "FluIconButton_QMLTYPE_19"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
Property {
|
Property {
|
||||||
name: "layoutMacosButtons"
|
name: "layoutMacosButtons"
|
||||||
type: "FluLoader_QMLTYPE_16"
|
type: "FluLoader_QMLTYPE_11"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
@ -3234,15 +3469,15 @@ Module {
|
|||||||
defaultProperty: "data"
|
defaultProperty: "data"
|
||||||
Property { name: "logo"; type: "QUrl" }
|
Property { name: "logo"; type: "QUrl" }
|
||||||
Property { name: "title"; type: "string" }
|
Property { name: "title"; type: "string" }
|
||||||
Property { name: "items"; type: "FluObject_QMLTYPE_164"; isPointer: true }
|
Property { name: "items"; type: "FluObject_QMLTYPE_176"; isPointer: true }
|
||||||
Property { name: "footerItems"; type: "FluObject_QMLTYPE_164"; isPointer: true }
|
Property { name: "footerItems"; type: "FluObject_QMLTYPE_176"; isPointer: true }
|
||||||
Property { name: "displayMode"; type: "int" }
|
Property { name: "displayMode"; type: "int" }
|
||||||
Property { name: "autoSuggestBox"; type: "QQmlComponent"; isPointer: true }
|
Property { name: "autoSuggestBox"; type: "QQmlComponent"; isPointer: true }
|
||||||
Property { name: "actionItem"; type: "QQmlComponent"; isPointer: true }
|
Property { name: "actionItem"; type: "QQmlComponent"; isPointer: true }
|
||||||
Property { name: "topPadding"; type: "int" }
|
Property { name: "topPadding"; type: "int" }
|
||||||
Property { name: "pageMode"; type: "int" }
|
Property { name: "pageMode"; type: "int" }
|
||||||
Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_36"; isPointer: true }
|
Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_48"; isPointer: true }
|
||||||
Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_36"; isPointer: true }
|
Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_48"; isPointer: true }
|
||||||
Property { name: "navCompactWidth"; type: "int" }
|
Property { name: "navCompactWidth"; type: "int" }
|
||||||
Property { name: "navTopMargin"; type: "int" }
|
Property { name: "navTopMargin"; type: "int" }
|
||||||
Property { name: "cellHeight"; type: "int" }
|
Property { name: "cellHeight"; type: "int" }
|
||||||
@ -3250,13 +3485,13 @@ Module {
|
|||||||
Property { name: "hideNavAppBar"; type: "bool" }
|
Property { name: "hideNavAppBar"; type: "bool" }
|
||||||
Property {
|
Property {
|
||||||
name: "buttonMenu"
|
name: "buttonMenu"
|
||||||
type: "FluIconButton_QMLTYPE_18"
|
type: "FluIconButton_QMLTYPE_19"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
Property {
|
Property {
|
||||||
name: "buttonBack"
|
name: "buttonBack"
|
||||||
type: "FluIconButton_QMLTYPE_18"
|
type: "FluIconButton_QMLTYPE_19"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
@ -3624,7 +3859,7 @@ Module {
|
|||||||
Method {
|
Method {
|
||||||
name: "removeWindow"
|
name: "removeWindow"
|
||||||
type: "QVariant"
|
type: "QVariant"
|
||||||
Parameter { name: "window"; type: "QVariant" }
|
Parameter { name: "win"; type: "QVariant" }
|
||||||
}
|
}
|
||||||
Method {
|
Method {
|
||||||
name: "exit"
|
name: "exit"
|
||||||
@ -4142,6 +4377,9 @@ Module {
|
|||||||
Property { name: "fixSize"; type: "bool" }
|
Property { name: "fixSize"; type: "bool" }
|
||||||
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
|
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
|
||||||
Property { name: "fitsAppBarWindows"; type: "bool" }
|
Property { name: "fitsAppBarWindows"; type: "bool" }
|
||||||
|
Property { name: "tintOpacity"; type: "QVariant" }
|
||||||
|
Property { name: "blurRadius"; type: "int" }
|
||||||
|
Property { name: "availableEffects"; type: "QVariant"; isReadonly: true }
|
||||||
Property { name: "appBar"; type: "QQuickItem"; isPointer: true }
|
Property { name: "appBar"; type: "QQuickItem"; isPointer: true }
|
||||||
Property { name: "backgroundColor"; type: "QColor" }
|
Property { name: "backgroundColor"; type: "QColor" }
|
||||||
Property { name: "stayTop"; type: "bool" }
|
Property { name: "stayTop"; type: "bool" }
|
||||||
@ -4154,13 +4392,8 @@ Module {
|
|||||||
Property { name: "autoVisible"; type: "bool" }
|
Property { name: "autoVisible"; type: "bool" }
|
||||||
Property { name: "autoCenter"; type: "bool" }
|
Property { name: "autoCenter"; type: "bool" }
|
||||||
Property { name: "autoDestroy"; type: "bool" }
|
Property { name: "autoDestroy"; type: "bool" }
|
||||||
|
|
||||||
Property { name: "effect"; type: "string" }
|
|
||||||
Property { name: "effective"; type: "bool" }
|
|
||||||
Property { name: "blurRadius"; type: "int" }
|
|
||||||
Property { name: "tintOpacity"; type: "QVariant" }
|
|
||||||
|
|
||||||
Property { name: "useSystemAppBar"; type: "bool" }
|
Property { name: "useSystemAppBar"; type: "bool" }
|
||||||
|
Property { name: "__margins"; type: "int" }
|
||||||
Property { name: "resizeBorderColor"; type: "QColor" }
|
Property { name: "resizeBorderColor"; type: "QColor" }
|
||||||
Property { name: "resizeBorderWidth"; type: "int" }
|
Property { name: "resizeBorderWidth"; type: "int" }
|
||||||
Property { name: "closeListener"; type: "QVariant" }
|
Property { name: "closeListener"; type: "QVariant" }
|
||||||
@ -4168,6 +4401,8 @@ Module {
|
|||||||
Property { name: "_route"; type: "string" }
|
Property { name: "_route"; type: "string" }
|
||||||
Property { name: "_hideShadow"; type: "bool" }
|
Property { name: "_hideShadow"; type: "bool" }
|
||||||
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
|
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
|
||||||
|
Property { name: "effect"; type: "string" }
|
||||||
|
Property { name: "effective"; type: "bool"; isReadonly: true }
|
||||||
Signal {
|
Signal {
|
||||||
name: "initArgument"
|
name: "initArgument"
|
||||||
Parameter { name: "argument"; type: "QVariant" }
|
Parameter { name: "argument"; type: "QVariant" }
|
||||||
@ -4205,11 +4440,6 @@ Module {
|
|||||||
Method { name: "clearAllInfo"; type: "QVariant" }
|
Method { name: "clearAllInfo"; type: "QVariant" }
|
||||||
Method { name: "moveWindowToDesktopCenter"; type: "QVariant" }
|
Method { name: "moveWindowToDesktopCenter"; type: "QVariant" }
|
||||||
Method { name: "fixWindowSize"; type: "QVariant" }
|
Method { name: "fixWindowSize"; type: "QVariant" }
|
||||||
Method {
|
|
||||||
name: "registerForWindowResult"
|
|
||||||
type: "QVariant"
|
|
||||||
Parameter { name: "path"; type: "QVariant" }
|
|
||||||
}
|
|
||||||
Method {
|
Method {
|
||||||
name: "setResult"
|
name: "setResult"
|
||||||
type: "QVariant"
|
type: "QVariant"
|
||||||
@ -4229,6 +4459,8 @@ Module {
|
|||||||
type: "QVariant"
|
type: "QVariant"
|
||||||
Parameter { name: "val"; type: "QVariant" }
|
Parameter { name: "val"; type: "QVariant" }
|
||||||
}
|
}
|
||||||
|
Method { name: "deleteLater"; type: "QVariant" }
|
||||||
|
Method { name: "containerItem"; type: "QVariant" }
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
prototype: "QQuickWindowQmlImpl"
|
prototype: "QQuickWindowQmlImpl"
|
||||||
@ -4251,6 +4483,9 @@ Module {
|
|||||||
Property { name: "fixSize"; type: "bool" }
|
Property { name: "fixSize"; type: "bool" }
|
||||||
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
|
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
|
||||||
Property { name: "fitsAppBarWindows"; type: "bool" }
|
Property { name: "fitsAppBarWindows"; type: "bool" }
|
||||||
|
Property { name: "tintOpacity"; type: "QVariant" }
|
||||||
|
Property { name: "blurRadius"; type: "int" }
|
||||||
|
Property { name: "availableEffects"; type: "QVariant"; isReadonly: true }
|
||||||
Property { name: "appBar"; type: "QQuickItem"; isPointer: true }
|
Property { name: "appBar"; type: "QQuickItem"; isPointer: true }
|
||||||
Property { name: "backgroundColor"; type: "QColor" }
|
Property { name: "backgroundColor"; type: "QColor" }
|
||||||
Property { name: "stayTop"; type: "bool" }
|
Property { name: "stayTop"; type: "bool" }
|
||||||
@ -4264,6 +4499,7 @@ Module {
|
|||||||
Property { name: "autoCenter"; type: "bool" }
|
Property { name: "autoCenter"; type: "bool" }
|
||||||
Property { name: "autoDestroy"; type: "bool" }
|
Property { name: "autoDestroy"; type: "bool" }
|
||||||
Property { name: "useSystemAppBar"; type: "bool" }
|
Property { name: "useSystemAppBar"; type: "bool" }
|
||||||
|
Property { name: "__margins"; type: "int" }
|
||||||
Property { name: "resizeBorderColor"; type: "QColor" }
|
Property { name: "resizeBorderColor"; type: "QColor" }
|
||||||
Property { name: "resizeBorderWidth"; type: "int" }
|
Property { name: "resizeBorderWidth"; type: "int" }
|
||||||
Property { name: "closeListener"; type: "QVariant" }
|
Property { name: "closeListener"; type: "QVariant" }
|
||||||
@ -4271,6 +4507,8 @@ Module {
|
|||||||
Property { name: "_route"; type: "string" }
|
Property { name: "_route"; type: "string" }
|
||||||
Property { name: "_hideShadow"; type: "bool" }
|
Property { name: "_hideShadow"; type: "bool" }
|
||||||
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
|
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
|
||||||
|
Property { name: "effect"; type: "string" }
|
||||||
|
Property { name: "effective"; type: "bool"; isReadonly: true }
|
||||||
Signal {
|
Signal {
|
||||||
name: "initArgument"
|
name: "initArgument"
|
||||||
Parameter { name: "argument"; type: "QVariant" }
|
Parameter { name: "argument"; type: "QVariant" }
|
||||||
@ -4308,11 +4546,6 @@ Module {
|
|||||||
Method { name: "clearAllInfo"; type: "QVariant" }
|
Method { name: "clearAllInfo"; type: "QVariant" }
|
||||||
Method { name: "moveWindowToDesktopCenter"; type: "QVariant" }
|
Method { name: "moveWindowToDesktopCenter"; type: "QVariant" }
|
||||||
Method { name: "fixWindowSize"; type: "QVariant" }
|
Method { name: "fixWindowSize"; type: "QVariant" }
|
||||||
Method {
|
|
||||||
name: "registerForWindowResult"
|
|
||||||
type: "QVariant"
|
|
||||||
Parameter { name: "path"; type: "QVariant" }
|
|
||||||
}
|
|
||||||
Method {
|
Method {
|
||||||
name: "setResult"
|
name: "setResult"
|
||||||
type: "QVariant"
|
type: "QVariant"
|
||||||
@ -4332,6 +4565,8 @@ Module {
|
|||||||
type: "QVariant"
|
type: "QVariant"
|
||||||
Parameter { name: "val"; type: "QVariant" }
|
Parameter { name: "val"; type: "QVariant" }
|
||||||
}
|
}
|
||||||
|
Method { name: "deleteLater"; type: "QVariant" }
|
||||||
|
Method { name: "containerItem"; type: "QVariant" }
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
prototype: "QQuickItem"
|
prototype: "QQuickItem"
|
||||||
|
@ -16,7 +16,7 @@ Window {
|
|||||||
property int blurRadius: 60
|
property int blurRadius: 60
|
||||||
property alias effect: frameless.effect
|
property alias effect: frameless.effect
|
||||||
readonly property alias effective: frameless.effective
|
readonly property alias effective: frameless.effective
|
||||||
readonly property var availableEffects: frameless.availableEffects
|
readonly property alias availableEffects: frameless.availableEffects
|
||||||
property Item appBar: FluAppBar {
|
property Item appBar: FluAppBar {
|
||||||
title: window.title
|
title: window.title
|
||||||
height: 30
|
height: 30
|
||||||
@ -113,6 +113,8 @@ Window {
|
|||||||
fixSize: window.fixSize
|
fixSize: window.fixSize
|
||||||
topmost: window.stayTop
|
topmost: window.stayTop
|
||||||
disabled: FluApp.useSystemAppBar
|
disabled: FluApp.useSystemAppBar
|
||||||
|
isDarkMode: FluTheme.dark
|
||||||
|
useSystemEffect: !FluTheme.blurBehindWindowEnabled
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
frameless.setHitTestVisible(appBar.layoutMacosButtons)
|
frameless.setHitTestVisible(appBar.layoutMacosButtons)
|
||||||
frameless.setHitTestVisible(appBar.layoutStandardbuttons)
|
frameless.setHitTestVisible(appBar.layoutStandardbuttons)
|
||||||
|
Loading…
Reference in New Issue
Block a user