mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 21:37:04 +08:00
update
This commit is contained in:
parent
f0227c5686
commit
cbebb51d62
@ -10,6 +10,7 @@ TextArea{
|
||||
property color placeholderNormalColor: FluTheme.dark ? Qt.rgba(210/255,210/255,210/255,1) : Qt.rgba(96/255,96/255,96/255,1)
|
||||
property color placeholderFocusColor: FluTheme.dark ? Qt.rgba(152/255,152/255,152/255,1) : Qt.rgba(141/255,141/255,141/255,1)
|
||||
property color placeholderDisableColor: FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1)
|
||||
property bool isCtrlEnterForNewline: false
|
||||
id:control
|
||||
enabled: !disabled
|
||||
color: {
|
||||
@ -20,7 +21,7 @@ TextArea{
|
||||
}
|
||||
font:FluTextStyle.Body
|
||||
wrapMode: Text.WrapAnywhere
|
||||
padding: 7
|
||||
padding: 8
|
||||
leftPadding: padding+4
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectedTextColor: color
|
||||
@ -44,11 +45,19 @@ TextArea{
|
||||
QtObject{
|
||||
id:d
|
||||
function handleCommit(event){
|
||||
if(event.modifiers & Qt.ControlModifier){
|
||||
if(isCtrlEnterForNewline){
|
||||
if(event.modifiers & Qt.ControlModifier){
|
||||
insert(control.cursorPosition, "\n")
|
||||
return
|
||||
}
|
||||
control.commit(control.text)
|
||||
}else{
|
||||
if(event.modifiers & Qt.ControlModifier){
|
||||
control.commit(control.text)
|
||||
return
|
||||
}
|
||||
insert(control.cursorPosition, "\n")
|
||||
return
|
||||
}
|
||||
control.commit(control.text)
|
||||
}
|
||||
}
|
||||
MouseArea{
|
||||
|
@ -11,6 +11,7 @@ TextArea{
|
||||
property color placeholderNormalColor: FluTheme.dark ? Qt.rgba(210/255,210/255,210/255,1) : Qt.rgba(96/255,96/255,96/255,1)
|
||||
property color placeholderFocusColor: FluTheme.dark ? Qt.rgba(152/255,152/255,152/255,1) : Qt.rgba(141/255,141/255,141/255,1)
|
||||
property color placeholderDisableColor: FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1)
|
||||
property bool isCtrlEnterForNewline: false
|
||||
id:control
|
||||
enabled: !disabled
|
||||
color: {
|
||||
@ -45,11 +46,19 @@ TextArea{
|
||||
QtObject{
|
||||
id:d
|
||||
function handleCommit(event){
|
||||
if(event.modifiers & Qt.ControlModifier){
|
||||
if(isCtrlEnterForNewline){
|
||||
if(event.modifiers & Qt.ControlModifier){
|
||||
insert(control.cursorPosition, "\n")
|
||||
return
|
||||
}
|
||||
control.commit(control.text)
|
||||
}else{
|
||||
if(event.modifiers & Qt.ControlModifier){
|
||||
control.commit(control.text)
|
||||
return
|
||||
}
|
||||
insert(control.cursorPosition, "\n")
|
||||
return
|
||||
}
|
||||
control.commit(control.text)
|
||||
}
|
||||
}
|
||||
MouseArea{
|
||||
|
Loading…
Reference in New Issue
Block a user