diff options
author | 2023-09-07 07:55:09 +0200 | |
---|---|---|
committer | 2023-09-07 07:55:09 +0200 | |
commit | d6be3ab68246b08ea3f8988833e3b266b524dd1d (patch) | |
tree | 9d46431620b6aec3cab894c78186c7fb826eb21b /examples/gradient | |
parent | 6ff2e48feb7c0c3f65a3e6d298fc1c73356dc740 (diff) | |
download | iced-d6be3ab68246b08ea3f8988833e3b266b524dd1d.tar.gz iced-d6be3ab68246b08ea3f8988833e3b266b524dd1d.tar.bz2 iced-d6be3ab68246b08ea3f8988833e3b266b524dd1d.zip |
Use `horizontal_space` instead of empty `text` widget in `gradient` example
Diffstat (limited to 'examples/gradient')
-rw-r--r-- | examples/gradient/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/gradient/src/main.rs b/examples/gradient/src/main.rs index 91a65f1e..3ba08a06 100644 --- a/examples/gradient/src/main.rs +++ b/examples/gradient/src/main.rs @@ -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() |