diff --git a/crates/ui/src/list/list.rs b/crates/ui/src/list/list.rs index 664cb6f7..41171780 100644 --- a/crates/ui/src/list/list.rs +++ b/crates/ui/src/list/list.rs @@ -4,12 +4,12 @@ use std::{cell::Cell, rc::Rc}; use crate::actions::{Cancel, Confirm, SelectNext, SelectPrev}; use crate::input::InputState; +use crate::{h_flex, Icon, Sizable as _}; use crate::{ input::{InputEvent, TextInput}, scroll::{Scrollbar, ScrollbarState}, v_flex, ActiveTheme, IconName, Size, }; -use crate::{Icon, Sizable as _}; use gpui::{ div, prelude::FluentBuilder, uniform_list, AnyElement, AppContext, Entity, FocusHandle, Focusable, InteractiveElement, IntoElement, KeyBinding, Length, ListSizingBehavior, @@ -73,7 +73,12 @@ pub trait ListDelegate: Sized + 'static { /// Return a Element to show when list is empty. fn render_empty(&self, window: &mut Window, cx: &mut Context>) -> impl IntoElement { - div() + h_flex() + .size_full() + .justify_center() + .text_color(cx.theme().muted_foreground.opacity(0.6)) + .child(Icon::new(IconName::Inbox).size_12()) + .into_any_element() } /// Returns Some(AnyElement) to render the initial state of the list. diff --git a/crates/ui/src/table.rs b/crates/ui/src/table.rs index 479f08e5..2ae993b2 100644 --- a/crates/ui/src/table.rs +++ b/crates/ui/src/table.rs @@ -295,7 +295,6 @@ pub trait TableDelegate: Sized + 'static { h_flex() .size_full() .justify_center() - .py_6() .text_color(cx.theme().muted_foreground.opacity(0.6)) .child(Icon::new(IconName::Inbox).size_12()) .into_any_element()