Skip to content
Snippets Groups Projects
Commit 9c0ea510 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

smartlist: use qml native placeholder

Change-Id: Iada72f807be439c6033a3b22469f5424b324e1a5
parent b1a7ba7f
No related branches found
No related tags found
No related merge requests found
...@@ -101,11 +101,6 @@ Popup { ...@@ -101,11 +101,6 @@ Popup {
onContactSearchBarTextChanged: { onContactSearchBarTextChanged: {
ContactAdapter.setSearchFilter(text) ContactAdapter.setSearchFilter(text)
} }
Component.onCompleted: {
contactPickerContactSearchBar.setPlaceholderString(
qsTr("Search contacts"))
}
} }
ListView { ListView {
......
...@@ -27,11 +27,6 @@ Rectangle { ...@@ -27,11 +27,6 @@ Rectangle {
signal contactSearchBarTextChanged(string text) signal contactSearchBarTextChanged(string text)
function setPlaceholderString(str) {
placeholderTextForSearchBar.text = str
}
// Hack - there is no real way now to make TextField lose its focus, // Hack - there is no real way now to make TextField lose its focus,
// unless transfer it to other component. // unless transfer it to other component.
function clearFocus() { function clearFocus() {
...@@ -80,22 +75,12 @@ Rectangle { ...@@ -80,22 +75,12 @@ Rectangle {
width: contactSearchBarRect.width - searchIconImage.width - 10 width: contactSearchBarRect.width - searchIconImage.width - 10
height: contactSearchBarRect.height - 5 height: contactSearchBarRect.height - 5
font.pointSize: JamiTheme.textFontSize - 1 font.pointSize: JamiTheme.textFontSize
selectByMouse: true selectByMouse: true
selectionColor: JamiTheme.contactSearchBarPlaceHolderTextFontColor selectionColor: JamiTheme.contactSearchBarPlaceHolderTextFontColor
Text { placeholderText: JamiStrings.contactSearchConversation
id: placeholderTextForSearchBar placeholderTextColor: JamiTheme.contactSearchBarPlaceHolderTextFontColor
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
}
background: Rectangle { background: Rectangle {
id: searchBarBackground id: searchBarBackground
......
...@@ -68,8 +68,6 @@ Rectangle { ...@@ -68,8 +68,6 @@ Rectangle {
function accountChangedUIReset() { function accountChangedUIReset() {
contactSearchBar.clearText() contactSearchBar.clearText()
contactSearchBar.setPlaceholderString(
JamiStrings.contactSearchConversation)
sidePanelTabBar.converstationTabDown = true sidePanelTabBar.converstationTabDown = true
sidePanelTabBar.invitationTabDown = false sidePanelTabBar.invitationTabDown = false
} }
......
...@@ -78,8 +78,6 @@ TabBar { ...@@ -78,8 +78,6 @@ TabBar {
function showConversations() { function showConversations() {
ConversationsAdapter.setConversationFilter("") ConversationsAdapter.setConversationFilter("")
contactSearchBar.setPlaceholderString(
JamiStrings.contactSearchConversation)
pageOne.down = true pageOne.down = true
pageTwo.down = false pageTwo.down = false
setCurrentUidSmartListModelIndex() setCurrentUidSmartListModelIndex()
...@@ -199,8 +197,6 @@ TabBar { ...@@ -199,8 +197,6 @@ TabBar {
function showRequests() { function showRequests() {
ConversationsAdapter.setConversationFilter("PENDING") ConversationsAdapter.setConversationFilter("PENDING")
contactSearchBar.setPlaceholderString(
JamiStrings.contactSearchInvitations)
pageTwo.down = true pageTwo.down = true
pageOne.down = false pageOne.down = false
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment