Commit graph

3 commits

Author SHA1 Message Date
Ryan McGrath 9446092169
Clean up AutoLayout wrapper.
- Anchors are now enums, which help in debugging constraint issues.

- Enum types that are acceptable for constraint generation are now
  matched at runtime, and provide better error messages if a constraint
  can't be satisfied and crashes the app.

- `left` and `right` anchors are now supported on all widgets, fixing an
  oversight from early iterations of the framework.

- Reduces `unsafe` usage by a decent amount when setting constraint
  pointers for widget types.
2021-03-16 18:21:31 -07:00
Ryan McGrath 696907aa73
Ongoing documentation and cleanup work. 2021-03-15 17:09:50 -07:00
Ryan McGrath a167be8383
More features and cleanup.
- Reconfigured subclass creation, as there was a
  subtle-but-big-when-it-hit bug in the prior method where bridge
  callbacks would lose context of the appropriate delegate when calling
  the trait method. The new approach found in `src/foundation/class.rs`
  maps and caches subclass creation, and subclasses are now more
  apparent when debugging from the Objective-C side as we can carry
  their intended name/usage through. Not applied to all yet, but
  eventually.

- Cleaned up a number of linter warnings that had grown over time.

- Delegate traits now require an associated const `NAME`, which is used
  for subclass creation.

- (macOS) Toolbars now supported setting selected items, which is
  typically used in preferences screens.

- (macOS) Windows now support setting the toolbar display style. On Big
  Sur, this works as intended - it's a noop on older OS's that don't
  support it.

- Support for system icons for macOS preferences windows.

Still a bit to go to flesh this all out, but it's getting there - at
which point then iOS supoort can be folded in easier.
2021-02-07 20:25:56 -08:00