mirror of https://github.com/status-im/StatusQ.git
refactor(StatusAppNavBar): profile nav bar button added
Profile button of type `StatusNavBarTabButton` added to `StatusAppNavBar` and exposed so it can be optionally set from outside of the component.
This commit is contained in:
parent
2ee91475e5
commit
c6893b0c7f
|
@ -21,6 +21,7 @@ Rectangle {
|
|||
property int communityTypeValue: -1
|
||||
property int navBarButtonSpacing: 12
|
||||
|
||||
property StatusNavBarTabButton navBarProfileButton
|
||||
property Component regularNavBarButton
|
||||
property Component communityNavBarButton
|
||||
|
||||
|
@ -30,6 +31,12 @@ Rectangle {
|
|||
signal aboutToUpdateFilteredRegularModel()
|
||||
signal aboutToUpdateFilteredCommunityModel()
|
||||
|
||||
onNavBarProfileButtonChanged: {
|
||||
if (!!navBarProfileButton) {
|
||||
navBarProfileButton.parent = navBarProfileButtonSlot
|
||||
}
|
||||
}
|
||||
|
||||
StatusAppNavBarFilterModel {
|
||||
id: navBarModel
|
||||
|
||||
|
@ -143,9 +150,21 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 48
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottom: navBarProfileButtonSlot.top
|
||||
anchors.bottomMargin: navBarButtonSpacing
|
||||
|
||||
spacing: navBarButtonSpacing
|
||||
|
||||
model: navBarModel
|
||||
}
|
||||
|
||||
Item {
|
||||
id: navBarProfileButtonSlot
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: visible? statusAppNavBar.navBarProfileButton.height : 0
|
||||
width: visible? statusAppNavBar.navBarProfileButton.width : 0
|
||||
visible: !!statusAppNavBar.navBarProfileButton
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: visible ? 32 : 0
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue