Commit de541224 authored by twanvl's avatar twanvl

attempt to reduce flicker by override EVT_ERASE_BACKGROUND

parent cb8e37be
......@@ -152,6 +152,7 @@ BEGIN_EVENT_TABLE(HoverButtonBase, wxControl)
EVT_KEY_DOWN (HoverButtonBase::onKeyDown)
EVT_KEY_UP (HoverButtonBase::onKeyUp)
EVT_MOUSE_CAPTURE_LOST(HoverButtonBase::onLoseCapture)
EVT_ERASE_BACKGROUND(HoverButtonBase::onEraseBackground)
END_EVENT_TABLE ()
// ----------------------------------------------------------------------------- : Button with image and hover effect
......
......@@ -54,6 +54,7 @@ class HoverButtonBase : public wxControl {
void onKeyDown (wxKeyEvent&);
void onKeyUp (wxKeyEvent&);
void onPaint (wxPaintEvent&);
void onEraseBackground(wxEraseEvent&) {}
protected:
bool hover, focus, mouse_down, key_down;
......
......@@ -144,6 +144,7 @@ BEGIN_EVENT_TABLE(WelcomeWindow, wxFrame)
EVT_BUTTON (ID_FILE_RECENT, WelcomeWindow::onOpenLast)
EVT_BUTTON (ID_FILE_CHECK_UPDATES, WelcomeWindow::onCheckUpdates)
EVT_PAINT ( WelcomeWindow::onPaint)
EVT_ERASE_BACKGROUND(WelcomeWindow::onEraseBackground)
// EVT_IDLE ( WelcomeWindow::onIdle)
END_EVENT_TABLE ()
......
......@@ -41,6 +41,7 @@ class WelcomeWindow : public Frame {
void onNewSet (wxCommandEvent&);
void onOpenLast (wxCommandEvent&);
void onCheckUpdates(wxCommandEvent&);
void onEraseBackground(wxEraseEvent&) {}
// void onIdle (wxIdleEvent& ev);
/// Close the welcome window, and show the given set
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment