summaryrefslogtreecommitdiffstats
path: root/examples/gradient
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-09-07 07:53:34 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-09-07 07:53:34 +0200
commit6ff2e48feb7c0c3f65a3e6d298fc1c73356dc740 (patch)
tree49a39e702a9cb34506b79c326a29b555bdba2725 /examples/gradient
parentfc261a539b28dcd5f1898107a7c69c0719f3bbbf (diff)
downloadiced-6ff2e48feb7c0c3f65a3e6d298fc1c73356dc740.tar.gz
iced-6ff2e48feb7c0c3f65a3e6d298fc1c73356dc740.tar.bz2
iced-6ff2e48feb7c0c3f65a3e6d298fc1c73356dc740.zip
Use `Default` for `container::Appearance` in `gradient` example
Diffstat (limited to 'examples/gradient')
-rw-r--r--examples/gradient/src/main.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/gradient/src/main.rs b/examples/gradient/src/main.rs
index dd50ebc9..91a65f1e 100644
--- a/examples/gradient/src/main.rs
+++ b/examples/gradient/src/main.rs
@@ -1,7 +1,7 @@
+use iced::gradient;
use iced::widget::{column, container, row, slider, text};
use iced::{
- gradient, Alignment, Background, BorderRadius, Color, Element, Length,
- Radians, Sandbox, Settings,
+ Alignment, Background, Color, Element, Length, Radians, Sandbox, Settings,
};
pub fn main() -> iced::Result {
@@ -62,11 +62,8 @@ impl Sandbox for Gradient {
.into();
container::Appearance {
- text_color: None,
background: Some(Background::Gradient(gradient)),
- border_radius: BorderRadius::default(),
- border_width: 0.0,
- border_color: Color::new(0.0, 0.0, 0.0, 0.0),
+ ..Default::default()
}
});