forked from mia/Aegisub
Don't let the user drag the audio sash below the bottom of the window as it's rather hard to drag back afterwards
Originally committed to SVN as r5675.
This commit is contained in:
parent
a00a3047cb
commit
fca7657e60
1 changed files with 3 additions and 3 deletions
|
@ -640,10 +640,10 @@ void FrameMain::OnAudioBoxResize(wxSashEvent &event) {
|
|||
if (event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE)
|
||||
return;
|
||||
|
||||
wxRect rect = event.GetDragRect();
|
||||
int new_height = std::min(event.GetDragRect().GetHeight(), Panel->GetSize().GetHeight() - 1);
|
||||
|
||||
OPT_SET("Audio/Display Height")->SetInt(rect.GetHeight());
|
||||
audioSash->SetMinSize(wxSize(-1, rect.GetHeight()));
|
||||
OPT_SET("Audio/Display Height")->SetInt(new_height);
|
||||
audioSash->SetMinSize(wxSize(-1, new_height));
|
||||
Panel->Layout();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue