forked from mia/Aegisub
Add option toggling behaviour of Ctrl+Zoom
This commit is contained in:
parent
ba0db4da70
commit
fa33b07c7f
4 changed files with 11 additions and 5 deletions
|
@ -612,6 +612,7 @@
|
|||
"Show Keyframes" : true
|
||||
},
|
||||
"Subtitle Sync" : true,
|
||||
"Video Pan": false
|
||||
"Video Pan": false,
|
||||
"Default to Video Zoom": false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -612,6 +612,7 @@
|
|||
"Show Keyframes" : 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->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
|
||||
|
|
|
@ -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 Video Zoom")->GetBool())) {
|
||||
SetWindowZoom(windowZoomValue + .125 * (wheel / event.GetWheelDelta()));
|
||||
else
|
||||
} else {
|
||||
SetVideoZoom(wheel / event.GetWheelDelta());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue