Add option toggling behaviour of Ctrl+Zoom
This commit is contained in:
parent
ba0db4da70
commit
ff46b860a2
4 changed files with 10 additions and 5 deletions
|
@ -612,6 +612,7 @@
|
|||
"Show Keyframes" : true
|
||||
},
|
||||
"Subtitle Sync" : true,
|
||||
"Video Pan": false
|
||||
"Video Pan": false,
|
||||
"Default to UI Zoom": false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -612,6 +612,7 @@
|
|||
"Show Keyframes" : true
|
||||
},
|
||||
"Subtitle Sync" : true,
|
||||
"Video Pan": false
|
||||
"Video Pan": false,
|
||||
"Default to UI Zoom": false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue