mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-06 10:05:38 -05:00
Style sidebar partialy
This commit is contained in:
parent
3b05e0a3f1
commit
653381e9e2
@ -1,13 +1,16 @@
|
|||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import "../URI.js" as UriJs
|
import "../URI.js" as UriJs
|
||||||
import "../" //Needed for TokensManager and ClipboardWrapper singleton
|
import "../"
|
||||||
|
import "../components"
|
||||||
|
|
||||||
|
|
||||||
Drawer
|
Drawer
|
||||||
{
|
{
|
||||||
|
property var styles: StyleSideBar
|
||||||
id: drawer
|
id: drawer
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: Math.min(parent.width, parent.height) / 3 * 2
|
width: Math.min(parent.width, parent.height) / 3 * styles.width
|
||||||
dragMargin: 10
|
dragMargin: 10
|
||||||
|
|
||||||
ListView
|
ListView
|
||||||
@ -19,11 +22,12 @@ Drawer
|
|||||||
|
|
||||||
delegate: Item
|
delegate: Item
|
||||||
{
|
{
|
||||||
property var itemHeight: 50
|
|
||||||
|
property var styles: StyleSideBar.item
|
||||||
|
|
||||||
id: menuItem
|
id: menuItem
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: itemHeight
|
height: styles.height
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
@ -37,14 +41,23 @@ Drawer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Btn
|
||||||
{
|
{
|
||||||
text: model.title
|
buttonText: model.title
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
color: menuItem.styles.defaultColor
|
||||||
|
hoverColor: menuItem.styles.hoverColor
|
||||||
|
innerAnchors.left: rectangleButton.left
|
||||||
|
innerAnchors.verticalCenter: rectangleButton.verticalCenter
|
||||||
|
iconUrl: (model.icon)? model.icon : undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
property var lastItem
|
property var lastItem
|
||||||
|
id: itemArea
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
onClicked:
|
onClicked:
|
||||||
@ -61,6 +74,8 @@ Drawer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
visible: (model.showOnCoreReady)? setVisible(mainWindow.coreReady) : true
|
visible: (model.showOnCoreReady)? setVisible(mainWindow.coreReady) : true
|
||||||
|
|
||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
@ -81,7 +96,7 @@ Drawer
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
menuItem.height = itemHeight
|
menuItem.height = styles.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,6 +132,7 @@ Drawer
|
|||||||
{
|
{
|
||||||
title: "Trusted Nodes"
|
title: "Trusted Nodes"
|
||||||
showOnCoreReady: true
|
showOnCoreReady: true
|
||||||
|
icon: "/icons/attach.svg"
|
||||||
}
|
}
|
||||||
ListElement
|
ListElement
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user