Fix dropdown height.
This commit is contained in:
parent
586569f241
commit
6503e00b69
1 changed files with 8 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions, deferred, div, prelude::FluentBuilder as _, px, AnyElement, AppContext, DismissEvent,
|
actions, deferred, div, prelude::FluentBuilder as _, px, rems, AnyElement, AppContext,
|
||||||
Element, ElementId, EventEmitter, FocusHandle, FocusableView, InteractiveElement, IntoElement,
|
DismissEvent, Element, ElementId, EventEmitter, FocusHandle, FocusableView, InteractiveElement,
|
||||||
KeyBinding, LayoutId, ParentElement as _, Render, SharedString,
|
IntoElement, KeyBinding, LayoutId, ParentElement as _, Render, SharedString,
|
||||||
StatefulInteractiveElement as _, Styled as _, View, ViewContext, VisualContext as _, WeakView,
|
StatefulInteractiveElement as _, Styled as _, View, ViewContext, VisualContext as _, WeakView,
|
||||||
WindowContext,
|
WindowContext,
|
||||||
};
|
};
|
||||||
|
|
@ -136,7 +136,11 @@ where
|
||||||
selected_index: 0,
|
selected_index: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
let picker = cx.new_view(|cx| Picker::uniform_list(picker_delegate, cx).no_query());
|
let picker = cx.new_view(|cx| {
|
||||||
|
Picker::uniform_list(picker_delegate, cx)
|
||||||
|
.no_query()
|
||||||
|
.max_height(Some(rems(20.).into()))
|
||||||
|
});
|
||||||
Self {
|
Self {
|
||||||
id: id.into(),
|
id: id.into(),
|
||||||
focus_handle: cx.focus_handle(),
|
focus_handle: cx.focus_handle(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue