More layout fixes + HLine #281
|
@ -10,7 +10,7 @@ import "../widgets" as Widgets
|
|||
import "../styles"
|
||||
import "../theme"
|
||||
|
||||
ColumnLayout { // peerSettingsPane
|
||||
Column { // peerSettingsPane
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
property bool blocked
|
||||
|
@ -37,72 +37,108 @@ ColumnLayout { // peerSettingsPane
|
|||
Column {
|
||||
id: tehcol
|
||||
width: root.width
|
||||
leftPadding: 10
|
||||
padding:10
|
||||
spacing: 5
|
||||
|
||||
Widgets.EllipsisLabel {
|
||||
color: Theme.mainTextColor
|
||||
text: qsTr("address-label")
|
||||
font.styleName: "ExtraBold"
|
||||
font.pointSize: 15 * gcd.themeScale
|
||||
}
|
||||
|
||||
Widgets.ButtonTextField {
|
||||
id: txtOnion
|
||||
//style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
|
||||
readOnly: true
|
||||
button_text: qsTr("copy-btn")
|
||||
onClicked: {
|
||||
//: notification: copied to clipboard
|
||||
gcd.popup(qsTr("copied-to-clipboard-notification"))
|
||||
txtOnion.selectAll()
|
||||
txtOnion.copy()
|
||||
padding:20
|
||||
spacing: 10
|
||||
GridLayout {
|
||||
columns: 1
|
||||
width:parent.width * 0.95
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
Widgets.EllipsisLabel {
|
||||
anchors.left:parent.left
|
||||
color: Theme.mainTextColor
|
||||
text: qsTr("address-label")
|
||||
font.styleName: "ExtraBold"
|
||||
font.pointSize: 15 * gcd.themeScale
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Widgets.EllipsisLabel {
|
||||
color: Theme.mainTextColor
|
||||
text: qsTr("display-name-label")
|
||||
font.styleName: "ExtraBold"
|
||||
font.pointSize: 15 * gcd.themeScale
|
||||
}
|
||||
|
||||
|
||||
Widgets.ButtonTextField {
|
||||
id: txtDisplayName
|
||||
button_text: qsTr("save-btn")
|
||||
onClicked: {
|
||||
gcd.savePeerSettings(txtOnion.text, txtDisplayName.text)
|
||||
theStack.title = txtDisplayName.text
|
||||
theStack.pane = theStack.messagePane
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Widgets.Button {
|
||||
icon: "solid/hand-paper"
|
||||
text: root.blocked ? qsTr("unblock-btn") : qsTr("block-btn")
|
||||
|
||||
onClicked: {
|
||||
if (root.blocked) {
|
||||
gcd.unblockPeer(txtOnion.text)
|
||||
} else {
|
||||
gcd.blockPeer(txtOnion.text)
|
||||
Widgets.ButtonTextField {
|
||||
id: txtOnion
|
||||
anchors.left:parent.left
|
||||
anchors.right:parent.right
|
||||
readOnly: true
|
||||
button_text: qsTr("copy-btn")
|
||||
onClicked: {
|
||||
//: notification: copied to clipboard
|
||||
gcd.popup(qsTr("copied-to-clipboard-notification"))
|
||||
txtOnion.selectAll()
|
||||
txtOnion.copy()
|
||||
}
|
||||
root.blocked = !root.blocked
|
||||
}
|
||||
}
|
||||
|
||||
Widgets.Button {
|
||||
icon: "regular/trash-alt"
|
||||
text: qsTr("delete-btn")
|
||||
Widgets.HLine{}
|
||||
|
||||
onClicked: {
|
||||
gcd.deleteContact(txtOnion.text)
|
||||
theStack.pane = theStack.emptyPane
|
||||
GridLayout {
|
||||
columns: 1
|
||||
width:parent.width * 0.95
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
Widgets.EllipsisLabel {
|
||||
anchors.left:parent.left
|
||||
color: Theme.mainTextColor
|
||||
text: qsTr("display-name-label")
|
||||
font.styleName: "ExtraBold"
|
||||
font.pointSize: 15 * gcd.themeScale
|
||||
}
|
||||
|
||||
|
||||
Widgets.ButtonTextField {
|
||||
id: txtDisplayName
|
||||
anchors.left:parent.left
|
||||
anchors.right:parent.right
|
||||
button_text: qsTr("save-btn")
|
||||
onClicked: {
|
||||
gcd.savePeerSettings(txtOnion.text, txtDisplayName.text)
|
||||
theStack.title = txtDisplayName.text
|
||||
theStack.pane = theStack.messagePane
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Widgets.HLine{}
|
||||
|
||||
|
||||
GridLayout {
|
||||
columns: 2
|
||||
width:parent.width * 0.95
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
Widgets.EllipsisLabel {
|
||||
color: Theme.mainTextColor
|
||||
text: qsTr("block-btn")
|
||||
font.styleName: "ExtraBold"
|
||||
font.pointSize: 15 * gcd.themeScale
|
||||
}
|
||||
|
||||
Widgets.Button {
|
||||
icon: "solid/hand-paper"
|
||||
text: root.blocked ? qsTr("unblock-btn") : qsTr("block-btn")
|
||||
anchors.right: parent.right
|
||||
onClicked: {
|
||||
if (root.blocked) {
|
||||
gcd.unblockPeer(txtOnion.text)
|
||||
} else {
|
||||
gcd.blockPeer(txtOnion.text)
|
||||
}
|
||||
root.blocked = !root.blocked
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Widgets.HLine{}
|
||||
Column {
|
||||
width:parent.width * 0.95
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
Widgets.Button {
|
||||
icon: "regular/trash-alt"
|
||||
text: qsTr("delete-btn")
|
||||
anchors.right: parent.right
|
||||
|
||||
|
||||
onClicked: {
|
||||
gcd.deleteContact(txtOnion.text)
|
||||
theStack.pane = theStack.emptyPane
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
import QtQuick 2.12
|
||||
import "../theme"
|
||||
|
||||
Column {
|
||||
width: parent.width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
Rectangle {
|
||||
height: 10
|
||||
color:"transparent"
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: 1
|
||||
width: parent.width * 0.95
|
||||
color: Theme.dropShadowColor
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
height: 10
|
||||
color:"transparent"
|
||||
width: parent.width
|
||||
}
|
||||
}
|
Reference in New Issue