fix(StatusQ.Popups): Replace TextEdit to StatusBaseInput for SearchPopup
Closes: https://github.com/status-im/status-desktop/issues/5059
This commit is contained in:
parent
b6c3231e30
commit
f299c9df3a
|
@ -51,6 +51,7 @@ Item {
|
|||
property bool pending: false
|
||||
property bool leftIcon: true
|
||||
property bool isIconSelectable: false
|
||||
property bool showBackground: true
|
||||
|
||||
property StatusIconSettings icon: StatusIconSettings {
|
||||
width: 24
|
||||
|
@ -84,13 +85,17 @@ Item {
|
|||
root.implicitHeight,
|
||||
minimumHeight) : root.implicitHeight,
|
||||
maximumHeight) : parent.height
|
||||
color: Theme.palette.baseColor2
|
||||
color: root.showBackground ? Theme.palette.baseColor2
|
||||
: "transparent"
|
||||
radius: 8
|
||||
|
||||
clip: true
|
||||
|
||||
border.width: 1
|
||||
border.color: {
|
||||
if (!root.showBackground) {
|
||||
return "transparent"
|
||||
}
|
||||
if (!root.valid && root.dirty) {
|
||||
return Theme.palette.dangerColor1
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ StatusModal {
|
|||
}
|
||||
|
||||
function forceActiveFocus() {
|
||||
contentItem.searchInput.forceActiveFocus()
|
||||
contentItem.searchInput.edit.forceActiveFocus()
|
||||
}
|
||||
|
||||
onOpened: {
|
||||
|
@ -85,7 +85,8 @@ StatusModal {
|
|||
icon: "search"
|
||||
color: Theme.palette.baseColor1
|
||||
}
|
||||
TextEdit {
|
||||
|
||||
StatusBaseInput {
|
||||
id: inputText
|
||||
anchors.left: statusIcon.right
|
||||
anchors.leftMargin: 15
|
||||
|
@ -94,6 +95,8 @@ StatusModal {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
focus: true
|
||||
font.pixelSize: 28
|
||||
clearable: true
|
||||
showBackground: false
|
||||
font.family: Theme.palette.baseFont.name
|
||||
color: Theme.palette.directColor1
|
||||
Keys.onPressed: {
|
||||
|
|
Loading…
Reference in New Issue