Skip to content

Allow SplitFixed to set the size of the second container #292

@pavel-lexyr

Description

@pavel-lexyr

Issue

As per the documentation,

// SplitFixed sets the size of the first container to be a fixed value
// and makes the second container take up the remaining space.
// When using SplitVertical, the provided size is applied to the new left
// container, the new right container gets the reminder of the size.
// When using SplitHorizontal, the provided size is applied to the new top
// container, the new bottom container gets the reminder of the size.

This allows for simple adaptive design if one wants to fix widgets on the left side or on top of the screen. Fixing a widget on the bottom is comparatively complex, (or entirely simple, but not documented).

It would be a helpful change to allow fixing the second container in splits.

Proposed API change:

container.SplitFixed is to allow numbers from 1-cells to -1 as its argument. Providing it with a number like this fixes the second container to the absolute value of the argument. Values of 0 and cells are preserved as is to maintain backwards compatibility.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions