diff --git a/src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml b/src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml
index b365175c..d5f2cbb6 100644
--- a/src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml
+++ b/src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml
@@ -26,10 +26,24 @@ TextEdit {
anchors.fill: parent
cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton
- onClicked: control.echoMode !== TextInput.Password && menu.popup()
+ onClicked: control.echoMode !== TextInput.Password && menu_loader.popup()
}
- FluTextBoxMenu{
+ FluLoader{
+ id: menu_loader
+ function popup(){
+ sourceComponent = menu
+ }
+ onLoaded: {
+ item.open()
+ }
+ }
+ Component{
id:menu
- inputItem: control
+ FluTextBoxMenu{
+ inputItem: control
+ onClosed: {
+ menu_loader.sourceComponent = undefined
+ }
+ }
}
}
diff --git a/src/Qt5/imports/FluentUI/Controls/FluMultilineTextBox.qml b/src/Qt5/imports/FluentUI/Controls/FluMultilineTextBox.qml
index 7b5286ef..70180fc2 100644
--- a/src/Qt5/imports/FluentUI/Controls/FluMultilineTextBox.qml
+++ b/src/Qt5/imports/FluentUI/Controls/FluMultilineTextBox.qml
@@ -71,11 +71,25 @@ TextArea{
if(control.readOnly && control.text === ""){
return
}
- menu.popup()
+ menu_loader.popup()
}
}
- FluTextBoxMenu{
+ FluLoader{
+ id: menu_loader
+ function popup(){
+ sourceComponent = menu
+ }
+ onLoaded: {
+ item.open()
+ }
+ }
+ Component{
id:menu
- inputItem: control
+ FluTextBoxMenu{
+ inputItem: control
+ onClosed: {
+ menu_loader.sourceComponent = undefined
+ }
+ }
}
}
diff --git a/src/Qt5/imports/FluentUI/Controls/FluPasswordBox.qml b/src/Qt5/imports/FluentUI/Controls/FluPasswordBox.qml
index de932dd9..ac8e064c 100644
--- a/src/Qt5/imports/FluentUI/Controls/FluPasswordBox.qml
+++ b/src/Qt5/imports/FluentUI/Controls/FluPasswordBox.qml
@@ -65,8 +65,4 @@ TextField{
rightMargin: 5
}
}
- FluTextBoxMenu{
- id:menu
- inputItem: control
- }
}
diff --git a/src/Qt5/imports/FluentUI/Controls/FluTextBox.qml b/src/Qt5/imports/FluentUI/Controls/FluTextBox.qml
index 6564e7fa..16510084 100644
--- a/src/Qt5/imports/FluentUI/Controls/FluTextBox.qml
+++ b/src/Qt5/imports/FluentUI/Controls/FluTextBox.qml
@@ -69,7 +69,7 @@ TextField{
if(control.readOnly && control.text === ""){
return
}
- menu.popup()
+ menu_loader.popup()
}
}
RowLayout{
@@ -111,8 +111,22 @@ TextField{
visible: control.iconSource != 0
}
}
- FluTextBoxMenu{
+ FluLoader{
+ id: menu_loader
+ function popup(){
+ sourceComponent = menu
+ }
+ onLoaded: {
+ item.open()
+ }
+ }
+ Component{
id:menu
- inputItem: control
+ FluTextBoxMenu{
+ inputItem: control
+ onClosed: {
+ menu_loader.sourceComponent = undefined
+ }
+ }
}
}
diff --git a/src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml b/src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml
index 7d093294..2437d4e0 100644
--- a/src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml
+++ b/src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml
@@ -26,10 +26,24 @@ TextEdit {
anchors.fill: parent
cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton
- onClicked: control.echoMode !== TextInput.Password && menu.popup()
+ onClicked: control.echoMode !== TextInput.Password && menu_loader.popup()
}
- FluTextBoxMenu{
+ FluLoader{
+ id: menu_loader
+ function popup(){
+ sourceComponent = menu
+ }
+ onLoaded: {
+ item.open()
+ }
+ }
+ Component{
id:menu
- inputItem: control
+ FluTextBoxMenu{
+ inputItem: control
+ onClosed: {
+ menu_loader.sourceComponent = undefined
+ }
+ }
}
}
diff --git a/src/Qt6/imports/FluentUI/Controls/FluPasswordBox.qml b/src/Qt6/imports/FluentUI/Controls/FluPasswordBox.qml
index e75ff1bb..48488420 100644
--- a/src/Qt6/imports/FluentUI/Controls/FluPasswordBox.qml
+++ b/src/Qt6/imports/FluentUI/Controls/FluPasswordBox.qml
@@ -66,8 +66,4 @@ TextField{
rightMargin: 5
}
}
- FluTextBoxMenu{
- id:menu
- inputItem: control
- }
}
diff --git a/src/Qt6/imports/FluentUI/Controls/FluTextBox.qml b/src/Qt6/imports/FluentUI/Controls/FluTextBox.qml
index 3b335c4e..e48a5417 100644
--- a/src/Qt6/imports/FluentUI/Controls/FluTextBox.qml
+++ b/src/Qt6/imports/FluentUI/Controls/FluTextBox.qml
@@ -70,7 +70,7 @@ TextField{
if(control.readOnly && control.text === ""){
return
}
- menu.popup()
+ menu_loader.popup()
}
}
RowLayout{
@@ -112,8 +112,22 @@ TextField{
visible: control.iconSource != 0
}
}
- FluTextBoxMenu{
+ FluLoader{
+ id: menu_loader
+ function popup(){
+ sourceComponent = menu
+ }
+ onLoaded: {
+ item.open()
+ }
+ }
+ Component{
id:menu
- inputItem: control
+ FluTextBoxMenu{
+ inputItem: control
+ onClosed: {
+ menu_loader.sourceComponent = undefined
+ }
+ }
}
}
diff --git a/src/fluentui_en_US.ts b/src/fluentui_en_US.ts
index 11537df9..25e4a493 100644
--- a/src/fluentui_en_US.ts
+++ b/src/fluentui_en_US.ts
@@ -232,7 +232,8 @@
-
+
+
@@ -354,8 +355,8 @@
FluWindow
-
-
+
+
diff --git a/src/fluentui_zh_CN.ts b/src/fluentui_zh_CN.ts
index 36bc136b..6480b84c 100644
--- a/src/fluentui_zh_CN.ts
+++ b/src/fluentui_zh_CN.ts
@@ -232,7 +232,8 @@
重置
-
+
+
冲突
@@ -354,8 +355,8 @@
FluWindow
-
-
+
+
加载中...