Commit ef988aca authored by twanvl's avatar twanvl

redraw on resize

parent 1847fb7d
...@@ -171,6 +171,10 @@ void GalleryList::OnDraw(DC& dc) { ...@@ -171,6 +171,10 @@ void GalleryList::OnDraw(DC& dc) {
} }
} }
void GalleryList::onSize(wxSizeEvent&) {
update();
}
void GalleryList::sendEvent(WXTYPE type) { void GalleryList::sendEvent(WXTYPE type) {
wxCommandEvent ev(type, GetId()); wxCommandEvent ev(type, GetId());
ProcessEvent(ev); ProcessEvent(ev);
...@@ -183,4 +187,5 @@ BEGIN_EVENT_TABLE(GalleryList, wxScrolledWindow) ...@@ -183,4 +187,5 @@ BEGIN_EVENT_TABLE(GalleryList, wxScrolledWindow)
EVT_LEFT_DCLICK (GalleryList::onLeftDClick) EVT_LEFT_DCLICK (GalleryList::onLeftDClick)
EVT_CHAR (GalleryList::onChar) EVT_CHAR (GalleryList::onChar)
EVT_PAINT (GalleryList::onPaint) EVT_PAINT (GalleryList::onPaint)
EVT_SIZE (GalleryList::onSize)
END_EVENT_TABLE () END_EVENT_TABLE ()
...@@ -59,6 +59,7 @@ class GalleryList : public wxScrolledWindow { ...@@ -59,6 +59,7 @@ class GalleryList : public wxScrolledWindow {
void onLeftDClick(wxMouseEvent& ev); void onLeftDClick(wxMouseEvent& ev);
void onChar(wxKeyEvent& ev); void onChar(wxKeyEvent& ev);
void onPaint(wxPaintEvent&); void onPaint(wxPaintEvent&);
void onSize(wxSizeEvent&);
void OnDraw(DC& dc); void OnDraw(DC& dc);
/// Find the item corresponding to the given location /// Find the item corresponding to the given location
......
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