From 6ca24d33cb01ae0e04f3ea56d32fb9900a335460 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Wed, 11 May 2022 11:15:31 +0200 Subject: [PATCH] feat(@StatusAppNavBar): Add qr scan button --- .../src/StatusQ/Layout/StatusAppNavBar.qml | 18 ++++++++++++++++++ ui/StatusQ/src/assets/img/icons/qr-scan.svg | 7 +++++++ 2 files changed, 25 insertions(+) create mode 100644 ui/StatusQ/src/assets/img/icons/qr-scan.svg diff --git a/ui/StatusQ/src/StatusQ/Layout/StatusAppNavBar.qml b/ui/StatusQ/src/StatusQ/Layout/StatusAppNavBar.qml index 631836f4f4..d971383a23 100644 --- a/ui/StatusQ/src/StatusQ/Layout/StatusAppNavBar.qml +++ b/ui/StatusQ/src/StatusQ/Layout/StatusAppNavBar.qml @@ -21,6 +21,7 @@ Rectangle { property int communityTypeValue: -1 property int navBarButtonSpacing: 12 + property StatusNavBarTabButton navBarCameraButton property StatusNavBarTabButton navBarProfileButton property Component regularNavBarButton property Component communityNavBarButton @@ -37,6 +38,12 @@ Rectangle { } } + onNavBarCameraButtonChanged: { + if (!!navBarCameraButton) { + navBarCameraButton.parent = navBarCameraButtonSlot + } + } + function triggerUpdate(){ navBarModel.update() } @@ -162,6 +169,17 @@ Rectangle { model: navBarModel } + Item { + id: navBarCameraButtonSlot + anchors.horizontalCenter: parent.horizontalCenter + height: visible? statusAppNavBar.navBarProfileButton.height : 0 + width: visible? statusAppNavBar.navBarProfileButton.width : 0 + visible: !!statusAppNavBar.navBarCameraButton + anchors.bottom: navBarProfileButtonSlot.visible ? navBarProfileButtonSlot.top : parent.bottom + anchors.bottomMargin: visible ? 12 : 0 + } + + Item { id: navBarProfileButtonSlot anchors.horizontalCenter: parent.horizontalCenter diff --git a/ui/StatusQ/src/assets/img/icons/qr-scan.svg b/ui/StatusQ/src/assets/img/icons/qr-scan.svg new file mode 100644 index 0000000000..e21a6d2d91 --- /dev/null +++ b/ui/StatusQ/src/assets/img/icons/qr-scan.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file