fix: fix QML warnings + some UI fixes to match the design

This commit is contained in:
Jonathan Rainville 2021-01-14 15:09:07 -05:00 committed by Iuri Matias
parent f2eda36569
commit 8462c1c013
4 changed files with 250 additions and 243 deletions

View File

@ -142,9 +142,9 @@ Item {
Separator {
id: communitySep
visible: communitiesListLoader.active
anchors.top: visible ? communitiesListLoader.bottom : 0
anchors.topMargin: Style.current.halfPadding
visible: communitiesListLoader.active && communitiesListLoader.height > 0
anchors.top: communitiesListLoader.bottom
anchors.topMargin: visible ? Style.current.halfPadding : 0
}
ChannelList {

View File

@ -9,17 +9,23 @@ import "./Contacts"
Item {
id: contactsContainer
property alias searchStr: searchBox.text
property bool isPending: false
height: parent.height
Layout.fillWidth: true
Item {
anchors.top: parent.top
anchors.topMargin: 32
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: contentMargin
anchors.left: parent.left
anchors.leftMargin: contentMargin
property alias searchStr: searchBox.text
property bool isPending: false
SearchBox {
id: searchBox
anchors.top: parent.top
anchors.topMargin: 32
fontPixelSize: 15
}
@ -211,7 +217,7 @@ Item {
disabled: !contactToAddInfo.visible
anchors.bottom: parent.bottom
onClicked: {
profileModel.contacts.addContact(profileModel.contacts.contactToAddPubKey);
profileModel.addContact(profileModel.contacts.contactToAddPubKey);
addContactModal.close()
}
}
@ -259,6 +265,7 @@ Item {
}
}
}
}
/*##^##
Designer {

View File

@ -31,9 +31,10 @@ Rectangle {
border.width: 1
radius: Style.current.padding
width: 255
height: childrenRect.height + Style.current.padding
height: shareYourMindText.height + Style.current.padding
StyledText {
id: shareYourMindText
horizontalAlignment: Text.AlignHCenter
anchors.left: parent.left
anchors.leftMargin: Style.current.halfPadding

View File

@ -14,7 +14,7 @@ ScrollView {
id: root
Layout.fillWidth: true
Layout.fillHeight: true
contentHeight: timelineContainer.height + 40
contentHeight: chatLogView.contentHeight + 40
clip: true
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
@ -59,13 +59,12 @@ ScrollView {
}
}
Rectangle {
Item {
id: timelineContainer
width: 624
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
height: childrenRect.height
color: "transparent"
anchors.bottom: parent.bottom
StatusChatInput {
id: statusUpdateInput
@ -99,11 +98,11 @@ ScrollView {
ListView {
id: chatLogView
anchors.top: statusUpdateInput.bottom
anchors.topMargin: 40
anchors.topMargin: Style.current.bigPadding
anchors.left: parent.left
anchors.right: parent.right
height: childrenRect.height + 40
spacing: 10
anchors.bottom: parent.bottom
spacing: Style.current.halfPadding
flickDeceleration: 10000
interactive: false