mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 15:44:31 +03:00
Use Flexible
in file finder and theme switcher instead of Expanded
This commit is contained in:
parent
776f7dd5a9
commit
4c7eaaebb1
@ -150,6 +150,8 @@ where
|
|||||||
for item in &mut items {
|
for item in &mut items {
|
||||||
item.layout(item_constraint, cx);
|
item.layout(item_constraint, cx);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
size = constraint.min;
|
||||||
}
|
}
|
||||||
|
|
||||||
(
|
(
|
||||||
|
@ -210,7 +210,9 @@ impl StackingContext {
|
|||||||
clip_bounds
|
clip_bounds
|
||||||
.intersection(parent_clip_bounds.unwrap_or(clip_bounds))
|
.intersection(parent_clip_bounds.unwrap_or(clip_bounds))
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
|
if !clip_bounds.is_empty() {
|
||||||
log::warn!("specified clip bounds are disjoint from parent layer");
|
log::warn!("specified clip bounds are disjoint from parent layer");
|
||||||
|
}
|
||||||
RectF::default()
|
RectF::default()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -87,7 +87,7 @@ impl View for FileFinder {
|
|||||||
Container::new(
|
Container::new(
|
||||||
Flex::new(Axis::Vertical)
|
Flex::new(Axis::Vertical)
|
||||||
.with_child(ChildView::new(self.query_editor.id()).boxed())
|
.with_child(ChildView::new(self.query_editor.id()).boxed())
|
||||||
.with_child(Expanded::new(1.0, self.render_matches()).boxed())
|
.with_child(Flexible::new(1.0, self.render_matches()).boxed())
|
||||||
.boxed(),
|
.boxed(),
|
||||||
)
|
)
|
||||||
.with_style(&settings.theme.selector.container)
|
.with_style(&settings.theme.selector.container)
|
||||||
@ -173,7 +173,7 @@ impl FileFinder {
|
|||||||
.boxed(),
|
.boxed(),
|
||||||
)
|
)
|
||||||
.with_child(
|
.with_child(
|
||||||
Expanded::new(
|
Flexible::new(
|
||||||
1.0,
|
1.0,
|
||||||
Flex::column()
|
Flex::column()
|
||||||
.with_child(
|
.with_child(
|
||||||
|
@ -9,10 +9,7 @@ use crate::{
|
|||||||
};
|
};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
action,
|
action,
|
||||||
elements::{
|
elements::*,
|
||||||
Align, ChildView, ConstrainedBox, Container, Expanded, Flex, Label, ParentElement,
|
|
||||||
UniformList, UniformListState,
|
|
||||||
},
|
|
||||||
keymap::{self, menu, Binding},
|
keymap::{self, menu, Binding},
|
||||||
AppContext, Axis, Element, ElementBox, Entity, MutableAppContext, RenderContext, View,
|
AppContext, Axis, Element, ElementBox, Entity, MutableAppContext, RenderContext, View,
|
||||||
ViewContext, ViewHandle,
|
ViewContext, ViewHandle,
|
||||||
@ -283,7 +280,7 @@ impl View for ThemeSelector {
|
|||||||
Container::new(
|
Container::new(
|
||||||
Flex::new(Axis::Vertical)
|
Flex::new(Axis::Vertical)
|
||||||
.with_child(ChildView::new(self.query_editor.id()).boxed())
|
.with_child(ChildView::new(self.query_editor.id()).boxed())
|
||||||
.with_child(Expanded::new(1.0, self.render_matches(cx)).boxed())
|
.with_child(Flexible::new(1.0, self.render_matches(cx)).boxed())
|
||||||
.boxed(),
|
.boxed(),
|
||||||
)
|
)
|
||||||
.with_style(&settings.theme.selector.container)
|
.with_style(&settings.theme.selector.container)
|
||||||
|
Loading…
Reference in New Issue
Block a user