Use horizontal_space instead of empty text widget in gradient example
This commit is contained in:
parent
6ff2e48feb
commit
d6be3ab682
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use iced::gradient;
|
||||
use iced::widget::{column, container, row, slider, text};
|
||||
use iced::widget::{column, container, horizontal_space, row, slider, text};
|
||||
use iced::{
|
||||
Alignment, Background, Color, Element, Length, Radians, Sandbox, Settings,
|
||||
};
|
||||
|
|
@ -48,7 +48,7 @@ impl Sandbox for Gradient {
|
|||
fn view(&self) -> Element<Message> {
|
||||
let Self { start, end, angle } = *self;
|
||||
|
||||
let gradient_box = container(text(""))
|
||||
let gradient_box = container(horizontal_space(Length::Fill))
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
.center_x()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue