Are the Adw.ViewSwitcher widgets strictly to be used in header bars?

This is what the docs say about Adw.ViewSwitcher.

AdwViewSwitcher is intended to be used in a header bar together with AdwViewSwitcherBar at the bottom of the window, and a AdwBreakpoint showing the view switcher bar on narrow sizes, while removing the view switcher from the header bar, as follows:

Does it mean I shouldn’t use it anywhere other than in a header bar? Most of the examples I have come across seem to do exactly that.

Heavily depends on context - where do you want to use it in?

Also, in main we have AdwInlineViewSwitcher which is meant to be used in other contexts, tho it’s not in 1.6

1 Like

In the screenshot below, I’m using StackSwitcher. I wanted to change it to ViewSwitcher without necessarily moving it to the header bar. I want it to remain where it is.

Then AdwInlineViewSwitcher is indeed what you want, however it will be available in a stable libadwaita release starting at 1.7 as already said.

1 Like

that said, just move it to the header bar, there’s no point not to given you just hav a title there that says the same exact thing as one of the buttons.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.