Add header to sidebar component

This commit is contained in:
Angela Mazzurco 2017-06-22 17:32:59 +02:00
parent 653381e9e2
commit e766e7ce0b
2 changed files with 30 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import "../URI.js" as UriJs
import "../"
import "../components"
@ -17,8 +18,30 @@ Drawer
{
id: listView
currentIndex: -1
anchors.fill:parent
height: parent.height
clip: true
snapMode: ListView.SnapToItem
headerPositioning: ListView.OverlayHeader
header:Rectangle
{
id:header
property var styles: StyleSideBar.header
width: parent.width
height: styles.height
color: styles.color
Label {
text: "Retroshare"
anchors.centerIn: parent
wrapMode: Text.WordWrap
}
}
delegate: Item
{

View File

@ -12,7 +12,11 @@ QtObject {
property string hoverColor: "lightgrey"
property string defaultColor: "white"
property string pressColor: "slategrey"
}
property QtObject header: QtObject
{
property var height: 80
property var color: "#0398d5"
}
}