Use Default for container::Appearance in gradient example
This commit is contained in:
parent
fc261a539b
commit
6ff2e48feb
1 changed files with 3 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
|
use iced::gradient;
|
||||||
use iced::widget::{column, container, row, slider, text};
|
use iced::widget::{column, container, row, slider, text};
|
||||||
use iced::{
|
use iced::{
|
||||||
gradient, Alignment, Background, BorderRadius, Color, Element, Length,
|
Alignment, Background, Color, Element, Length, Radians, Sandbox, Settings,
|
||||||
Radians, Sandbox, Settings,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn main() -> iced::Result {
|
pub fn main() -> iced::Result {
|
||||||
|
|
@ -62,11 +62,8 @@ impl Sandbox for Gradient {
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
container::Appearance {
|
container::Appearance {
|
||||||
text_color: None,
|
|
||||||
background: Some(Background::Gradient(gradient)),
|
background: Some(Background::Gradient(gradient)),
|
||||||
border_radius: BorderRadius::default(),
|
..Default::default()
|
||||||
border_width: 0.0,
|
|
||||||
border_color: Color::new(0.0, 0.0, 0.0, 0.0),
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue