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
8ff0a47be0
commit
b86678f726
|
@ -51,6 +51,7 @@ Item {
|
||||||
property bool pending: false
|
property bool pending: false
|
||||||
property bool leftIcon: true
|
property bool leftIcon: true
|
||||||
property bool isIconSelectable: false
|
property bool isIconSelectable: false
|
||||||
|
property bool showBackground: true
|
||||||
|
|
||||||
property StatusIconSettings icon: StatusIconSettings {
|
property StatusIconSettings icon: StatusIconSettings {
|
||||||
width: 24
|
width: 24
|
||||||
|
@ -84,13 +85,17 @@ Item {
|
||||||
root.implicitHeight,
|
root.implicitHeight,
|
||||||
minimumHeight) : root.implicitHeight,
|
minimumHeight) : root.implicitHeight,
|
||||||
maximumHeight) : parent.height
|
maximumHeight) : parent.height
|
||||||
color: Theme.palette.baseColor2
|
color: root.showBackground ? Theme.palette.baseColor2
|
||||||
|
: "transparent"
|
||||||
radius: 8
|
radius: 8
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: {
|
border.color: {
|
||||||
|
if (!root.showBackground) {
|
||||||
|
return "transparent"
|
||||||
|
}
|
||||||
if (!root.valid && root.dirty) {
|
if (!root.valid && root.dirty) {
|
||||||
return Theme.palette.dangerColor1
|
return Theme.palette.dangerColor1
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ StatusModal {
|
||||||
}
|
}
|
||||||
|
|
||||||
function forceActiveFocus() {
|
function forceActiveFocus() {
|
||||||
contentItem.searchInput.forceActiveFocus()
|
contentItem.searchInput.edit.forceActiveFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
onOpened: {
|
onOpened: {
|
||||||
|
@ -85,7 +85,8 @@ StatusModal {
|
||||||
icon: "search"
|
icon: "search"
|
||||||
color: Theme.palette.baseColor1
|
color: Theme.palette.baseColor1
|
||||||
}
|
}
|
||||||
TextEdit {
|
|
||||||
|
StatusBaseInput {
|
||||||
id: inputText
|
id: inputText
|
||||||
anchors.left: statusIcon.right
|
anchors.left: statusIcon.right
|
||||||
anchors.leftMargin: 15
|
anchors.leftMargin: 15
|
||||||
|
@ -94,6 +95,8 @@ StatusModal {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
focus: true
|
focus: true
|
||||||
font.pixelSize: 28
|
font.pixelSize: 28
|
||||||
|
clearable: true
|
||||||
|
showBackground: false
|
||||||
font.family: Theme.palette.baseFont.name
|
font.family: Theme.palette.baseFont.name
|
||||||
color: Theme.palette.directColor1
|
color: Theme.palette.directColor1
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
|
|
Loading…
Reference in New Issue