Skip to content

Commit

Permalink
Update piano_range.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
guylamar2006 authored Dec 1, 2024
1 parent 3c906cb commit e75c2ff
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions neothesia-iced-widgets/src/piano_range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@ impl<M, R: iced_core::Renderer + TextRenderer> Widget<M, Theme, R> for PianoRang
renderer.fill_text(
iced_core::text::Text {
content: note_id,
position: iced_core::Point::new(bounds.x + (bounds.width / 2.0), bounds.y + (bounds.height / 2.0)),
color: iced_core::Color::BLACK,
..Default::default()
}
bounds,
size: iced_core::Size::new(bounds.width, bounds.height),
font: Default::default(),
horizontal_alignment: iced_core::alignment::Horizontal::Center,
vertical_alignment: iced_core::alignment::Vertical::Center,
line_height: Default::default(),
},
iced_core::Point::new(bounds.x + (bounds.width / 2.0), bounds.y + (bounds.height / 2.0)),
iced_core::Color::BLACK,
bounds
);
}

Expand Down Expand Up @@ -106,10 +112,16 @@ impl<M, R: iced_core::Renderer + TextRenderer> Widget<M, Theme, R> for PianoRang
renderer.fill_text(
iced_core::text::Text {
content: note_id,
position: iced_core::Point::new(bounds.x + (bounds.width / 2.0), bounds.y + (bounds.height / 2.0)),
color: iced_core::Color::WHITE,
..Default::default()
}
bounds,
size: iced_core::Size::new(bounds.width, bounds.height),
font: Default::default(),
horizontal_alignment: iced_core::alignment::Horizontal::Center,
vertical_alignment: iced_core::alignment::Vertical::Center,
line_height: Default::default(),
},
iced_core::Point::new(bounds.x + (bounds.width / 2.0), bounds.y + (bounds.height / 2.0)),
iced_core::Color::WHITE,
bounds
);
}
});
Expand Down

0 comments on commit e75c2ff

Please sign in to comment.