Add option toggling behaviour of Ctrl+Zoom

This commit is contained in:
arch1t3cht 2022-07-11 18:51:33 +02:00
parent ba0db4da70
commit ff46b860a2
4 changed files with 10 additions and 5 deletions

View file

@ -612,6 +612,7 @@
"Show Keyframes" : true
},
"Subtitle Sync" : true,
"Video Pan": false
"Video Pan": false,
"Default to UI Zoom": false
}
}

View file

@ -612,6 +612,7 @@
"Show Keyframes" : true
},
"Subtitle Sync" : true,
"Video Pan": false
"Video Pan": false,
"Default to UI Zoom": false
}
}

View file

@ -435,6 +435,7 @@ void Advanced_Video(wxTreebook *book, Preferences *parent) {
p->OptionChoice(expert, _("Subtitles provider"), sp_choice, "Subtitle/Provider");
p->OptionAdd(expert, _("Video Panning"), "Video/Video Pan");
p->OptionAdd(expert, _("Default to UI Zoom"), "Video/Default to UI Zoom");
#ifdef WITH_AVISYNTH

View file

@ -409,11 +409,13 @@ 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))
if (event.ControlDown() || !videoPan)
if (ForwardMouseWheelEvent(this, event)) {
if (!videoPan || (event.ControlDown() != OPT_GET("Video/Default to UI Zoom")->GetBool())) {
SetWindowZoom(windowZoomValue + .125 * (wheel / event.GetWheelDelta()));
else
} else {
SetVideoZoom(wheel / event.GetWheelDelta());
}
}
}
}