mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-24 06:12:25 +03:00
2c8ead4423
This PR adds a streamlined way to consistently construct tab content for items that only have textual content in the tabs. The `Item` trait now has a new `tab_content_text` method that can be used to return the textual content for the tab. The `tab_content` method now has a default implementation that—unless overridden—will construct a `Label` out of the text. This default implementation also takes care of setting the label color based on the active state of the tab, something that previously had to be repeated in each `tab_content` implementation. The majority of our tabs are now using `tab_content_text`. Release Notes: - N/A |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-GPL |