Skip to content

It should be possible for a window to get its size from its contents #1246

@insignification

Description

@insignification

Currently, it seems that a window determines its size based on the value passed to it by the user and then forces its contents to be laid out within that size.

However, it's often more useful and convenient to do it the other way around: The window should use the usual box layout methods on its content to determine the best size for itself within the usual constraints (which should be user-settable on the window).
Whether to do this, of course, should be an option settable on the window.

Furthermore, there should be separate options to control whether this size can grow and/or shrink in response to future layouts.
This way, it's possible to have a completely dynamically sized window, where showing/hiding UI (for example) inside the window will automatically grow/shrink the window as well.

(I know druid is WIP, but I like it and I didn't see a way to do this nor an existing issue on it, so I've though to open one)

Metadata

Metadata

Assignees

No one assigned

    Labels

    D-Hardis a tricky problem and likely requires extensive planningenhancementadds or requests a new featurehelp wantedhas no one working on it yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions