Skip to content

Commit

Permalink
improve pitch slider doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre committed Jun 28, 2022
1 parent cc9aba6 commit 070cccd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ui/pitch_slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ impl<'a> PitchSlider<'a> {
impl<'a> Widget for PitchSlider<'a> {
fn ui(self, ui: &mut egui::Ui) -> egui::Response {
ui.horizontal(|ui| {
ui.label("pitch down");
ui.label("pitch down").on_hover_text(
"The assigned range for each sample will be lower than its root note.",
);
let response = ui.add(
egui::Slider::new(self.pitch_preference, 0.0..=1.0)
.clamp_to_range(true)
.show_value(false),
);
ui.label("pitch up");
ui.label("pitch up").on_hover_text(
"The assigned range for each sample will be higher than its root note.",
);
response
})
.inner
Expand Down

0 comments on commit 070cccd

Please sign in to comment.