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:
parent
5c72e0c354
commit
b1314bbca4
@ -304,9 +304,10 @@ public:
|
||||
|
||||
#if wxUSE_GIF && wxUSE_TIMER
|
||||
void AdvanceAnimation(wxTimer *timer);
|
||||
virtual void Layout(int w) wxOVERRIDE;
|
||||
#endif
|
||||
|
||||
virtual void Layout(int w) wxOVERRIDE;
|
||||
|
||||
private:
|
||||
wxBitmap *m_bitmap;
|
||||
int m_align;
|
||||
@ -538,6 +539,7 @@ void wxHtmlImageCell::AdvanceAnimation(wxTimer *timer)
|
||||
delay = 1;
|
||||
timer->Start(delay, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
void wxHtmlImageCell::Layout(int w)
|
||||
{
|
||||
@ -571,10 +573,10 @@ void wxHtmlImageCell::Layout(int w)
|
||||
}
|
||||
|
||||
wxHtmlCell::Layout(w);
|
||||
#if wxUSE_GIF && wxUSE_TIMER
|
||||
m_physX = m_physY = wxDefaultCoord;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
wxHtmlImageCell::~wxHtmlImageCell()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user