extract search box to its own file
This commit is contained in:
parent
8590a288b2
commit
e662f03e06
|
@ -10,9 +10,8 @@ import "./components"
|
|||
import "./ContactsColumn"
|
||||
|
||||
Item {
|
||||
// property alias chatGroupsListViewCount: chatGroupsListView.count
|
||||
property alias chatGroupsListViewCount: channelList.channelListCount
|
||||
property alias searchStr: searchText.text
|
||||
property alias searchStr: searchBox.searchStr
|
||||
|
||||
id: contactsColumn
|
||||
width: 300
|
||||
|
@ -34,46 +33,8 @@ Item {
|
|||
id: publicChatPopup
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
SearchBox {
|
||||
id: searchBox
|
||||
height: 36
|
||||
color: Theme.grey
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 59
|
||||
radius: 8
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 65
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
|
||||
TextField {
|
||||
id: searchText
|
||||
placeholderText: qsTr("Search")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 32
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pixelSize: 12
|
||||
background: Rectangle {
|
||||
color: "#00000000"
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image4
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "../../img/search.svg"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
searchText.forceActiveFocus(Qt.MouseFocusReason)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -197,7 +158,6 @@ Item {
|
|||
id: channelList
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*##^##
|
||||
|
@ -205,4 +165,3 @@ Designer {
|
|||
D{i:0;formeditorColor:"#ffffff";height:770;width:300}
|
||||
}
|
||||
##^##*/
|
||||
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
import Qt.labs.platform 1.1
|
||||
import "../../../../shared"
|
||||
import "../../../../imports"
|
||||
|
||||
Rectangle {
|
||||
property alias searchStr: searchText.text
|
||||
id: searchBox
|
||||
height: 36
|
||||
color: Theme.grey
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 59
|
||||
radius: 8
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 65
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
|
||||
TextField {
|
||||
id: searchText
|
||||
placeholderText: qsTr("Search")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 32
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pixelSize: 12
|
||||
background: Rectangle {
|
||||
color: "#00000000"
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image4
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "../../img/search.svg"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
searchText.forceActiveFocus(Qt.MouseFocusReason)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,2 +1,3 @@
|
|||
EmptyView 1.0 EmptyView.qml
|
||||
ChannelList 1.0 ChannelList.qml
|
||||
ChannelList 1.0 ChannelList.qml
|
||||
SearchBox 1.0 SearchBox.qml
|
Loading…
Reference in New Issue