forked from mia/Aegisub
Remove "Video Panning" option
It's probably stable enough at this point, and hiding it behind an option just creates more confusion than it prevents.
This commit is contained in:
parent
28db5d31ce
commit
cba8d3644f
|
@ -614,7 +614,6 @@
|
||||||
"Show Keyframes" : true
|
"Show Keyframes" : true
|
||||||
},
|
},
|
||||||
"Subtitle Sync" : true,
|
"Subtitle Sync" : true,
|
||||||
"Video Pan": false,
|
|
||||||
"Default to Video Zoom": false
|
"Default to Video Zoom": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -614,7 +614,6 @@
|
||||||
"Show Keyframes" : true
|
"Show Keyframes" : true
|
||||||
},
|
},
|
||||||
"Subtitle Sync" : true,
|
"Subtitle Sync" : true,
|
||||||
"Video Pan": false,
|
|
||||||
"Default to Video Zoom": false
|
"Default to Video Zoom": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,8 @@ void Video(wxTreebook *book, Preferences *parent) {
|
||||||
p->OptionAdd(general, _("Seek video to line start on selection change"), "Video/Subtitle Sync");
|
p->OptionAdd(general, _("Seek video to line start on selection change"), "Video/Subtitle Sync");
|
||||||
p->CellSkip(general);
|
p->CellSkip(general);
|
||||||
p->OptionAdd(general, _("Automatically open audio when opening video"), "Video/Open Audio");
|
p->OptionAdd(general, _("Automatically open audio when opening video"), "Video/Open Audio");
|
||||||
p->CellSkip(general);
|
p->OptionAdd(general, _("Default to Video Zoom"), "Video/Default to Video Zoom")
|
||||||
|
->SetToolTip("Reverses the behavior of Ctrl while scrolling the video display. If not set, scrolling will default to UI zoom and Ctrl+scrolling will zoom the video. If set, this will be reversed.");
|
||||||
p->OptionAdd(general, _("Disable zooming with scroll bar"), "Video/Disable Scroll Zoom")
|
p->OptionAdd(general, _("Disable zooming with scroll bar"), "Video/Disable Scroll Zoom")
|
||||||
->SetToolTip("Makes the scroll bar not zoom the video. Useful when using a track pad that often scrolls accidentally.");
|
->SetToolTip("Makes the scroll bar not zoom the video. Useful when using a track pad that often scrolls accidentally.");
|
||||||
p->OptionAdd(general, _("Reverse zoom direction"), "Video/Reverse Zoom");
|
p->OptionAdd(general, _("Reverse zoom direction"), "Video/Reverse Zoom");
|
||||||
|
@ -437,10 +438,6 @@ void Advanced_Video(wxTreebook *book, Preferences *parent) {
|
||||||
wxArrayString sp_choice = to_wx(SubtitlesProviderFactory::GetClasses());
|
wxArrayString sp_choice = to_wx(SubtitlesProviderFactory::GetClasses());
|
||||||
p->OptionChoice(expert, _("Subtitles provider"), sp_choice, "Subtitle/Provider");
|
p->OptionChoice(expert, _("Subtitles provider"), sp_choice, "Subtitle/Provider");
|
||||||
|
|
||||||
p->OptionAdd(expert, _("Video Panning"), "Video/Video Pan");
|
|
||||||
p->OptionAdd(expert, _("Default to Video Zoom"), "Video/Default to Video Zoom")
|
|
||||||
->SetToolTip("Reverses the behavior of Ctrl while scrolling the video display. If not set, scrolling will default to UI zoom and Ctrl+scrolling will zoom the video. If set, this will be reversed.");
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef WITH_AVISYNTH
|
#ifdef WITH_AVISYNTH
|
||||||
auto avisynth = p->PageSizer("Avisynth");
|
auto avisynth = p->PageSizer("Avisynth");
|
||||||
|
|
|
@ -376,27 +376,17 @@ void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
|
||||||
|
|
||||||
last_mouse_pos = mouse_pos = event.GetPosition();
|
last_mouse_pos = mouse_pos = event.GetPosition();
|
||||||
|
|
||||||
///if video pan
|
if (event.GetButton() == wxMOUSE_BTN_MIDDLE) {
|
||||||
bool videoPan = OPT_GET("Video/Video Pan")->GetBool();
|
if ((panning = event.ButtonDown()))
|
||||||
|
|
||||||
if (videoPan){
|
|
||||||
if (event.GetButton() == wxMOUSE_BTN_MIDDLE) {
|
|
||||||
if ((panning = event.ButtonDown()))
|
|
||||||
pan_last_pos = event.GetPosition();
|
|
||||||
}
|
|
||||||
if (panning && event.Dragging()) {
|
|
||||||
pan_x += event.GetX() - pan_last_pos.X();
|
|
||||||
pan_y += event.GetY() - pan_last_pos.Y();
|
|
||||||
pan_last_pos = event.GetPosition();
|
pan_last_pos = event.GetPosition();
|
||||||
|
}
|
||||||
|
if (panning && event.Dragging()) {
|
||||||
|
pan_x += event.GetX() - pan_last_pos.X();
|
||||||
|
pan_y += event.GetY() - pan_last_pos.Y();
|
||||||
|
pan_last_pos = event.GetPosition();
|
||||||
|
|
||||||
PositionVideo();
|
PositionVideo();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if ((pan_x != 0 || pan_y != 0) && !videoPan)
|
|
||||||
{
|
|
||||||
pan_x = pan_y = 0;
|
|
||||||
PositionVideo();
|
|
||||||
}
|
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
||||||
|
@ -411,13 +401,12 @@ void VideoDisplay::OnMouseLeave(wxMouseEvent& event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoDisplay::OnMouseWheel(wxMouseEvent& event) {
|
void VideoDisplay::OnMouseWheel(wxMouseEvent& event) {
|
||||||
bool videoPan = OPT_GET("Video/Video Pan")->GetBool();
|
|
||||||
if (int wheel = event.GetWheelRotation()) {
|
if (int wheel = event.GetWheelRotation()) {
|
||||||
if (ForwardMouseWheelEvent(this, event) && !OPT_GET("Video/Disable Scroll Zoom")->GetBool()) {
|
if (ForwardMouseWheelEvent(this, event) && !OPT_GET("Video/Disable Scroll Zoom")->GetBool()) {
|
||||||
if (OPT_GET("Video/Reverse Zoom")->GetBool()) {
|
if (OPT_GET("Video/Reverse Zoom")->GetBool()) {
|
||||||
wheel = -wheel;
|
wheel = -wheel;
|
||||||
}
|
}
|
||||||
if (!videoPan || (event.ControlDown() == OPT_GET("Video/Default to Video Zoom")->GetBool())) {
|
if (event.ControlDown() == OPT_GET("Video/Default to Video Zoom")->GetBool()) {
|
||||||
SetWindowZoom(windowZoomValue + .125 * (wheel / event.GetWheelDelta()));
|
SetWindowZoom(windowZoomValue + .125 * (wheel / event.GetWheelDelta()));
|
||||||
} else {
|
} else {
|
||||||
SetVideoZoom(wheel / event.GetWheelDelta());
|
SetVideoZoom(wheel / event.GetWheelDelta());
|
||||||
|
|
Loading…
Reference in New Issue