summaryrefslogtreecommitdiffstats
path: root/examples/custom_shader/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-12 18:12:34 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-12 18:12:34 +0200
commit76737351ea9e116291112b7d576d9ed4f6bb5c2a (patch)
treea3b514583ab6f8981fb7656adb9d4d10ce9c466a /examples/custom_shader/src/main.rs
parentf9dd5cbb099bbe44a57b6369be54a442363b7a8d (diff)
downloadiced-76737351ea9e116291112b7d576d9ed4f6bb5c2a.tar.gz
iced-76737351ea9e116291112b7d576d9ed4f6bb5c2a.tar.bz2
iced-76737351ea9e116291112b7d576d9ed4f6bb5c2a.zip
Re-export variants of `Length` and `alignment` types
Diffstat (limited to 'examples/custom_shader/src/main.rs')
-rw-r--r--examples/custom_shader/src/main.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/custom_shader/src/main.rs b/examples/custom_shader/src/main.rs
index 3e29e7be..5886f6bb 100644
--- a/examples/custom_shader/src/main.rs
+++ b/examples/custom_shader/src/main.rs
@@ -6,7 +6,7 @@ use iced::time::Instant;
use iced::widget::shader::wgpu;
use iced::widget::{center, checkbox, column, row, shader, slider, text};
use iced::window;
-use iced::{Color, Element, Length, Subscription};
+use iced::{Center, Color, Element, Fill, Subscription};
fn main() -> iced::Result {
iced::application(
@@ -122,12 +122,11 @@ impl IcedCubes {
let controls = column![top_controls, bottom_controls,]
.spacing(10)
.padding(20)
- .center_x();
+ .align_x(Center);
- let shader =
- shader(&self.scene).width(Length::Fill).height(Length::Fill);
+ let shader = shader(&self.scene).width(Fill).height(Fill);
- center(column![shader, controls].center_x()).into()
+ center(column![shader, controls].align_x(Center)).into()
}
fn subscription(&self) -> Subscription<Message> {