fix: run cargo fmt
This commit is contained in:
parent
db7d8680ce
commit
8ed62541af
5 changed files with 11 additions and 25 deletions
|
|
@ -78,9 +78,7 @@ impl Program for Controls {
|
||||||
container(
|
container(
|
||||||
column![
|
column![
|
||||||
text("Background color").color(Color::WHITE),
|
text("Background color").color(Color::WHITE),
|
||||||
text!("{background_color:?}")
|
text!("{background_color:?}").size(14).color(Color::WHITE),
|
||||||
.size(14)
|
|
||||||
.color(Color::WHITE),
|
|
||||||
text_input("Placeholder", &self.input)
|
text_input("Placeholder", &self.input)
|
||||||
.on_input(Message::InputChanged),
|
.on_input(Message::InputChanged),
|
||||||
sliders,
|
sliders,
|
||||||
|
|
|
||||||
|
|
@ -284,12 +284,10 @@ fn view_content<'a>(
|
||||||
.spacing(5)
|
.spacing(5)
|
||||||
.max_width(160);
|
.max_width(160);
|
||||||
|
|
||||||
let content = column![
|
let content =
|
||||||
text!("{}x{}", size.width, size.height).size(24),
|
column![text!("{}x{}", size.width, size.height).size(24), controls,]
|
||||||
controls,
|
.spacing(10)
|
||||||
]
|
.align_items(Alignment::Center);
|
||||||
.spacing(10)
|
|
||||||
.align_items(Alignment::Center);
|
|
||||||
|
|
||||||
container(scrollable(content))
|
container(scrollable(content))
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
|
|
|
||||||
|
|
@ -109,9 +109,7 @@ impl Pokemon {
|
||||||
column![
|
column![
|
||||||
row![
|
row![
|
||||||
text(&self.name).size(30).width(Length::Fill),
|
text(&self.name).size(30).width(Length::Fill),
|
||||||
text!("#{}", self.number)
|
text!("#{}", self.number).size(20).color([0.5, 0.5, 0.5]),
|
||||||
.size(20)
|
|
||||||
.color([0.5, 0.5, 0.5]),
|
|
||||||
]
|
]
|
||||||
.align_items(Alignment::Center)
|
.align_items(Alignment::Center)
|
||||||
.spacing(20),
|
.spacing(20),
|
||||||
|
|
|
||||||
|
|
@ -108,15 +108,11 @@ impl Example {
|
||||||
|
|
||||||
let memory_used = text!("Memory (used): {memory_text}");
|
let memory_used = text!("Memory (used): {memory_text}");
|
||||||
|
|
||||||
let graphics_adapter = text!(
|
let graphics_adapter =
|
||||||
"Graphics adapter: {}",
|
text!("Graphics adapter: {}", information.graphics_adapter);
|
||||||
information.graphics_adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
let graphics_backend = text!(
|
let graphics_backend =
|
||||||
"Graphics backend: {}",
|
text!("Graphics backend: {}", information.graphics_backend);
|
||||||
information.graphics_backend
|
|
||||||
);
|
|
||||||
|
|
||||||
column![
|
column![
|
||||||
system_name.size(30),
|
system_name.size(30),
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,7 @@ impl VectorialText {
|
||||||
fn view(&self) -> Element<Message> {
|
fn view(&self) -> Element<Message> {
|
||||||
let slider_with_label = |label, range, value, message: fn(f32) -> _| {
|
let slider_with_label = |label, range, value, message: fn(f32) -> _| {
|
||||||
column![
|
column![
|
||||||
row![
|
row![text(label), horizontal_space(), text!("{:.2}", value)],
|
||||||
text(label),
|
|
||||||
horizontal_space(),
|
|
||||||
text!("{:.2}", value)
|
|
||||||
],
|
|
||||||
slider(range, value, message).step(0.01)
|
slider(range, value, message).step(0.01)
|
||||||
]
|
]
|
||||||
.spacing(2)
|
.spacing(2)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue