mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 19:20:59 +08:00
删除密码框无用的FluTextBoxMenu,修改TextBox中的右键菜单为FluLoader加载
This commit is contained in:
parent
fdaaa85541
commit
41a1775cee
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,8 +65,4 @@ TextField{
|
||||
rightMargin: 5
|
||||
}
|
||||
}
|
||||
FluTextBoxMenu{
|
||||
id:menu
|
||||
inputItem: control
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -66,8 +66,4 @@ TextField{
|
||||
rightMargin: 5
|
||||
}
|
||||
}
|
||||
FluTextBoxMenu{
|
||||
id:menu
|
||||
inputItem: control
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -232,7 +232,8 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</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>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -354,8 +355,8 @@
|
||||
<context>
|
||||
<name>FluWindow</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="347"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="346"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="354"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="354"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -232,7 +232,8 @@
|
||||
<translation type="unfinished">重置</translation>
|
||||
</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>
|
||||
<translation type="unfinished">冲突</translation>
|
||||
</message>
|
||||
@ -354,8 +355,8 @@
|
||||
<context>
|
||||
<name>FluWindow</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="347"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="346"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="354"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="354"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished">加载中...</translation>
|
||||
</message>
|
||||
|
Loading…
Reference in New Issue
Block a user