-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minimise the need to batch operations in
PlainEditor
(#192)
The current design of `PlainEditor` and `PlainEditorTransaction` is that if the editor is accessible, the inner layout is always valid and up-to-date (barring a caught panic in the `transact` method). This is not ideal for Masonry, because it forces event handling to recreate the full layout even if the old version could be reused; this potential reuse is especially prevalent in updates driven by Xilem. This does bring in another change from Masonry, which is `StyleSet`; this is a set of style properties, differentiated by their kind. It can contain at most one font size, line height, etc. This has some potentially unexpected behaviour with `FontStack`s, as in the other APIs they "combine", but in this format they. However, this combining behaviour is not documented as far as I can see, so I think it's reasonable. This implemented using a hashmap of discriminants in the enum. The current API of `Arc<[StyleProperty]>` is horrendously unergonomic. To reflect this change, I've renamed `PlainEditorTxn` to `PlainEditorDriver`. Suggestions for an alternative name are welcome. --------- Co-authored-by: Tom Churchman <[email protected]>
- Loading branch information
Showing
10 changed files
with
819 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.