mirror of https://github.com/odrling/Aegisub
Add option toggling behaviour of Ctrl+Zoom
This commit is contained in:
parent
ba0db4da70
commit
fa33b07c7f
|
@ -612,6 +612,7 @@
|
||||||
"Show Keyframes" : true
|
"Show Keyframes" : true
|
||||||
},
|
},
|
||||||
"Subtitle Sync" : true,
|
"Subtitle Sync" : true,
|
||||||
"Video Pan": false
|
"Video Pan": false,
|
||||||
|
"Default to Video Zoom": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -612,6 +612,7 @@
|
||||||
"Show Keyframes" : true
|
"Show Keyframes" : true
|
||||||
},
|
},
|
||||||
"Subtitle Sync" : true,
|
"Subtitle Sync" : true,
|
||||||
"Video Pan": false
|
"Video Pan": false,
|
||||||
|
"Default to Video Zoom": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -435,6 +435,8 @@ void Advanced_Video(wxTreebook *book, Preferences *parent) {
|
||||||
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, _("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
|
||||||
|
|
|
@ -409,11 +409,13 @@ void VideoDisplay::OnMouseLeave(wxMouseEvent& event) {
|
||||||
void VideoDisplay::OnMouseWheel(wxMouseEvent& event) {
|
void VideoDisplay::OnMouseWheel(wxMouseEvent& event) {
|
||||||
bool videoPan = OPT_GET("Video/Video Pan")->GetBool();
|
bool videoPan = OPT_GET("Video/Video Pan")->GetBool();
|
||||||
if (int wheel = event.GetWheelRotation()) {
|
if (int wheel = event.GetWheelRotation()) {
|
||||||
if (ForwardMouseWheelEvent(this, event))
|
if (ForwardMouseWheelEvent(this, event)) {
|
||||||
if (event.ControlDown() || !videoPan)
|
if (!videoPan || (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