mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
Merge pull request #2078
74dbe8b
Account/Receive: update design (selsta)
This commit is contained in:
commit
7d9a698732
4 changed files with 78 additions and 60 deletions
|
@ -169,7 +169,7 @@ Rectangle {
|
||||||
}, State {
|
}, State {
|
||||||
name: "Account"
|
name: "Account"
|
||||||
PropertyChanges { target: root; currentView: accountView }
|
PropertyChanges { target: root; currentView: accountView }
|
||||||
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
|
PropertyChanges { target: mainFlickable; contentHeight: accountView.accountHeight + 100 }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ function addressTruncate(address, range){
|
||||||
function addressTruncatePretty(address, blocks){
|
function addressTruncatePretty(address, blocks){
|
||||||
if(typeof(address) === "undefined") return;
|
if(typeof(address) === "undefined") return;
|
||||||
if(typeof(blocks) === "undefined") blocks = 2;
|
if(typeof(blocks) === "undefined") blocks = 2;
|
||||||
|
blocks = blocks <= 1 ? 1 : blocks >= 23 ? 23 : blocks;
|
||||||
var ret = "";
|
var ret = "";
|
||||||
return address.substring(0, 4 * blocks).match(/.{1,4}/g).join(' ') + " .. " + address.substring(address.length - 4 * blocks).match(/.{1,4}/g).join(' ');
|
return address.substring(0, 4 * blocks).match(/.{1,4}/g).join(' ') + " .. " + address.substring(address.length - 4 * blocks).match(/.{1,4}/g).join(' ');
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,7 @@ Rectangle {
|
||||||
|
|
||||||
MoneroComponents.LabelSubheader {
|
MoneroComponents.LabelSubheader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
fontSize: 24
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
text: qsTr("Balance All") + translationManager.emptyString
|
text: qsTr("Balance All") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
@ -91,14 +92,15 @@ Rectangle {
|
||||||
text: qsTr("Total balance: ") + translationManager.emptyString
|
text: qsTr("Total balance: ") + translationManager.emptyString
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
font.pixelSize: 14
|
font.pixelSize: 16
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: balanceAll
|
id: balanceAll
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
font.pixelSize: 14
|
font.pixelSize: 16
|
||||||
color: MoneroComponents.Style.dimmedFontColor
|
color: MoneroComponents.Style.dimmedFontColor
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
|
|
||||||
|
@ -124,15 +126,15 @@ Rectangle {
|
||||||
text: qsTr("Total unlocked balance: ") + translationManager.emptyString
|
text: qsTr("Total unlocked balance: ") + translationManager.emptyString
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
font.pixelSize: 14
|
font.pixelSize: 16
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: unlockedBalanceAll
|
id: unlockedBalanceAll
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
font.pixelSize: 14
|
font.pixelSize: 16
|
||||||
color: MoneroComponents.Style.dimmedFontColor
|
color: MoneroComponents.Style.dimmedFontColor
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
|
|
||||||
|
@ -158,6 +160,7 @@ Rectangle {
|
||||||
|
|
||||||
MoneroComponents.LabelSubheader {
|
MoneroComponents.LabelSubheader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
fontSize: 24
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
text: qsTr("Accounts") + translationManager.emptyString
|
text: qsTr("Accounts") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
@ -177,6 +180,7 @@ Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
clip: true
|
clip: true
|
||||||
boundsBehavior: ListView.StopAtBounds
|
boundsBehavior: ListView.StopAtBounds
|
||||||
|
interactive: false
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
id: tableItem2
|
id: tableItem2
|
||||||
|
@ -212,8 +216,7 @@ Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 6
|
anchors.leftMargin: 6
|
||||||
fontSize: 14
|
fontSize: 16
|
||||||
fontBold: true
|
|
||||||
text: "#" + index
|
text: "#" + index
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
@ -224,8 +227,7 @@ Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: idLabel.right
|
anchors.left: idLabel.right
|
||||||
anchors.leftMargin: 6
|
anchors.leftMargin: 6
|
||||||
fontSize: 14
|
fontSize: 16
|
||||||
fontBold: true
|
|
||||||
text: label
|
text: label
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
textWidth: addressLabel.x - nameLabel.x - 1
|
textWidth: addressLabel.x - nameLabel.x - 1
|
||||||
|
@ -236,25 +238,37 @@ Rectangle {
|
||||||
id: addressLabel
|
id: addressLabel
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: balanceLabel.left
|
anchors.left: mainLayout.width >= 590 ? balanceTextLabel.left : balanceNumberLabel.left
|
||||||
anchors.leftMargin: (mainLayout.width < 510 ? -70 : -125)
|
anchors.leftMargin: -addressLabel.width - 30
|
||||||
fontSize: 14
|
fontSize: 16
|
||||||
fontBold: true
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
text: TxUtils.addressTruncate(address, mainLayout.width < 510 ? 3 : 6)
|
text: TxUtils.addressTruncatePretty(address, mainLayout.width < 740 ? 1 : (mainLayout.width < 900 ? 2 : 3))
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
id: balanceLabel
|
id: balanceTextLabel
|
||||||
|
visible: mainLayout.width >= 590
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.left: balanceNumberLabel.left
|
||||||
|
anchors.leftMargin: -balanceTextLabel.width - 5
|
||||||
|
fontSize: 16
|
||||||
|
text: qsTr("Balance: ") + translationManager.emptyString
|
||||||
|
themeTransition: false
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: balanceNumberLabel
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.right
|
anchors.left: parent.right
|
||||||
anchors.leftMargin: (mainLayout.width < 510 ? -120 : -180)
|
anchors.leftMargin: -balanceNumberLabel.width
|
||||||
fontSize: 14
|
fontSize: 16
|
||||||
fontBold: true
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
text: qsTr("Balance: ") + balance
|
text: balance
|
||||||
elide: mainLayout.width < 510 ? Text.ElideRight : Text.ElideNone
|
elide: Text.ElideRight
|
||||||
textWidth: 120
|
textWidth: mainLayout.width < 660 ? 70 : 135
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +353,7 @@ Rectangle {
|
||||||
border: false
|
border: false
|
||||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||||
fontSize: 14
|
fontSize: 16
|
||||||
iconOnTheLeft: true
|
iconOnTheLeft: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
|
|
|
@ -84,6 +84,7 @@ Rectangle {
|
||||||
|
|
||||||
MoneroComponents.LabelSubheader {
|
MoneroComponents.LabelSubheader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
fontSize: 24
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
text: qsTr("Addresses") + translationManager.emptyString
|
text: qsTr("Addresses") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
@ -103,6 +104,8 @@ Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
clip: true
|
clip: true
|
||||||
boundsBehavior: ListView.StopAtBounds
|
boundsBehavior: ListView.StopAtBounds
|
||||||
|
interactive: false
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
id: tableItem2
|
id: tableItem2
|
||||||
height: subaddressListRow.subaddressListItemHeight
|
height: subaddressListRow.subaddressListItemHeight
|
||||||
|
@ -137,8 +140,7 @@ Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 6
|
anchors.leftMargin: 6
|
||||||
fontSize: 14
|
fontSize: 16
|
||||||
fontBold: true
|
|
||||||
text: "#" + index
|
text: "#" + index
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
@ -149,8 +151,7 @@ Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: idLabel.right
|
anchors.left: idLabel.right
|
||||||
anchors.leftMargin: 6
|
anchors.leftMargin: 6
|
||||||
fontSize: 14
|
fontSize: 16
|
||||||
fontBold: true
|
|
||||||
text: label
|
text: label
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
textWidth: addressLabel.x - nameLabel.x - 1
|
textWidth: addressLabel.x - nameLabel.x - 1
|
||||||
|
@ -162,10 +163,10 @@ Rectangle {
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.right
|
anchors.left: parent.right
|
||||||
anchors.leftMargin: (mainLayout.width < 510 ? -130 : -190)
|
anchors.leftMargin: -addressLabel.width - 5
|
||||||
fontSize: 14
|
fontSize: 16
|
||||||
fontBold: true
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
text: TxUtils.addressTruncate(address, mainLayout.width < 510 ? 6 : 10)
|
text: TxUtils.addressTruncatePretty(address, mainLayout.width < 520 ? 1 : (mainLayout.width < 650 ? 2 : 3))
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,17 +180,20 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 6
|
||||||
|
height: 21
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
MoneroComponents.IconButton {
|
MoneroComponents.IconButton {
|
||||||
id: renameButton
|
id: renameButton
|
||||||
image: "qrc:///images/edit.svg"
|
image: "qrc:///images/edit.svg"
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
Layout.preferredWidth: 23
|
||||||
anchors.right: parent.right
|
Layout.preferredHeight: 21
|
||||||
anchors.rightMargin: 30
|
|
||||||
anchors.topMargin: 1
|
|
||||||
width: 23
|
|
||||||
height: 21
|
|
||||||
visible: index !== 0
|
visible: index !== 0
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -202,10 +206,8 @@ Rectangle {
|
||||||
image: "qrc:///images/copy.svg"
|
image: "qrc:///images/copy.svg"
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
Layout.preferredWidth: 16
|
||||||
anchors.right: parent.right
|
Layout.preferredHeight: 21
|
||||||
width: 16
|
|
||||||
height: 21
|
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Address copied to clipboard");
|
console.log("Address copied to clipboard");
|
||||||
|
@ -214,6 +216,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
onCurrentItemChanged: {
|
onCurrentItemChanged: {
|
||||||
// reset global vars
|
// reset global vars
|
||||||
appWindow.current_subaddress_table_index = subaddressListView.currentIndex;
|
appWindow.current_subaddress_table_index = subaddressListView.currentIndex;
|
||||||
|
@ -242,7 +245,7 @@ Rectangle {
|
||||||
border: false
|
border: false
|
||||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||||
fontSize: 14
|
fontSize: 16
|
||||||
iconOnTheLeft: true
|
iconOnTheLeft: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
|
|
Loading…
Reference in a new issue