mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
smartlist: use qml native placeholder
Change-Id: Iada72f807be439c6033a3b22469f5424b324e1a5
This commit is contained in:
parent
b1a7ba7f5a
commit
9c0ea510cd
4 changed files with 3 additions and 29 deletions
|
@ -101,11 +101,6 @@ Popup {
|
|||
onContactSearchBarTextChanged: {
|
||||
ContactAdapter.setSearchFilter(text)
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
contactPickerContactSearchBar.setPlaceholderString(
|
||||
qsTr("Search contacts"))
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
|
|
|
@ -27,11 +27,6 @@ Rectangle {
|
|||
|
||||
signal contactSearchBarTextChanged(string text)
|
||||
|
||||
function setPlaceholderString(str) {
|
||||
placeholderTextForSearchBar.text = str
|
||||
}
|
||||
|
||||
|
||||
// Hack - there is no real way now to make TextField lose its focus,
|
||||
// unless transfer it to other component.
|
||||
function clearFocus() {
|
||||
|
@ -80,22 +75,12 @@ Rectangle {
|
|||
width: contactSearchBarRect.width - searchIconImage.width - 10
|
||||
height: contactSearchBarRect.height - 5
|
||||
|
||||
font.pointSize: JamiTheme.textFontSize - 1
|
||||
font.pointSize: JamiTheme.textFontSize
|
||||
selectByMouse: true
|
||||
selectionColor: JamiTheme.contactSearchBarPlaceHolderTextFontColor
|
||||
|
||||
Text {
|
||||
id: placeholderTextForSearchBar
|
||||
|
||||
anchors.verticalCenter: contactSearchBar.verticalCenter
|
||||
anchors.left: contactSearchBar.left
|
||||
anchors.leftMargin: 10
|
||||
|
||||
text: JamiStrings.contactSearchConversation
|
||||
font.pointSize: JamiTheme.textFontSize
|
||||
color: JamiTheme.contactSearchBarPlaceHolderTextFontColor
|
||||
visible: !contactSearchBar.text && !contactSearchBar.activeFocus
|
||||
}
|
||||
placeholderText: JamiStrings.contactSearchConversation
|
||||
placeholderTextColor: JamiTheme.contactSearchBarPlaceHolderTextFontColor
|
||||
|
||||
background: Rectangle {
|
||||
id: searchBarBackground
|
||||
|
|
|
@ -68,8 +68,6 @@ Rectangle {
|
|||
|
||||
function accountChangedUIReset() {
|
||||
contactSearchBar.clearText()
|
||||
contactSearchBar.setPlaceholderString(
|
||||
JamiStrings.contactSearchConversation)
|
||||
sidePanelTabBar.converstationTabDown = true
|
||||
sidePanelTabBar.invitationTabDown = false
|
||||
}
|
||||
|
|
|
@ -78,8 +78,6 @@ TabBar {
|
|||
|
||||
function showConversations() {
|
||||
ConversationsAdapter.setConversationFilter("")
|
||||
contactSearchBar.setPlaceholderString(
|
||||
JamiStrings.contactSearchConversation)
|
||||
pageOne.down = true
|
||||
pageTwo.down = false
|
||||
setCurrentUidSmartListModelIndex()
|
||||
|
@ -199,8 +197,6 @@ TabBar {
|
|||
|
||||
function showRequests() {
|
||||
ConversationsAdapter.setConversationFilter("PENDING")
|
||||
contactSearchBar.setPlaceholderString(
|
||||
JamiStrings.contactSearchInvitations)
|
||||
pageTwo.down = true
|
||||
pageOne.down = false
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue