moved sidebar to own file

This commit is contained in:
Jeena 2015-02-03 01:55:54 +01:00
parent cc59671ff4
commit ee6ba89ab4
7 changed files with 90 additions and 46 deletions

34
Sidebar.qml Normal file
View file

@ -0,0 +1,34 @@
import QtQuick 2.0
import TTRSS 1.0
import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
ScrollView {
id: item
property Server server
property Content content
Layout.minimumWidth: 400
ListView {
focus: true
anchors.fill: parent
spacing: 1
model: item.server.posts
delegate: Component {
PostListItem {}
}
highlight: Rectangle {
color: "lightblue"
opacity: 0.5
}
onCurrentItemChanged: {
item.content.post = server.posts[currentIndex]
}
}
}