mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Add header to sidebar component
This commit is contained in:
parent
653381e9e2
commit
e766e7ce0b
@ -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
|
||||
{
|
||||
|
@ -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"
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user