Take a target view when marking an element as draggable

This commit is contained in:
Antonio Scandurra 2023-04-21 15:52:05 +02:00
parent b0cbd13e7a
commit 5b40641fde
12 changed files with 86 additions and 36 deletions

View file

@ -298,7 +298,12 @@ impl View for ThemeTestbench {
}
impl Item for ThemeTestbench {
fn tab_content(&self, _: Option<usize>, style: &theme::Tab, _: &AppContext) -> Element<Pane> {
fn tab_content<T: View>(
&self,
_: Option<usize>,
style: &theme::Tab,
_: &AppContext,
) -> Element<T> {
Label::new("Theme Testbench", style.label.clone())
.aligned()
.contained()