Compare commits

..

4 Commits

Author SHA1 Message Date
朱子楚\zhuzi
2f4b4ee85e update 2024-06-28 12:02:43 +08:00
朱子楚\zhuzi
0803042e90 update 2024-06-28 09:44:18 +08:00
zhuzichu
7c4cfceb8f
Merge pull request #533 from jeffrey0326/main
删除密码框无用的FluTextBoxMenu,修改TextBox中的右键菜单为FluLoader加载
2024-06-28 09:33:20 +08:00
jeffrey0326
41a1775cee 删除密码框无用的FluTextBoxMenu,修改TextBox中的右键菜单为FluLoader加载 2024-06-27 13:17:03 +08:00
11 changed files with 111 additions and 33 deletions

View File

@ -16,7 +16,7 @@ FluExpander{
id:content id:content
width:parent.width width:parent.width
text:highlightQmlCode(code) text:highlightQmlCode(code)
textFormat: FluMultilineTextBox.RichText textFormat: FluCopyableText.RichText
padding: 10 padding: 10
topPadding: 10 topPadding: 10
leftPadding: 10 leftPadding: 10

View File

@ -26,10 +26,24 @@ TextEdit {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.IBeamCursor cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton 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
}
}
Component{
id:menu id:menu
inputItem: control FluTextBoxMenu{
inputItem: control
Component.onCompleted: {
popup()
}
onClosed: {
menu_loader.sourceComponent = undefined
}
}
} }
} }

View File

@ -71,11 +71,25 @@ TextArea{
if(control.readOnly && control.text === ""){ if(control.readOnly && control.text === ""){
return return
} }
menu.popup() menu_loader.popup()
} }
} }
FluTextBoxMenu{ FluLoader{
id: menu_loader
function popup(){
sourceComponent = menu
}
}
Component{
id:menu id:menu
inputItem: control FluTextBoxMenu{
Component.onCompleted: {
popup()
}
inputItem: control
onClosed: {
menu_loader.sourceComponent = undefined
}
}
} }
} }

View File

@ -65,8 +65,4 @@ TextField{
rightMargin: 5 rightMargin: 5
} }
} }
FluTextBoxMenu{
id:menu
inputItem: control
}
} }

View File

@ -69,7 +69,7 @@ TextField{
if(control.readOnly && control.text === ""){ if(control.readOnly && control.text === ""){
return return
} }
menu.popup() menu_loader.popup()
} }
} }
RowLayout{ RowLayout{
@ -111,8 +111,22 @@ TextField{
visible: control.iconSource != 0 visible: control.iconSource != 0
} }
} }
FluTextBoxMenu{ FluLoader{
id: menu_loader
function popup(){
sourceComponent = menu
}
}
Component{
id:menu id:menu
inputItem: control FluTextBoxMenu{
inputItem: control
Component.onCompleted: {
popup()
}
onClosed: {
menu_loader.sourceComponent = undefined
}
}
} }
} }

View File

@ -26,10 +26,24 @@ TextEdit {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.IBeamCursor cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton 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
}
}
Component{
id:menu id:menu
inputItem: control FluTextBoxMenu{
inputItem: control
Component.onCompleted: {
popup()
}
onClosed: {
menu_loader.sourceComponent = undefined
}
}
} }
} }

View File

@ -72,11 +72,25 @@ TextArea{
if(control.readOnly && control.text === ""){ if(control.readOnly && control.text === ""){
return return
} }
menu.popup() menu_loader.popup()
} }
} }
FluTextBoxMenu{ FluLoader{
id: menu_loader
function popup(){
sourceComponent = menu
}
}
Component{
id:menu id:menu
inputItem: control FluTextBoxMenu{
inputItem: control
Component.onCompleted: {
popup()
}
onClosed: {
menu_loader.sourceComponent = undefined
}
}
} }
} }

View File

@ -66,8 +66,4 @@ TextField{
rightMargin: 5 rightMargin: 5
} }
} }
FluTextBoxMenu{
id:menu
inputItem: control
}
} }

View File

@ -70,7 +70,7 @@ TextField{
if(control.readOnly && control.text === ""){ if(control.readOnly && control.text === ""){
return return
} }
menu.popup() menu_loader.popup()
} }
} }
RowLayout{ RowLayout{
@ -112,8 +112,22 @@ TextField{
visible: control.iconSource != 0 visible: control.iconSource != 0
} }
} }
FluTextBoxMenu{ FluLoader{
id: menu_loader
function popup(){
sourceComponent = menu
}
}
Component{
id:menu id:menu
inputItem: control FluTextBoxMenu{
inputItem: control
Component.onCompleted: {
popup()
}
onClosed: {
menu_loader.sourceComponent = undefined
}
}
} }
} }

View File

@ -232,7 +232,8 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="205"/> <location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="204"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="204"/>
<source>Conflict</source> <source>Conflict</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -354,8 +355,8 @@
<context> <context>
<name>FluWindow</name> <name>FluWindow</name>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="347"/> <location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="354"/>
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="346"/> <location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="354"/>
<source>Loading...</source> <source>Loading...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -232,7 +232,8 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="205"/> <location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="204"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="204"/>
<source>Conflict</source> <source>Conflict</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -354,8 +355,8 @@
<context> <context>
<name>FluWindow</name> <name>FluWindow</name>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="347"/> <location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="354"/>
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="346"/> <location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="354"/>
<source>Loading...</source> <source>Loading...</source>
<translation type="unfinished">...</translation> <translation type="unfinished">...</translation>
</message> </message>