This commit is contained in:
朱子楚\zhuzi 2023-06-27 21:14:20 +08:00
parent 1566e3934e
commit e25b944704
5 changed files with 15 additions and 13 deletions

View File

@ -14,6 +14,7 @@ TextEdit {
leftPadding: 0 leftPadding: 0
rightPadding: 0 rightPadding: 0
topPadding: 0 topPadding: 0
selectByMouse: true
selectedTextColor: FluColors.Grey220 selectedTextColor: FluColors.Grey220
bottomPadding: 0 bottomPadding: 0
selectionColor: FluTheme.primaryColor.lightest selectionColor: FluTheme.primaryColor.lightest
@ -21,9 +22,11 @@ TextEdit {
onSelectedTextChanged: { onSelectedTextChanged: {
control.forceActiveFocus() control.forceActiveFocus()
} }
TapHandler { MouseArea{
anchors.fill: parent
cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton acceptedButtons: Qt.RightButton
onTapped: control.echoMode !== TextInput.Password && menu.popup() onClicked: control.echoMode !== TextInput.Password && menu.popup()
} }
FluTextBoxMenu{ FluTextBoxMenu{
id:menu id:menu

View File

@ -41,9 +41,11 @@ TextArea{
Keys.onBackPressed: { Keys.onBackPressed: {
control.commit() control.commit()
} }
TapHandler { MouseArea{
anchors.fill: parent
cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton acceptedButtons: Qt.RightButton
onTapped: control.echoMode !== TextInput.Password && menu.popup() onClicked: control.echoMode !== TextInput.Password && menu.popup()
} }
FluTextBoxMenu{ FluTextBoxMenu{
id:menu id:menu

View File

@ -71,10 +71,6 @@ TextField{
rightMargin: icon_end.visible ? 25 : 5 rightMargin: icon_end.visible ? 25 : 5
} }
} }
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: control.echoMode !== TextInput.Password && menu.popup()
}
FluTextBoxMenu{ FluTextBoxMenu{
id:menu id:menu
inputItem: control inputItem: control

View File

@ -59,7 +59,6 @@ Rectangle {
} }
} }
} }
ScrollView{ ScrollView{
id:scroll_table id:scroll_table
anchors.left: header_vertical.right anchors.left: header_vertical.right

View File

@ -56,6 +56,12 @@ TextField{
} }
} }
} }
MouseArea{
anchors.fill: parent
cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton
onClicked: control.echoMode !== TextInput.Password && menu.popup()
}
FluIconButton{ FluIconButton{
iconSource:FluentIcons.ChromeClose iconSource:FluentIcons.ChromeClose
iconSize: 10 iconSize: 10
@ -76,10 +82,6 @@ TextField{
control.text = "" control.text = ""
} }
} }
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: control.echoMode !== TextInput.Password && menu.popup()
}
FluTextBoxMenu{ FluTextBoxMenu{
id:menu id:menu
inputItem: control inputItem: control