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,Qt5中qmltypes无法生成的bug修复 #551

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions example/example_en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2261,21 +2261,26 @@ Some contents...</source>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="123"/>
<source>Rounded Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="134"/>
<source>Open Blur Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="136"/>
<location filename="qml/page/T_Theme.qml" line="169"/>
<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="186"/>
<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="146"/>
<source>window effect</source>
<translation type="unfinished"></translation>
</message>
Expand Down
11 changes: 8 additions & 3 deletions example/example_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2443,21 +2443,26 @@ Some contents...</source>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="123"/>
<source>Rounded Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="134"/>
<source>Open Blur Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Theme.qml" line="136"/>
<location filename="qml/page/T_Theme.qml" line="169"/>
<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="186"/>
<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="146"/>
<source>window effect</source>
<translation type="unfinished"></translation>
</message>
Expand Down
55 changes: 33 additions & 22 deletions example/qml/page/T_Theme.qml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ FluScrollablePage{
FluTheme.animationEnabled = !FluTheme.animationEnabled
}
}
FluText{
text: qsTr("Rounded Window")
Layout.topMargin: 20
}
FluToggleSwitch{
Layout.topMargin: 5
checked: window.roundCornerEnable
onClicked: {
window.roundCornerEnable = !window.roundCornerEnable
}
}
FluText{
text: qsTr("Open Blur Window")
Layout.topMargin: 20
Expand All @@ -131,6 +142,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 +198,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