diff --git a/src/libresrc/default_config.json b/src/libresrc/default_config.json index 47ac07696..df03683bb 100644 --- a/src/libresrc/default_config.json +++ b/src/libresrc/default_config.json @@ -614,7 +614,6 @@ "Show Keyframes" : true }, "Subtitle Sync" : true, - "Video Pan": false, "Default to Video Zoom": false } } diff --git a/src/libresrc/osx/default_config.json b/src/libresrc/osx/default_config.json index c416e5c2f..d542da26a 100644 --- a/src/libresrc/osx/default_config.json +++ b/src/libresrc/osx/default_config.json @@ -614,7 +614,6 @@ "Show Keyframes" : true }, "Subtitle Sync" : true, - "Video Pan": false, "Default to Video Zoom": false } } diff --git a/src/preferences.cpp b/src/preferences.cpp index cc45cd394..e9da2c9e1 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -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->CellSkip(general); 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") ->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"); @@ -437,10 +438,6 @@ void Advanced_Video(wxTreebook *book, Preferences *parent) { wxArrayString sp_choice = to_wx(SubtitlesProviderFactory::GetClasses()); 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 auto avisynth = p->PageSizer("Avisynth"); diff --git a/src/video_display.cpp b/src/video_display.cpp index fc9ead8cd..f13b39e13 100644 --- a/src/video_display.cpp +++ b/src/video_display.cpp @@ -376,27 +376,17 @@ void VideoDisplay::OnMouseEvent(wxMouseEvent& event) { last_mouse_pos = mouse_pos = event.GetPosition(); - ///if video pan - bool videoPan = OPT_GET("Video/Video Pan")->GetBool(); - - 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(); + 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(); - PositionVideo(); - } - } - else if ((pan_x != 0 || pan_y != 0) && !videoPan) - { - pan_x = pan_y = 0; - PositionVideo(); - } + PositionVideo(); + } /// @@ -411,13 +401,12 @@ void VideoDisplay::OnMouseLeave(wxMouseEvent& event) { } void VideoDisplay::OnMouseWheel(wxMouseEvent& event) { - bool videoPan = OPT_GET("Video/Video Pan")->GetBool(); if (int wheel = event.GetWheelRotation()) { if (ForwardMouseWheelEvent(this, event) && !OPT_GET("Video/Disable Scroll Zoom")->GetBool()) { if (OPT_GET("Video/Reverse Zoom")->GetBool()) { 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())); } else { SetVideoZoom(wheel / event.GetWheelDelta());