Skip to content

Commit

Permalink
Merge pull request #552 from jeffrey0326/main
Browse files Browse the repository at this point in the history
修复FluWindow部分bug,修复qmltypes生成空白的bug
  • Loading branch information
zhuzichu520 authored Sep 2, 2024
2 parents 3e28c42 + d07de0d commit 1797276
Show file tree
Hide file tree
Showing 10 changed files with 474 additions and 218 deletions.
7 changes: 4 additions & 3 deletions example/example_en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2262,20 +2262,21 @@ Some contents...</source>
<message>
<location filename="qml/page/T_Theme.qml" line="123"/>
<source>Open Blur Window</source>
<oldsource>Rounded Window</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="136"/>
<location filename="qml/page/T_Theme.qml" line="158"/>
<source>window tintOpacity</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="153"/>
<location filename="qml/page/T_Theme.qml" line="175"/>
<source>window blurRadius</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="169"/>
<location filename="qml/page/T_Theme.qml" line="135"/>
<source>window effect</source>
<translation type="unfinished"></translation>
</message>
Expand Down
15 changes: 8 additions & 7 deletions example/example_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2444,22 +2444,23 @@ Some contents...</source>
<message>
<location filename="qml/page/T_Theme.qml" line="123"/>
<source>Open Blur Window</source>
<translation type="unfinished"></translation>
<oldsource>Rounded Window</oldsource>
<translation>亚克力背景</translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="136"/>
<location filename="qml/page/T_Theme.qml" line="158"/>
<source>window tintOpacity</source>
<translation type="unfinished"></translation>
<translation>背景透明度</translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="153"/>
<location filename="qml/page/T_Theme.qml" line="175"/>
<source>window blurRadius</source>
<translation type="unfinished"></translation>
<translation>背景模糊度</translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="169"/>
<location filename="qml/page/T_Theme.qml" line="135"/>
<source>window effect</source>
<translation type="unfinished"></translation>
<translation>窗口效果</translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="178"/>
Expand Down
44 changes: 22 additions & 22 deletions example/qml/page/T_Theme.qml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,28 @@ FluScrollablePage{
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{
visible: FluTheme.blurBehindWindowEnabled || window.effect === "dwm-blur"
text: qsTr("window tintOpacity")
Expand Down Expand Up @@ -165,28 +187,6 @@ FluScrollablePage{
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{
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
if ((${QT_VERSION_MAJOR} LESS_EQUAL 6) AND (CMAKE_BUILD_TYPE MATCHES "Release"))
find_program(QML_PLUGIN_DUMP NAMES qmlplugindump)
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........."
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
Loading

0 comments on commit 1797276

Please sign in to comment.