fix: improve profile sections min width and scaling

This commit is contained in:
Jonathan Rainville 2021-04-08 11:44:58 -04:00 committed by Iuri Matias
parent 3fe9f6c6b8
commit bf67c941ff
21 changed files with 328 additions and 294 deletions

View File

@ -6,8 +6,8 @@ import "../../../shared"
import "./Sections"
SplitView {
property int contentMargin: 120
property int contentMaxWidth: 624
property int contentMinWidth: 450
property int topMargin: 46
property alias changeProfileSection: leftTab.changeProfileSection
@ -34,6 +34,8 @@ SplitView {
}
StackLayout {
property int profileContentWidth: Math.max(contentMinWidth, Math.min(profileContainer.width * 0.8, contentMaxWidth))
id: profileContainer
anchors.top: parent.top
anchors.topMargin: 0

View File

@ -9,13 +9,14 @@ Item {
id: aboutContainer
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
Column {
id: generalColumn
spacing: Style.current.bigPadding
anchors.top: parent.top
anchors.topMargin: 46
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
StatusSectionDescItem {

View File

@ -10,12 +10,14 @@ Item {
id: advancedContainer
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
Column {
id: generalColumn
anchors.top: parent.top
anchors.topMargin: topMargin
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
StatusSettingsLineButton {

View File

@ -37,7 +37,8 @@ ScrollView {
Item {
id: appearanceContainer
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
height: this.childrenRect.height + 100

View File

@ -10,6 +10,7 @@ Item {
id: root
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
property Component dappListPopup: DappList {
onClosed: destroy()
@ -22,7 +23,8 @@ Item {
anchors.top: parent.top
anchors.topMargin: topMargin
anchors.bottom: parent.bottom
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
Column {

View File

@ -12,12 +12,14 @@ Item {
property bool isPending: false
height: parent.height
Layout.fillWidth: true
clip: true
Item {
anchors.top: parent.top
anchors.topMargin: 32
anchors.bottom: parent.bottom
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
SearchBox {

View File

@ -14,6 +14,7 @@ Item {
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
Item {
id: firstTimeSetup

View File

@ -24,8 +24,14 @@ Item {
property int timestamp: 1577872140
function shouldDisplayExampleMessage(){
return profileModel.ens.rowCount() > 0 && profileModel.ens.pendingLen() != profileModel.ens.rowCount() && profileModel.ens.preferredUsername !== ""
return profileModel.ens.rowCount() > 0 && profileModel.ens.pendingLen() !== profileModel.ens.rowCount() && profileModel.ens.preferredUsername !== ""
}
anchors.fill: parent
Item {
anchors.top: parent.top
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
Component {
id: statusENS
@ -327,3 +333,4 @@ Item {
}
}
}
}

View File

@ -60,7 +60,7 @@ Item {
onClosed: {
transactionDialog.closed()
}
ensUsername: ensUsername.text
ensUsername: ensUsername.text || ""
width: 400
height: 400
}
@ -69,7 +69,7 @@ Item {
Item {
id: ensContainer
anchors.top: parent.top
width: 624
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
Rectangle {
@ -245,7 +245,9 @@ Item {
id: validationResult
text: validationMessage
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
anchors.top: ensTypeRect.bottom
wrapMode: Text.WordWrap
anchors.topMargin: Style.current.bigPadding
}
}

View File

@ -22,7 +22,7 @@ Item {
Item {
id: contentItem
width: 624
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
Image {

View File

@ -10,6 +10,7 @@ Item {
id: ensContainer
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
property bool showSearchScreen: false
property string addedUsername: ""

View File

@ -9,7 +9,7 @@ Item {
id: helpContainer
height: parent.height
Layout.fillWidth: true
clip: true
ScrollView {
height: parent.height
@ -20,7 +20,8 @@ Item {
id: glossary
anchors.top: parent.top
height: this.childrenRect.height
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
StatusSectionHeadline {
@ -126,7 +127,8 @@ Item {
anchors.top: glossary.bottom
anchors.topMargin: Style.current.bigPadding * 2
height: this.childrenRect.height
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
StyledText {

View File

@ -10,6 +10,7 @@ Item {
id: languageContainer
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
property Component languagePopup: LanguageModal {}
@ -17,7 +18,8 @@ Item {
anchors.top: parent.top
anchors.topMargin: topMargin
anchors.bottom: parent.bottom
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
Column {

View File

@ -12,6 +12,7 @@ Item {
id: profileHeaderContent
anchors.fill: parent
clip: true
Component {
id: changeProfileModalComponent
@ -22,7 +23,8 @@ Item {
id: profileImgNameContainer
anchors.top: parent.top
anchors.topMargin: 64
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
height: this.childrenRect.height

View File

@ -15,7 +15,7 @@ ScrollView {
Item {
id: notificationsContainer
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
height: this.childrenRect.height + 100

View File

@ -10,12 +10,14 @@ Item {
id: privacyContainer
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
Column {
id: containerColumn
anchors.top: parent.top
anchors.topMargin: topMargin
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
StatusSectionHeadline {

View File

@ -11,6 +11,7 @@ Item {
height: 200
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
StyledText {
id: txtTitle

View File

@ -9,9 +9,11 @@ Item {
id: soundsContainer
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
Item {
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
StyledText {

View File

@ -9,9 +9,11 @@ Item {
id: syncContainer
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
Item {
width: contentMaxWidth
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
Component {
@ -19,7 +21,7 @@ Item {
StatusRadioButton {
text: name
checked: name == profileModel.mailservers.activeMailserver
checked: name === profileModel.mailservers.activeMailserver
onClicked: {
if (checked) {
profileModel.mailservers.setMailserver(name);

View File

@ -135,7 +135,7 @@ QtObject {
readonly property string ens_taken: "taken"
readonly property string ens_taken_custom: "taken-custom"
readonly property string ens_owned: "owned"
readonly property string ens_availabe: "available"
readonly property string ens_available: "available"
readonly property string ens_already_connected: "already-connected"
readonly property string ens_connected: "connected"
readonly property string ens_connected_dkey: "connected-different-key"

View File

@ -24,7 +24,7 @@ ApplicationWindow {
Universal.theme: Universal.System
id: applicationWindow
minimumWidth: 800
minimumWidth: 900
minimumHeight: 600
width: 1232
height: 770