mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-16 17:07:14 +03:00
3cdd465226
This PR begins the process of breaking up the `style_helpers!` macro into smaller macros that can be used to generate methods for a related subset of styles. The style method macros also now accept an optional `visibility` parameter to control the visibility of the generated methods. This allows for adding these methods to a struct instead of a just a trait. For example, to expose just the padding styles on a `Facepile` we can do this: ```rs impl Facepile { fn style(&mut self) -> &mut StyleRefinement { self.base.style() } gpui::padding_style_methods!({ visibility: pub }); } ``` Release Notes: - N/A |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-APACHE |