feat(SearchBox): use StatusInput for SearchBox and add clear button

Fixes #5090
This commit is contained in:
Jonathan Rainville 2022-03-21 13:43:42 -04:00 committed by Iuri Matias
parent eec7707b42
commit b4a1fb1a14
4 changed files with 17 additions and 12 deletions

View File

@ -72,10 +72,11 @@ Item {
SearchBox {
id: searchBox
customHeight: 36
fontPixelSize: 12
input.font.pixelSize: 12
anchors.top: modalBody.top
anchors.topMargin: Style.current.padding
anchors.right: parent.right
anchors.left: parent.left
}

View File

@ -66,8 +66,9 @@ Item {
id: searchBox
anchors.top: titleText.bottom
anchors.topMargin: 32
fontPixelSize: 15
placeholderText: qsTr("Search by a display name or chat key")
width: parent.width
input.implicitHeight: 44
input.placeholderText: qsTr("Search by a display name or chat key")
}
TabBar {

View File

@ -3,13 +3,16 @@ import QtQuick 2.13
import utils 1.0
import "."
Input {
import StatusQ.Core 0.1
import StatusQ.Controls 0.1
StatusInput {
id: searchBox
//% "Search"
placeholderText: qsTrId("search")
icon: Style.svg("search")
iconWidth: 24
iconHeight: 24
customHeight: 36
fontPixelSize: 15
input.placeholderText: qsTrId("search")
input.icon.name: "search"
input.implicitHeight: 36
input.clearable: true
leftPadding: 0
rightPadding: 0
}

View File

@ -94,7 +94,7 @@ Popup {
SearchBox {
id: searchBox
placeholderText: qsTr("Search Tenor")
input.placeholderText: qsTr("Search Tenor")
enabled: RootStore.isTenorWarningAccepted
anchors.right: parent.right
anchors.rightMargin: gifHeader.headerMargin