Fix display of PNG images in wxHTML when GIF is disabled
Too much code was taken in "#if wxUSE_GIF" check, move Layout() out from it to make PNG images work even if GIF support is disabled. Closes #17181
This commit is contained in:
@@ -304,9 +304,10 @@ public:
|
|||||||
|
|
||||||
#if wxUSE_GIF && wxUSE_TIMER
|
#if wxUSE_GIF && wxUSE_TIMER
|
||||||
void AdvanceAnimation(wxTimer *timer);
|
void AdvanceAnimation(wxTimer *timer);
|
||||||
virtual void Layout(int w) wxOVERRIDE;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
virtual void Layout(int w) wxOVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxBitmap *m_bitmap;
|
wxBitmap *m_bitmap;
|
||||||
int m_align;
|
int m_align;
|
||||||
@@ -538,6 +539,7 @@ void wxHtmlImageCell::AdvanceAnimation(wxTimer *timer)
|
|||||||
delay = 1;
|
delay = 1;
|
||||||
timer->Start(delay, true);
|
timer->Start(delay, true);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void wxHtmlImageCell::Layout(int w)
|
void wxHtmlImageCell::Layout(int w)
|
||||||
{
|
{
|
||||||
@@ -571,10 +573,10 @@ void wxHtmlImageCell::Layout(int w)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxHtmlCell::Layout(w);
|
wxHtmlCell::Layout(w);
|
||||||
|
#if wxUSE_GIF && wxUSE_TIMER
|
||||||
m_physX = m_physY = wxDefaultCoord;
|
m_physX = m_physY = wxDefaultCoord;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
wxHtmlImageCell::~wxHtmlImageCell()
|
wxHtmlImageCell::~wxHtmlImageCell()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user