ui: Don't break flex layout when using WithRemSize
(#12076)
This PR fixes an issue where the flex hierarchy wasn't getting broken by the use of `WithRemSize`. Release Notes: - N/A
This commit is contained in:
parent
315e45f543
commit
2f3102672c
2 changed files with 8 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
use gpui::{
|
||||
div, AnyElement, Bounds, Div, DivFrameState, Element, ElementId, GlobalElementId, Hitbox,
|
||||
IntoElement, LayoutId, ParentElement, Pixels, WindowContext,
|
||||
IntoElement, LayoutId, ParentElement, Pixels, StyleRefinement, Styled, WindowContext,
|
||||
};
|
||||
|
||||
/// An element that sets a particular rem size for its children.
|
||||
|
@ -18,6 +18,12 @@ impl WithRemSize {
|
|||
}
|
||||
}
|
||||
|
||||
impl Styled for WithRemSize {
|
||||
fn style(&mut self) -> &mut StyleRefinement {
|
||||
self.div.style()
|
||||
}
|
||||
}
|
||||
|
||||
impl ParentElement for WithRemSize {
|
||||
fn extend(&mut self, elements: impl IntoIterator<Item = AnyElement>) {
|
||||
self.div.extend(elements)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue