mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Refactor to use custom buttons
This commit is contained in:
parent
2ef2342363
commit
ab46c8d457
@ -66,37 +66,29 @@ Item
|
|||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: bottomButton.top
|
anchors.bottom: bottomButton.top
|
||||||
model: jsonModel.model
|
model: jsonModel.model
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
spacing: 3
|
||||||
delegate: Item
|
delegate: Item
|
||||||
{
|
{
|
||||||
property bool isOnline: jsonModel.isOnline(model.pgp_id)
|
property bool isOnline: jsonModel.isOnline(model.pgp_id)
|
||||||
height: 54
|
height: 54
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Image
|
ButtonText
|
||||||
{
|
|
||||||
id: statusImage
|
|
||||||
source: isOnline?
|
|
||||||
"icons/state-ok.svg" :
|
|
||||||
"icons/state-offline.svg"
|
|
||||||
|
|
||||||
height: parent.height - 4
|
|
||||||
sourceSize.height: height
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 3
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
Text
|
|
||||||
{
|
{
|
||||||
|
id: locationButton
|
||||||
|
// anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: model.name
|
text: model.name
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
borderRadius:0
|
||||||
anchors.left: statusImage.right
|
iconUrl: isOnline?
|
||||||
anchors.leftMargin: 10
|
"/icons/state-ok.svg" :
|
||||||
font.pixelSize: 15
|
"/icons/state-offline.svg"
|
||||||
}
|
color: "white"
|
||||||
MouseArea
|
pressColor: "lightsteelblue"
|
||||||
{
|
buttonTextPixelSize: 18
|
||||||
anchors.fill: parent
|
iconHeight:parent.height - 4
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
stackView.push(
|
stackView.push(
|
||||||
|
Loading…
Reference in New Issue
Block a user