Skip to content
Extraits de code Groupes Projets
Valider b020322a rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Update the size of the karaoke syllable bar when the window is resized. Updates #1516.

parent 1b089795
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -95,7 +95,7 @@ AudioKaraoke::AudioKaraoke(wxWindow *parent, agi::Context *c) ...@@ -95,7 +95,7 @@ AudioKaraoke::AudioKaraoke(wxWindow *parent, agi::Context *c)
split_font.SetFaceName(OPT_GET("Audio/Karaoke/Font Face")->GetString()); split_font.SetFaceName(OPT_GET("Audio/Karaoke/Font Face")->GetString());
split_font.SetPointSize(OPT_GET("Audio/Karaoke/Font Size")->GetInt()); 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_PAINT, &AudioKaraoke::OnPaint, this);
split_area->Bind(wxEVT_LEFT_DOWN, &AudioKaraoke::OnMouse, this); split_area->Bind(wxEVT_LEFT_DOWN, &AudioKaraoke::OnMouse, this);
split_area->Bind(wxEVT_LEFT_UP, &AudioKaraoke::OnMouse, this); split_area->Bind(wxEVT_LEFT_UP, &AudioKaraoke::OnMouse, this);
...@@ -153,6 +153,11 @@ void AudioKaraoke::SetEnabled(bool en) { ...@@ -153,6 +153,11 @@ void AudioKaraoke::SetEnabled(bool en) {
} }
} }
void AudioKaraoke::OnSize(wxSizeEvent &evt) {
RenderText();
Refresh(false);
}
void AudioKaraoke::OnPaint(wxPaintEvent &) { void AudioKaraoke::OnPaint(wxPaintEvent &) {
int w, h; int w, h;
split_area->GetClientSize(&w, &h); split_area->GetClientSize(&w, &h);
......
...@@ -138,6 +138,7 @@ class AudioKaraoke : public wxWindow, private SelectionListener<AssDialogue> { ...@@ -138,6 +138,7 @@ class AudioKaraoke : public wxWindow, private SelectionListener<AssDialogue> {
void OnFileChanged(int type); void OnFileChanged(int type);
void OnMouse(wxMouseEvent &event); void OnMouse(wxMouseEvent &event);
void OnPaint(wxPaintEvent &event); void OnPaint(wxPaintEvent &event);
void OnSize(wxSizeEvent &event);
void OnSelectedSetChanged(Selection const&, Selection const&) { } void OnSelectedSetChanged(Selection const&, Selection const&) { }
void OnAudioOpened(); void OnAudioOpened();
void OnAudioClosed(); void OnAudioClosed();
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter