mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-03-15 08:29:41 +08:00
Compare commits
No commits in common. "4cca680029611215b9c8a3913f3d4b015d5aa2c1" and "0d61e33ef17b0bec2b47e36dd4f176b5da512cd8" have entirely different histories.
4cca680029
...
0d61e33ef1
@ -180,7 +180,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
|
|||||||
Qt${QT_VERSION_MAJOR}::Qml
|
Qt${QT_VERSION_MAJOR}::Qml
|
||||||
)
|
)
|
||||||
|
|
||||||
if ((${QT_VERSION_MAJOR} LESS_EQUAL 6) AND (CMAKE_BUILD_TYPE MATCHES "Release"))
|
if (${QT_VERSION_MAJOR} LESS_EQUAL 6)
|
||||||
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 FluentUI 1.0 ${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes
|
||||||
|
@ -259,27 +259,17 @@ void FluFrameless::componentComplete() {
|
|||||||
*result = HTCLIENT;
|
*result = HTCLIENT;
|
||||||
return true;
|
return true;
|
||||||
} else if (uMsg == WM_NCPAINT) {
|
} else if (uMsg == WM_NCPAINT) {
|
||||||
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
|
|
||||||
*result = FALSE;
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
if (isCompositionEnabled()) {
|
if (isCompositionEnabled()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*result = FALSE;
|
*result = FALSE;
|
||||||
return true;
|
return true;
|
||||||
#endif
|
|
||||||
} else if (uMsg == WM_NCACTIVATE) {
|
} else if (uMsg == WM_NCACTIVATE) {
|
||||||
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
|
|
||||||
*result = TRUE;
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
if (isCompositionEnabled()) {
|
if (isCompositionEnabled()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*result = TRUE;
|
*result = TRUE;
|
||||||
return true;
|
return true;
|
||||||
#endif
|
|
||||||
} else if (uMsg == WM_GETMINMAXINFO) {
|
} else if (uMsg == WM_GETMINMAXINFO) {
|
||||||
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
|
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
|
||||||
auto *minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam);
|
auto *minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam);
|
||||||
|
@ -19,7 +19,6 @@ Rectangle {
|
|||||||
property bool verticalHeaderVisible: true
|
property bool verticalHeaderVisible: true
|
||||||
property color selectedBorderColor: FluTheme.primaryColor
|
property color selectedBorderColor: FluTheme.primaryColor
|
||||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||||
property alias view: table_view
|
|
||||||
id:control
|
id:control
|
||||||
color: {
|
color: {
|
||||||
if(Window.active){
|
if(Window.active){
|
||||||
@ -48,9 +47,6 @@ Rectangle {
|
|||||||
header_column_model.rows = [headerRow]
|
header_column_model.rows = [headerRow]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onDestruction: {
|
|
||||||
table_view.contentY = 0
|
|
||||||
}
|
|
||||||
QtObject{
|
QtObject{
|
||||||
id:d
|
id:d
|
||||||
property var current
|
property var current
|
||||||
@ -900,7 +896,6 @@ Rectangle {
|
|||||||
item_table_frozen_header.contentX = columnModel.width * _index
|
item_table_frozen_header.contentX = columnModel.width * _index
|
||||||
item_table_frozen.contentX = columnModel.width * _index
|
item_table_frozen.contentX = columnModel.width * _index
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ Rectangle {
|
|||||||
property color selectedBorderColor: FluTheme.primaryColor
|
property color selectedBorderColor: FluTheme.primaryColor
|
||||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||||
readonly property alias current: d.current
|
readonly property alias current: d.current
|
||||||
property alias view: table_view
|
|
||||||
id:control
|
id:control
|
||||||
color: {
|
color: {
|
||||||
if(Window.active){
|
if(Window.active){
|
||||||
@ -46,9 +45,6 @@ Rectangle {
|
|||||||
id:tree_model
|
id:tree_model
|
||||||
columnSource: control.columnSource
|
columnSource: control.columnSource
|
||||||
}
|
}
|
||||||
Component.onDestruction: {
|
|
||||||
table_view.contentY = 0
|
|
||||||
}
|
|
||||||
onDepthPaddingChanged: {
|
onDepthPaddingChanged: {
|
||||||
table_view.forceLayout()
|
table_view.forceLayout()
|
||||||
}
|
}
|
||||||
|
@ -122,20 +122,11 @@ Window {
|
|||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
img_back.updateLayout()
|
|
||||||
source = FluTools.getUrlByFilePath(FluTheme.desktopImagePath)
|
|
||||||
}
|
|
||||||
Connections{
|
|
||||||
target: window
|
|
||||||
function onScreenChanged(){
|
|
||||||
img_back.updateLayout()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function updateLayout(){
|
|
||||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
var geometry = FluTools.desktopAvailableGeometry(window)
|
||||||
img_back.width = geometry.width
|
width = geometry.width
|
||||||
img_back.height = geometry.height
|
height = geometry.height
|
||||||
img_back.sourceSize = Qt.size(img_back.width,img_back.height)
|
sourceSize = Qt.size(width,height)
|
||||||
|
source = FluTools.getUrlByFilePath(FluTheme.desktopImagePath)
|
||||||
}
|
}
|
||||||
Connections{
|
Connections{
|
||||||
target: FluTheme
|
target: FluTheme
|
||||||
@ -166,7 +157,7 @@ Window {
|
|||||||
blurRadius: 64
|
blurRadius: 64
|
||||||
visible: window.active && FluTheme.blurBehindWindowEnabled
|
visible: window.active && FluTheme.blurBehindWindowEnabled
|
||||||
tintColor: FluTheme.dark ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
|
tintColor: FluTheme.dark ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
|
||||||
targetRect: Qt.rect(window.x-window.screen.virtualX,window.y-window.screen.virtualY,window.width,window.height)
|
targetRect: Qt.rect(window.x,window.y,window.width,window.height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ Rectangle {
|
|||||||
property bool verticalHeaderVisible: true
|
property bool verticalHeaderVisible: true
|
||||||
property color selectedBorderColor: FluTheme.primaryColor
|
property color selectedBorderColor: FluTheme.primaryColor
|
||||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||||
property alias view: table_view
|
|
||||||
id:control
|
id:control
|
||||||
color: {
|
color: {
|
||||||
if(Window.active){
|
if(Window.active){
|
||||||
@ -48,9 +47,6 @@ Rectangle {
|
|||||||
header_column_model.rows = [headerRow]
|
header_column_model.rows = [headerRow]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onDestruction: {
|
|
||||||
table_view.contentY = 0
|
|
||||||
}
|
|
||||||
QtObject{
|
QtObject{
|
||||||
id:d
|
id:d
|
||||||
property var current
|
property var current
|
||||||
@ -900,7 +896,6 @@ Rectangle {
|
|||||||
item_table_frozen_header.contentX = columnModel.width * _index
|
item_table_frozen_header.contentX = columnModel.width * _index
|
||||||
item_table_frozen.contentX = columnModel.width * _index
|
item_table_frozen.contentX = columnModel.width * _index
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ Rectangle {
|
|||||||
property color selectedBorderColor: FluTheme.primaryColor
|
property color selectedBorderColor: FluTheme.primaryColor
|
||||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||||
readonly property alias current: d.current
|
readonly property alias current: d.current
|
||||||
property alias view: table_view
|
|
||||||
id:control
|
id:control
|
||||||
color: {
|
color: {
|
||||||
if(Window.active){
|
if(Window.active){
|
||||||
@ -29,7 +28,6 @@ Rectangle {
|
|||||||
tree_model.setDataSource(dataSource)
|
tree_model.setDataSource(dataSource)
|
||||||
}
|
}
|
||||||
onColumnSourceChanged: {
|
onColumnSourceChanged: {
|
||||||
if(columnSource.length !== 0){
|
|
||||||
var columns= []
|
var columns= []
|
||||||
var headerRow = {}
|
var headerRow = {}
|
||||||
columnSource.forEach(function(item){
|
columnSource.forEach(function(item){
|
||||||
@ -41,14 +39,10 @@ Rectangle {
|
|||||||
header_column_model.columns = columns
|
header_column_model.columns = columns
|
||||||
header_column_model.rows = [headerRow]
|
header_column_model.rows = [headerRow]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
FluTreeModel{
|
FluTreeModel{
|
||||||
id:tree_model
|
id:tree_model
|
||||||
columnSource: control.columnSource
|
columnSource: control.columnSource
|
||||||
}
|
}
|
||||||
Component.onDestruction: {
|
|
||||||
table_view.contentY = 0
|
|
||||||
}
|
|
||||||
onDepthPaddingChanged: {
|
onDepthPaddingChanged: {
|
||||||
table_view.forceLayout()
|
table_view.forceLayout()
|
||||||
}
|
}
|
||||||
|
@ -121,20 +121,11 @@ Window {
|
|||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
img_back.updateLayout()
|
|
||||||
source = FluTools.getUrlByFilePath(FluTheme.desktopImagePath)
|
|
||||||
}
|
|
||||||
Connections{
|
|
||||||
target: window
|
|
||||||
function onScreenChanged(){
|
|
||||||
img_back.updateLayout()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function updateLayout(){
|
|
||||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
var geometry = FluTools.desktopAvailableGeometry(window)
|
||||||
img_back.width = geometry.width
|
width = geometry.width
|
||||||
img_back.height = geometry.height
|
height = geometry.height
|
||||||
img_back.sourceSize = Qt.size(img_back.width,img_back.height)
|
sourceSize = Qt.size(width,height)
|
||||||
|
source = FluTools.getUrlByFilePath(FluTheme.desktopImagePath)
|
||||||
}
|
}
|
||||||
Connections{
|
Connections{
|
||||||
target: FluTheme
|
target: FluTheme
|
||||||
@ -165,7 +156,7 @@ Window {
|
|||||||
blurRadius: 64
|
blurRadius: 64
|
||||||
visible: window.active && FluTheme.blurBehindWindowEnabled
|
visible: window.active && FluTheme.blurBehindWindowEnabled
|
||||||
tintColor: FluTheme.dark ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
|
tintColor: FluTheme.dark ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
|
||||||
targetRect: Qt.rect(window.x-window.screen.virtualX,window.y-window.screen.virtualY,window.width,window.height)
|
targetRect: Qt.rect(window.x,window.y,window.width,window.height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user