status-desktop/ui/StatusQ/sandbox
Pascal Precht a1e721bfc3 feat(Layout): introduce StatusAppNavBar
This commit introduces a new `StatusAppNavBar` component that can be used
to create a Status application's tab bar for dedicated tab sections such as
chat, profile, wallet etc.

The component is build in a way that it support declarative and imperative usage
where necessary.

In its most simple form, a `StatusAppNavBar` comes with a single tab button
for the chat section. Such button has to be of type `StatusNavBarTabButton`:

```qml
import StatusQ.Layout 0.1

StatusAppNavBar {
    navBarChatButton: StatusNavBarTabButton {
        icon.name: "chat"
        badge.value: 33
        badge.visible: true
        tooltip.text: "Chat"
    }
}
```

In addition, it's possible to specify a list of `StatusNavBarTabButton` for
other sections of the application using the `navBarTabButtons` property:

```qml

StatusAppNavBar {
    ...
    navBarTabButtons: [
        StatusNavBarTabButton {
            icon.name: "wallet"
            tooltip.text: "Wallet"
        },
        StatusNavBarTabButton {
            icon.name: "browser"
            tooltip.text: "Browser"
        },
        StatusNavBarTabButton {
            icon.name: "status-update"
            tooltip.text: "Timeline"
        }
    ]
}
```

Lastly, when desired to render tabs for Status community, which can grow
in size, `StatusAppNavBar` exposes a list via the `navBarCommunityTabButtons`
property that can have a `model` and a `delegate`. The `delegate` should also
be a `StatusNavBarTabButton`:

```qml

StatusAppNavBar {
    ...
    navBarCommunityTabButtons.model: someModel.communities

    navBarCommunityTabButtons.delegate: StatusNavBarTabButton {
        name: model.name
        tooltip.text: model.name
        anchors.horizontalCenter: parent.horizontalCenter
    }
}
```

The amount of community tab buttons can grow as they need until their dedicated
area becomes scrollable, at which point all `navBarTabButtons` will stick to the
bottom of `StatusAppNavBar`.

Closes #18
2022-09-21 18:20:02 +02:00
..
Buttons.qml feat:Add buttons components 2022-09-21 18:20:02 +02:00
Controls.qml feat(Controls): introduce StatusNavBarTabButton 2022-09-21 18:20:02 +02:00
Icons.qml feat: Set up catalog app (sandbox) 2022-09-21 18:20:01 +02:00
Layout.qml feat(Layout): introduce StatusAppNavBar 2022-09-21 18:20:02 +02:00
Others.qml feat(Components): introduce StatusBadge component 2022-09-21 18:20:02 +02:00
handler.cpp feat: Set up catalog app (sandbox) 2022-09-21 18:20:01 +02:00
handler.h feat: Set up catalog app (sandbox) 2022-09-21 18:20:01 +02:00
main.cpp feat: Set up catalog app (sandbox) 2022-09-21 18:20:01 +02:00
main.qml feat(Layout): introduce StatusAppNavBar 2022-09-21 18:20:02 +02:00
qml.qrc feat:Add buttons components 2022-09-21 18:20:02 +02:00
sandbox.pro feat:Add buttons components 2022-09-21 18:20:02 +02:00
sandboxapp.cpp chore: remove title bar example 2022-09-21 18:20:02 +02:00
sandboxapp.h chore: remove title bar example 2022-09-21 18:20:02 +02:00
sandboxapp_mac.mm chore: remove title bar example 2022-09-21 18:20:02 +02:00