News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Enforce new line in toolbars?

Started by FLN, April 05, 2025, 09:30:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FLN

Does anybody know, if and how line breaks can be enforced in toolbars?
Can a line break be defined in menuconf.tab, similar like placing a'\n' in texts?

Thank you for your help  :)

Leartin

As far as I know, the toolbars break in two cases:
- if the screen width does not support the full width of the toolbar in one line
- if the theme sets toolbar_max_width

I am not aware of an ability to set specific breakpoints in the definition, though it sounds like a reasonable request to make toolbars behave like text and break at 'spaces' if possible, to keep similar objects (all ways, all bridges, all signals, all stations...) together.

FLN

Quote from: Leartin on April 05, 2025, 09:47:43 AMAs far as I know, the toolbars break in two cases:
- if the screen width does not support the full width of the toolbar in one line
- if the theme sets toolbar_max_width

I am not aware of an ability to set specific breakpoints in the definition
Thank you Leartin.

Quote from: Leartin on April 05, 2025, 09:47:43 AMto make toolbars behave like text and break at 'spaces' if possible, to keep similar objects (all ways, all bridges, all signals, all stations...) together.
I suspected similar objects to stay grouped anyway, as they mostly referred at once in the menuconf.tab, but testing it right now, I can confirm, that individual icons break regardless of how they where referenced.
Too, I agree on defined breakpoints between such groups would make broken-up menus look more intuitive.
I think the already existing "spaces", empty toolbar-declarations ([X][Y]=- ), would be good natural breakpoints for this purpose. What do you think?


The reason I'm asking, is my intention to have one custom toolbar with all my favorite toolbars integrated -so to say- and have rail, road, slope and special tools, each in their own line.

I thought, there may be a symbol or command in the system, which could provoke this behavior, without the need of having to code something.

PS:
Why wouldn't I just click the 4 times to have the respective toolbars at hand?
Cause frequently loosing synchronization and having to put up my preferred "environment" up first every time gets annoying with time  :laugh:
(plus it's handy to have a custom toolbar  ;) )

Leartin

Quote from: FLN on April 05, 2025, 10:46:49 AMI think the already existing "spaces", empty toolbar-declarations ([X][Y]=- ), would be good natural breakpoints for this purpose. What do you think?
Some of those are perfect and could not just indicate, but be replaced by line breaks. But some contain custom graphics which should not be removed or split from the section they belong to, and conversely it shouldn't be a requirement to have spaces to define break-points. Ideally, you'd have spaces, non-breaking-spaces, and non-spacing-breakpoints.


Isaac Eiland-Hall

User-resizable toolbars has long been an extension request I never made because it seems trivial, but it would be nice. You can force it by resizing the entire window and then bringing up a toolbar, last time I messed with this. But of course being able to resize the toolbar itself would allow easier customization of the size. :)