diff --git a/ui/StatusQ/src/StatusQ/Layout/StatusAppNavBar.qml b/ui/StatusQ/src/StatusQ/Layout/StatusAppNavBar.qml index 393ece0e55..400583eb91 100644 --- a/ui/StatusQ/src/StatusQ/Layout/StatusAppNavBar.qml +++ b/ui/StatusQ/src/StatusQ/Layout/StatusAppNavBar.qml @@ -10,6 +10,8 @@ Rectangle { id: statusAppNavBar property StatusNavBarTabButton navBarChatButton + property StatusNavBarTabButton navBarProfileButton + property list navBarTabButtons property alias navBarCommunityTabButtons: navBarCommunityTabButtons @@ -34,6 +36,12 @@ Rectangle { } } + onNavBarProfileButtonChanged: { + if (!!navBarProfileButton) { + navBarProfileButton.parent = navBarProfileButtonSlot + } + } + onNavBarTabButtonsChanged: { if (navBarTabButtons.length) { for (let idx in navBarTabButtons) { @@ -75,7 +83,9 @@ Rectangle { if (navBarContentHeight > statusAppNavBar.height) { height = statusAppNavBar.height - statusAppNavBar.navBarContentHeightWithoutCommunityButtons - - (!!navBarTabButtonsSlot.anchors.bottom ? navBarTabButtonsSlot.anchors.bottomMargin : navBarTabButtonsSlot.anchors.topMargin) + (!!navBarTabButtonsSlot.anchors.bottom ? navBarTabButtonsSlot.anchors.bottomMargin : navBarTabButtonsSlot.anchors.topMargin) - + navBarProfileButtonSlot.height - + navBarProfileButtonSlot.anchors.bottomMargin bottomPadding = 16 topPadding = 16 } else { @@ -122,7 +132,7 @@ Rectangle { if (navBarContentHeight > statusAppNavBar.height) { anchors.top = undefined anchors.topMargin = 0 - anchors.bottom = statusAppNavBar.bottom + anchors.bottom = navBarProfileButtonSlot.top anchors.bottomMargin = 32 } else { anchors.bottom = undefined @@ -132,5 +142,15 @@ Rectangle { } } } + + 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 + } }