Skip to content

Remove clip_rect_margin #5605

@emilk

Description

@emilk

It's an ugly hack. To remove it we need to use Frame for all widgets, and remove expansion.

Example problem: expansion in ScrollArea.

You put a button inside a ScrollArea. The stroke of the button touches the inside of the ScrollArea. The user hovers the button, and it now expand (due to expansion). Should the button now draw outside the ScrollArea? Or clip and look ugly? Neither solution is great.

Alternative solutions:

  • Add a inner_margin (maybe a full Frame) to each ScrollArea (something the button can expand into). That means the content of a ScrollArea is not aligned with the content of the parent (for inner_margin > 0).
  • Add an outer_margin to every widget (something the button can expand into). Very similar in effect to the above.
  • Forbid expansion (sad, but 🤷)
  • …?

Whatever solution we go to, I think we still should be able to easily configure both the inner and outer margin of both ScrollArea and Button, so the solution ties cleosly to

Metadata

Metadata

Assignees

No one assigned

    Labels

    eguistylevisuals and theming

    Projects

    Status

    Next up

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions