fix: profile menu seperators

fixes #1991

fix: use secondary color instead
This commit is contained in:
rinzlxr 2021-03-14 18:05:18 +02:00 committed by Iuri Matias
parent 3878b8a662
commit 410851da33
2 changed files with 49 additions and 4 deletions

View File

@ -21,7 +21,48 @@ ScrollView {
spacing: 8
Repeater {
model: ProfileConstants.menuButtons
model: ProfileConstants.mainMenuButtons
delegate: MenuButton {
menuItemId: modelData.id
text: modelData .text
source: "../../../img/profile/" + modelData.filename
active: profileMenu.profileCurrentIndex === modelData.id
Layout.fillWidth: true
width: profileMenu.width
onClicked: function () {
profileMenu.profileCurrentIndex = modelData.id
}
}
}
StyledText {
topPadding: 10
leftPadding: 20
text: "Settings"
color: Style.current.secondaryText
}
Repeater {
model: ProfileConstants.settingsMenuButtons
delegate: MenuButton {
menuItemId: modelData.id
text: modelData .text
source: "../../../img/profile/" + modelData.filename
active: profileMenu.profileCurrentIndex === modelData.id
Layout.fillWidth: true
width: profileMenu.width
onClicked: function () {
profileMenu.profileCurrentIndex = modelData.id
}
}
}
StyledText {
text: " "
}
Repeater {
model: ProfileConstants.extraMenuButtons
delegate: MenuButton {
menuItemId: modelData.id
text: modelData .text

View File

@ -13,7 +13,7 @@ var ADVANCED = 11
var NEED_HELP = 12
var ABOUT = 13
var menuButtons = [{
var mainMenuButtons = [{
"id": PROFILE,
"text": qsTr("My Profile"),
"filename": "myProfile.svg"
@ -25,7 +25,9 @@ var menuButtons = [{
"id": ENS,
"text": qsTr("ENS usernames"),
"filename": "ensUsernames.svg"
}, {
}]
var settingsMenuButtons = [{
"id": PRIVACY_AND_SECURITY,
"text": qsTr("Privacy and security"),
"filename": "security.svg"
@ -61,7 +63,9 @@ var menuButtons = [{
"id": ADVANCED,
"text": qsTr("Advanced"),
"filename": "advanced.svg"
}, {
}]
var extraMenuButtons = [{
"id": NEED_HELP,
"text": qsTr("Need help?"),
"filename": "help.svg"