update gpui component
This commit is contained in:
@@ -298,7 +298,9 @@ impl RepoDetailView {
|
||||
// built-in search (Cmd/Ctrl+F) still work; editing is blocked by the
|
||||
// component's disabled state.
|
||||
Editor::new(&code.state)
|
||||
.disabled(true)
|
||||
.readonly(true)
|
||||
.bordered(false)
|
||||
.rounded_none()
|
||||
.h_full()
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@ use gpui::{
|
||||
Render, SharedString, Size, Subscription, Task, WeakEntity, Window, div, px, size,
|
||||
};
|
||||
use gpui_component::button::{Button, ButtonVariants, DropdownButton};
|
||||
use gpui_component::combobox::{Caret, Combobox, ComboboxEvent, ComboboxState, ComboboxTriggerCtx};
|
||||
use gpui_component::combobox::{
|
||||
Caret, Combobox, ComboboxEvent, ComboboxState, ComboboxTriggerContext,
|
||||
};
|
||||
use gpui_component::dock::{DockArea, DockPlacement, Panel, PanelEvent};
|
||||
use gpui_component::menu::PopupMenuItem;
|
||||
use gpui_component::searchable_list::SearchableVec;
|
||||
@@ -791,7 +793,7 @@ impl RepoDetailView {
|
||||
/// default trigger entirely, which is the only way to show an icon
|
||||
/// inside the trigger label.
|
||||
fn render_ref_trigger(
|
||||
ctx: &ComboboxTriggerCtx<SearchableVec<SharedString>>,
|
||||
ctx: &ComboboxTriggerContext<SearchableVec<SharedString>>,
|
||||
icon: CustomIconName,
|
||||
cx: &App,
|
||||
) -> AnyElement {
|
||||
@@ -810,16 +812,16 @@ impl RepoDetailView {
|
||||
.overflow_hidden()
|
||||
.text_ellipsis()
|
||||
.whitespace_nowrap()
|
||||
.when(ctx.selection.is_empty(), |this| this.text_color(muted))
|
||||
.when(ctx.selection().is_empty(), |this| this.text_color(muted))
|
||||
.child(
|
||||
ctx.selection
|
||||
ctx.selection()
|
||||
.first()
|
||||
.map(|(_, item)| item.clone())
|
||||
.or_else(|| ctx.placeholder.cloned())
|
||||
.or_else(|| ctx.placeholder().cloned())
|
||||
.unwrap_or_default(),
|
||||
),
|
||||
)
|
||||
.child(Caret::new(ctx.size).text_color(muted))
|
||||
.child(Caret::new(ctx.size()).text_color(muted))
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user