diff --git a/dev_plugin/gauntlet.toml b/dev_plugin/gauntlet.toml index 40e026fc..02410335 100644 --- a/dev_plugin/gauntlet.toml +++ b/dev_plugin/gauntlet.toml @@ -162,6 +162,13 @@ path = 'src/empty.tsx' type = 'view' description = '' +[[entrypoint]] +id = 'empty-list-entrypoint' +name = 'Empty List Entrypoint' +path = 'src/empty-list.tsx' +type = 'view' +description = '' + [[entrypoint]] id = 'entrypoint-generator' name = 'Entrypoint generator' diff --git a/dev_plugin/src/empty-list.tsx b/dev_plugin/src/empty-list.tsx new file mode 100644 index 00000000..9fec8d0a --- /dev/null +++ b/dev_plugin/src/empty-list.tsx @@ -0,0 +1,12 @@ +import { ReactElement } from "react"; +import { List } from "@project-gauntlet/api/components"; + +const alderaanImage = "https://static.wikia.nocookie.net/starwars/images/4/4a/Alderaan.jpg/revision/latest?cb=20061211013805" + +export default function EmptyListView(): ReactElement { + return ( + + + + ) +} diff --git a/rust/client/src/ui/theme/container.rs b/rust/client/src/ui/theme/container.rs index 07600c65..330ecafd 100644 --- a/rust/client/src/ui/theme/container.rs +++ b/rust/client/src/ui/theme/container.rs @@ -355,6 +355,8 @@ impl<'a, Message: 'a> ThemableWidget<'a, Message> for Container<'a, Message, Gau } ContainerStyle::EmptyViewImage => { self.padding(theme.empty_view_image.padding.to_iced()) + .max_width(theme.empty_view_image.size.width) + .max_height(theme.empty_view_image.size.height) } ContainerStyle::Main => { self.class(ContainerStyleInner::Main) diff --git a/rust/client/src/ui/theme/image.rs b/rust/client/src/ui/theme/image.rs index c83a99bf..96416f46 100644 --- a/rust/client/src/ui/theme/image.rs +++ b/rust/client/src/ui/theme/image.rs @@ -1,8 +1,7 @@ +use crate::ui::theme::{Element, ThemableWidget}; use iced::widget::Image; -use crate::ui::theme::{Element, get_theme, ThemableWidget}; pub enum ImageStyle { - EmptyViewImage, MainListItemIcon, } @@ -10,13 +9,7 @@ impl<'a, Message: 'a> ThemableWidget<'a, Message> for Image Element<'a, Message> { - let theme = get_theme(); - match kind { - ImageStyle::EmptyViewImage => { - self.width(theme.empty_view_image.size.width) - .height(theme.empty_view_image.size.height) - } ImageStyle::MainListItemIcon => { self.width(18) .height(18) diff --git a/rust/client/src/ui/theme/mod.rs b/rust/client/src/ui/theme/mod.rs index b70dab7e..b3e66d50 100644 --- a/rust/client/src/ui/theme/mod.rs +++ b/rust/client/src/ui/theme/mod.rs @@ -283,8 +283,8 @@ impl GauntletComplexTheme { empty_view_image: ThemePaddingSize { padding: padding_all(8.0), size: ExternalThemeSize { - width: 100.0, - height: 100.0, + width: 150.0, + height: 150.0, }, }, grid_item: ThemeButton {