mirror of https://github.com/odrling/Aegisub
Update the size of the karaoke syllable bar when the window is resized. Updates #1516.
This commit is contained in:
parent
1b089795f1
commit
b020322a3a
|
@ -95,7 +95,7 @@ AudioKaraoke::AudioKaraoke(wxWindow *parent, agi::Context *c)
|
|||
split_font.SetFaceName(OPT_GET("Audio/Karaoke/Font Face")->GetString());
|
||||
split_font.SetPointSize(OPT_GET("Audio/Karaoke/Font Size")->GetInt());
|
||||
|
||||
Bind(wxEVT_SIZE, bind(&AudioKaraoke::Refresh, this, false, (const wxRect*)0));
|
||||
split_area->Bind(wxEVT_SIZE, &AudioKaraoke::OnSize, this);
|
||||
split_area->Bind(wxEVT_PAINT, &AudioKaraoke::OnPaint, this);
|
||||
split_area->Bind(wxEVT_LEFT_DOWN, &AudioKaraoke::OnMouse, this);
|
||||
split_area->Bind(wxEVT_LEFT_UP, &AudioKaraoke::OnMouse, this);
|
||||
|
@ -153,6 +153,11 @@ void AudioKaraoke::SetEnabled(bool en) {
|
|||
}
|
||||
}
|
||||
|
||||
void AudioKaraoke::OnSize(wxSizeEvent &evt) {
|
||||
RenderText();
|
||||
Refresh(false);
|
||||
}
|
||||
|
||||
void AudioKaraoke::OnPaint(wxPaintEvent &) {
|
||||
int w, h;
|
||||
split_area->GetClientSize(&w, &h);
|
||||
|
|
|
@ -138,6 +138,7 @@ class AudioKaraoke : public wxWindow, private SelectionListener<AssDialogue> {
|
|||
void OnFileChanged(int type);
|
||||
void OnMouse(wxMouseEvent &event);
|
||||
void OnPaint(wxPaintEvent &event);
|
||||
void OnSize(wxSizeEvent &event);
|
||||
void OnSelectedSetChanged(Selection const&, Selection const&) { }
|
||||
void OnAudioOpened();
|
||||
void OnAudioClosed();
|
||||
|
|
Loading…
Reference in New Issue