Show placeholder text for pickers

This commit is contained in:
Antonio Scandurra 2022-11-04 10:18:29 +01:00
parent 08b84416d2
commit 0b231e58fd
19 changed files with 76 additions and 40 deletions

View file

@ -170,8 +170,8 @@ impl ContactFinder {
let this = cx.weak_handle();
Self {
picker: cx.add_view(|cx| {
Picker::new(this, cx)
.with_theme(|cx| &cx.global::<Settings>().theme.contact_finder.picker)
Picker::new("Search collaborator by username...", this, cx)
.with_theme(|theme| theme.contact_finder.picker.clone())
}),
potential_contacts: Arc::from([]),
user_store,

View file

@ -175,7 +175,9 @@ impl ContactList {
) -> Self {
let filter_editor = cx.add_view(|cx| {
let mut editor = Editor::single_line(
Some(|theme| theme.contact_list.user_query_editor.clone()),
Some(Arc::new(|theme| {
theme.contact_list.user_query_editor.clone()
})),
cx,
);
editor.set_placeholder_text("Filter contacts", cx);