Skip to content

Improve AppKitBackend layout system integration #207

Open
@stackotter

Description

@stackotter

At the moment, AppKitBackend encodes all of its layout decisions as constant layout constraints (with exact pixel values). This is probably a bit inefficient, but more importantly, it doesn't interact very nicely with macOS's generally smooth window resizing. We kind of end up in this situation where AppKit notifies AppKitBackend that the window has resized while also solving the existing pixel-perfect constraints. We then go through and update the constraints in one or more passes, and then AppKit has to compute the layout again.

The recommended way to side step auto layout and implement custom layout algorithms is to override NSView.layout(). We should look into doing so. If that works out well, we'll want to try and figure out how to do a similar thing for the other backends (especially GtkBackend and Gtk3Backend which currently have kind of bad layout performance, inherited from Gtk).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions