Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复FluWindow部分bug,修复qmltypes生成空白的bug #552

Merged
merged 13 commits into from
Sep 2, 2024
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
Loading