forked from jeena/FeedTheMonkey
moved sidebar to own file
This commit is contained in:
parent
cc59671ff4
commit
ee6ba89ab4
7 changed files with 90 additions and 46 deletions
34
Sidebar.qml
Normal file
34
Sidebar.qml
Normal 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]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue