Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Smooth Scrolling [foolo]:
Browse files Browse the repository at this point in the history
  - I'm actually not sure what difference it actually makes really, still trying to find out.
  • Loading branch information
Ristellise committed Sep 25, 2020
1 parent f8b5a7b commit 3662d81
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/audio_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,12 @@ void AudioDisplay::OnPlaybackPosition(int ms)
}
else if (scroll_left + client_width < std::min(pixel_audio_width - 1, pixel_position + edge_size))
{
ScrollPixelToLeft(std::min(pixel_position - client_width + edge_size, pixel_audio_width - client_width - 1));
if (OPT_GET("Audio/Smooth Scrolling")->GetBool()) {
ScrollPixelToLeft(std::min(pixel_position - client_width + edge_size, pixel_audio_width - client_width - 1));
}
else {
ScrollPixelToLeft(std::min(pixel_position - edge_size, pixel_audio_width - client_width - 1));
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/libresrc/default_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"Line Boundaries Thickness" : 2,
"Link" : true,
"Lock Scroll on Cursor" : false,
"Smooth Scrolling" : false,
"Medusa Timing Hotkeys" : false,
"Next Line on Commit" : true,
"Player" : "",
Expand Down
4 changes: 3 additions & 1 deletion src/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,16 @@ void Audio(wxTreebook *book, Preferences *parent) {
auto general = p->PageSizer(_("Options"));
p->OptionAdd(general, _("Default mouse wheel to zoom"), "Audio/Wheel Default to Zoom");
p->OptionAdd(general, _("Lock scroll on cursor"), "Audio/Lock Scroll on Cursor");
p->OptionAdd(general, _("Smooth scrolling"), "Audio/Smooth Scrolling");
p->OptionAdd(general, _("Snap markers by default"), "Audio/Snap/Enable");
p->OptionAdd(general, _("Auto-focus on mouse over"), "Audio/Auto/Focus");
p->OptionAdd(general, _("Play audio when stepping in video"), "Audio/Plays When Stepping Video");
p->OptionAdd(general, _("Left-click-drag moves end marker"), "Audio/Drag Timing");
p->CellSkip(general);
p->OptionAdd(general, _("Default timing length (ms)"), "Timing/Default Duration", 0, 36000);
p->OptionAdd(general, _("Default lead-in length (ms)"), "Audio/Lead/IN", 0, 36000);
p->OptionAdd(general, _("Default lead-out length (ms)"), "Audio/Lead/OUT", 0, 36000);

p->OptionAdd(general, _("Marker drag-start sensitivity (px)"), "Audio/Start Drag Sensitivity", 1, 15);
p->OptionAdd(general, _("Line boundary thickness (px)"), "Audio/Line Boundaries Thickness", 1, 5);
p->OptionAdd(general, _("Maximum snap distance (px)"), "Audio/Snap/Distance", 0, 25);
Expand Down

0 comments on commit 3662d81

Please sign in to comment.