diff options
author | 2023-11-14 13:25:49 +0100 | |
---|---|---|
committer | 2023-11-14 13:25:49 +0100 | |
commit | 91d7df52cdedd1b5c431fdb51a6356e827765b60 (patch) | |
tree | 5a5b295f50f94a5b55b97e1323f4820687f55298 /examples | |
parent | 280d3736d59b62c4087fe980c187953cc2be83d2 (diff) | |
download | iced-91d7df52cdedd1b5c431fdb51a6356e827765b60.tar.gz iced-91d7df52cdedd1b5c431fdb51a6356e827765b60.tar.bz2 iced-91d7df52cdedd1b5c431fdb51a6356e827765b60.zip |
Create `shader` function helper in `iced_widget`
Diffstat (limited to 'examples')
-rw-r--r-- | examples/custom_shader/src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/custom_shader/src/main.rs b/examples/custom_shader/src/main.rs index f6370f46..e9b6776f 100644 --- a/examples/custom_shader/src/main.rs +++ b/examples/custom_shader/src/main.rs @@ -10,7 +10,7 @@ use crate::pipeline::Pipeline; use iced::executor; use iced::time::Instant; use iced::widget::{ - checkbox, column, container, row, slider, text, vertical_space, Shader, + checkbox, column, container, row, shader, slider, text, vertical_space, }; use iced::window; use iced::{ @@ -150,9 +150,8 @@ impl Application for IcedCubes { .spacing(10) .align_items(Alignment::Center); - let shader = Shader::new(&self.cubes) - .width(Length::Fill) - .height(Length::Fill); + let shader = + shader(&self.cubes).width(Length::Fill).height(Length::Fill); container( column![shader, controls, vertical_space(20),] |