import QtQuick 2.1
import QtQuick.Controls 1.0
import Communi 3.0
Rectangle {
id: background
color: "#edf3fe"
Rectangle {
id: frame
color: "transparent"
border.color: "#aaa"
anchors.topMargin: -1
anchors.leftMargin: -1
anchors.bottomMargin: -1
}
ScrollView {
id: scrollView
anchors.topMargin: -1
anchors.bottomMargin: -1
ListView {
id: listView
id: userModel
sortMethod: Irc.SortByTitle
channel: background.channel
onChannelChanged: listView.currentIndex = -1
}
delegate: Rectangle {
width: parent.width
height: Math.max(20, label.implicitHeight + 4)
color: ListView.isCurrentItem ? "#b5d5ff" : "transparent"
Label {
id: label
text: model.title
anchors.margins: 2
anchors.leftMargin: 6
anchors.verticalCenter: parent.verticalCenter
}
MouseArea {
onPressed: listView.currentIndex = index
onDoubleClicked: queried(model.user)
}
}
}
}
}