From 54a9a232f8110364972a8eef966b7b7477573f4f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 18 Oct 2021 14:48:33 +0700 Subject: Draw scrollbar in `Widget::draw` for `Scrollable` --- examples/scrollable/src/style.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/scrollable/src/style.rs') diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs index ae449141..d955f52d 100644 --- a/examples/scrollable/src/style.rs +++ b/examples/scrollable/src/style.rs @@ -34,11 +34,11 @@ impl From for Box { } } -impl From for Box { +impl From for &'static dyn scrollable::StyleSheet { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => dark::Scrollable.into(), + Theme::Dark => &dark::Scrollable, } } } -- cgit From d61cb58d92b6fcd520f665deb093f3747ffd5e5c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 18 Oct 2021 15:36:32 +0700 Subject: Wire up `container` styling to `iced_native` --- examples/scrollable/src/style.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/scrollable/src/style.rs') diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs index d955f52d..66f3b9d3 100644 --- a/examples/scrollable/src/style.rs +++ b/examples/scrollable/src/style.rs @@ -16,11 +16,11 @@ impl Default for Theme { } } -impl From for Box { +impl From for &'static dyn container::StyleSheet { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => dark::Container.into(), + Theme::Dark => &dark::Container, } } } -- cgit From d39ad717ed0ab85acbe935d7ab883166b36e7bc7 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Oct 2021 19:06:53 +0700 Subject: Wire up styling to `Radio` in `iced_native` --- examples/scrollable/src/style.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/scrollable/src/style.rs') diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs index 66f3b9d3..d7d64374 100644 --- a/examples/scrollable/src/style.rs +++ b/examples/scrollable/src/style.rs @@ -25,11 +25,11 @@ impl From for &'static dyn container::StyleSheet { } } -impl From for Box { +impl From for &'static dyn radio::StyleSheet { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => dark::Radio.into(), + Theme::Dark => &dark::Radio, } } } -- cgit From 40a5de581144886571504b762719f057dbb2e871 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 17:02:59 +0700 Subject: Reintroduce `Box` for `style_sheet` in `Container` --- examples/scrollable/src/style.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/scrollable/src/style.rs') diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs index d7d64374..068483cb 100644 --- a/examples/scrollable/src/style.rs +++ b/examples/scrollable/src/style.rs @@ -16,11 +16,11 @@ impl Default for Theme { } } -impl From for &'static dyn container::StyleSheet { +impl<'a> From for Box { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => &dark::Container, + Theme::Dark => dark::Container.into(), } } } -- cgit From bd7b086ec1f9d428945f05fb12bda157f9e77dfd Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 17:14:10 +0700 Subject: Reintroduce `Box` for `style_sheet` in `Radio` --- examples/scrollable/src/style.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/scrollable/src/style.rs') diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs index 068483cb..3c8e5234 100644 --- a/examples/scrollable/src/style.rs +++ b/examples/scrollable/src/style.rs @@ -25,11 +25,11 @@ impl<'a> From for Box { } } -impl From for &'static dyn radio::StyleSheet { +impl<'a> From for Box { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => &dark::Radio, + Theme::Dark => dark::Radio.into(), } } } -- cgit From eed19dcf81334d0849744f1918ba880d5a7acc1c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 17:39:24 +0700 Subject: Reintroduce `Box` for `style_sheet` in `Scrollable` --- examples/scrollable/src/style.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/scrollable/src/style.rs') diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs index 3c8e5234..ec1f13db 100644 --- a/examples/scrollable/src/style.rs +++ b/examples/scrollable/src/style.rs @@ -34,11 +34,11 @@ impl<'a> From for Box { } } -impl From for &'static dyn scrollable::StyleSheet { +impl<'a> From for Box { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => &dark::Scrollable, + Theme::Dark => dark::Scrollable.into(), } } } -- cgit