summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar shan <shankern@protonmail.com>2022-10-07 16:28:13 -0700
committerLibravatar shan <shankern@protonmail.com>2022-10-07 16:28:13 -0700
commita4a1262fa2d625be5ad7a37e409e0e9c399b09b6 (patch)
tree0f9867ed3b287ab7cbfc9771cceb14e492e71cba /examples
parent215e6c95be7370bdd29c75b904463f06f942b7c0 (diff)
downloadiced-a4a1262fa2d625be5ad7a37e409e0e9c399b09b6.tar.gz
iced-a4a1262fa2d625be5ad7a37e409e0e9c399b09b6.tar.bz2
iced-a4a1262fa2d625be5ad7a37e409e0e9c399b09b6.zip
Fixed import issue with canvas in the gradient mod for situations where canvas feature is not enabled.
Diffstat (limited to 'examples')
-rw-r--r--examples/solar_system/src/main.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs
index 10154621..b638c6d0 100644
--- a/examples/solar_system/src/main.rs
+++ b/examples/solar_system/src/main.rs
@@ -11,7 +11,7 @@ use iced::executor;
use iced::theme::{self, Theme};
use iced::time;
use iced::widget::canvas;
-use iced::widget::canvas::{Cursor, Path, Stroke, Fill, fill, Gradient, stroke, gradient::Position};
+use iced::widget::canvas::{Cursor, Path, Stroke, Gradient, stroke, gradient::Position};
use iced::window;
use iced::{
Application, Color, Command, Element, Length, Point, Rectangle, Settings,
@@ -212,13 +212,7 @@ impl<Message> canvas::Program<Message> for State {
.build()
.unwrap();
- frame.fill(
- &earth,
- Fill {
- style: fill::Style::Gradient(&earth_fill),
- ..Default::default()
- },
- );
+ frame.fill(&earth, &earth_fill);
frame.with_save(|frame| {
frame.rotate(rotation * 10.0);