Skip to content

Flexible toolbar layout#136

Draft
fllmn wants to merge 1 commit intobarebaric:mainfrom
fllmn:flex-toolbar-poc
Draft

Flexible toolbar layout#136
fllmn wants to merge 1 commit intobarebaric:mainfrom
fllmn:flex-toolbar-poc

Conversation

@fllmn
Copy link
Contributor

@fllmn fllmn commented Feb 8, 2026

Discussed in #135, the toolbar currently sets the minimum width of the application. I'm not convinced this is the best way to solve but I wanted to give Gemini CLI a go (it didn't do that well), anyhow

This collapses the machine controls when the UI is narrowed down.

From
image

To

image

The two issues I see are, machine controls are the most useful buttons (IMO) and making them less accessible is disservice to the user, secondly the "trigger" is based on a fixed width, ~1400px which is always a poor choice as it would have to be updated any time buttons change.

What could be interesting to discuss in case

  1. What buttons should be grouped and hid when width is narrowed down
  2. How can the toolbar manage its width to decide if it needs to collapse to fit the window.

@fllmn fllmn marked this pull request as draft February 8, 2026 22:19
@knipknap
Copy link
Contributor

What buttons should be grouped and hid when width is narrowed down

Right now the buttons are ordered in a "process" order, i.e. left are the icons that are likely to be used when opening the app, then viewing, editing/aligning, then executing. So the order does not indicate importance. I think it should be possible to assign an "importance" to buttons, selectively hiding individual tool buttons.

Another option would be to collapse the "view" icon group into a stack like the one you showed, but only if there is not enough space available.

How can the toolbar manage its width to decide if it needs to collapse to fit the window.

I suspect that the question "is enough space available?" is hard to answer, because the button size depends on the theme, icon, possibly font size, custom CSS, etc. and is not known ahead of time.
It can probably be done with "hacks" that detect overflow after drawing, but that would flicker...

There is also Adw.WrapBox, though a two-line toolbar may also not be ideal...

@knipknap
Copy link
Contributor

knipknap commented Feb 15, 2026

I realized that the problem is actually worse: In your screenshot, in between the machine selector and the WCS selector, that is where machine errors would currently be displayed. So when there is such an error the space limitation is much worse.

So maybe we need another approach entirely, moving the machine selector and errors somewhere else. The control panel would be a candidate, but I prefer to keep that hidden and that would not be good for error displays. The machine selector could also be moved into the title bar, but then where to put the error message... phew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants