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.bottom: bottomButton.top
|
||||
model: jsonModel.model
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 3
|
||||
delegate: Item
|
||||
{
|
||||
property bool isOnline: jsonModel.isOnline(model.pgp_id)
|
||||
height: 54
|
||||
width: parent.width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
Image
|
||||
{
|
||||
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
|
||||
ButtonText
|
||||
{
|
||||
id: locationButton
|
||||
// anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: model.name
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: statusImage.right
|
||||
anchors.leftMargin: 10
|
||||
font.pixelSize: 15
|
||||
}
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
borderRadius:0
|
||||
iconUrl: isOnline?
|
||||
"/icons/state-ok.svg" :
|
||||
"/icons/state-offline.svg"
|
||||
color: "white"
|
||||
pressColor: "lightsteelblue"
|
||||
buttonTextPixelSize: 18
|
||||
iconHeight:parent.height - 4
|
||||
|
||||
onClicked:
|
||||
{
|
||||
stackView.push(
|
||||
|
Loading…
Reference in New Issue
Block a user