Add helper functions for alignment to widget module
This commit is contained in:
parent
75a6f32a5e
commit
f8337b8da7
12 changed files with 208 additions and 64 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use iced_wgpu::Renderer;
|
||||
use iced_widget::{column, container, row, slider, text, text_input};
|
||||
use iced_winit::core::{Color, Element, Length::*, Theme};
|
||||
use iced_widget::{bottom, column, row, slider, text, text_input};
|
||||
use iced_winit::core::{Color, Element, Theme};
|
||||
use iced_winit::runtime::{Program, Task};
|
||||
|
||||
pub struct Controls {
|
||||
|
|
@ -74,18 +74,17 @@ impl Program for Controls {
|
|||
.width(500)
|
||||
.spacing(20);
|
||||
|
||||
container(
|
||||
bottom(
|
||||
column![
|
||||
text("Background color").color(Color::WHITE),
|
||||
text!("{background_color:?}").size(14).color(Color::WHITE),
|
||||
text_input("Placeholder", &self.input)
|
||||
.on_input(Message::InputChanged),
|
||||
sliders,
|
||||
text_input("Type something...", &self.input)
|
||||
.on_input(Message::InputChanged),
|
||||
]
|
||||
.spacing(10),
|
||||
)
|
||||
.padding(10)
|
||||
.align_bottom(Fill)
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue