feat: hide arrow input when text is empty + use good arrow icon
This commit is contained in:
parent
4fa3c34199
commit
9bd54881ce
|
@ -22,12 +22,11 @@ Rectangle {
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: chatSendBtn
|
id: chatSendBtn
|
||||||
|
visible: txtData.length > 0
|
||||||
x: 100
|
x: 100
|
||||||
width: 30
|
width: 30
|
||||||
height: 30
|
height: 30
|
||||||
text: "\u2191"
|
text: ""
|
||||||
font.bold: true
|
|
||||||
font.pointSize: 12
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -36,11 +35,17 @@ Rectangle {
|
||||||
chatsModel.onSend(txtData.text)
|
chatsModel.onSend(txtData.text)
|
||||||
txtData.text = ""
|
txtData.text = ""
|
||||||
}
|
}
|
||||||
enabled: txtData.text !== ""
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: parent.enabled ? Theme.blue : Theme.grey
|
color: parent.enabled ? Theme.blue : Theme.grey
|
||||||
radius: 50
|
radius: 50
|
||||||
}
|
}
|
||||||
|
Image {
|
||||||
|
source: "../../../img/arrowUp.svg"
|
||||||
|
width: 12
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
|
@ -78,4 +83,9 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*##^##
|
||||||
|
Designer {
|
||||||
|
D{i:0;width:600}
|
||||||
|
}
|
||||||
|
##^##*/
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="10" height="12" viewBox="0 0 10 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.95235 3.34577L8.37242 5.83333C8.73926 6.2104 9.34668 6.21409 9.71911 5.83127C10.0941 5.44578 10.0924 4.8287 9.72112 4.44702L5.67102 0.283973C5.48793 0.0957746 5.2449 0.000588088 5.00108 4.48202e-05C4.75404 -0.00238444 4.51166 0.093471 4.32633 0.283973L0.276227 4.44702C-0.0906155 4.82409 -0.0942032 5.44845 0.278229 5.83127C0.653258 6.21676 1.2536 6.21501 1.62492 5.83333L4.045 3.34577L4.045 11.0242C4.045 11.5533 4.47197 12 4.99867 12C5.52904 12 5.95234 11.5631 5.95234 11.0242L5.95235 3.34577Z" fill="white"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 667 B |
Loading…
Reference in New Issue