From: Vadim Zeitlin Date: Sat, 20 Apr 2002 23:36:16 +0000 (+0000) Subject: initialize (and delete) the themes art provider - fixes wxUniv app crashes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9ef3ebfbbe7bc01b1226b728de6158458baa2b96 initialize (and delete) the themes art provider - fixes wxUniv app crashes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/univ/themes/gtk.cpp b/src/univ/themes/gtk.cpp index 87973d24cb..ab9a0db5b4 100644 --- a/src/univ/themes/gtk.cpp +++ b/src/univ/themes/gtk.cpp @@ -257,7 +257,7 @@ public: virtual wxSize GetFrameMinSize(int flags) const; virtual wxSize GetFrameIconSize() const; virtual int HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const; - + virtual void GetComboBitmaps(wxBitmap *bmpNormal, wxBitmap *bmpFocus, wxBitmap *bmpPressed, @@ -601,7 +601,7 @@ private: wxInputHandler *GetDefaultInputHandler(); wxGTKRenderer *m_renderer; - + wxGTKArtProvider *m_artProvider; // the names of the already created handlers and the handlers themselves @@ -631,6 +631,7 @@ wxGTKTheme::wxGTKTheme() m_scheme = NULL; m_renderer = NULL; m_handlerDefault = NULL; + m_artProvider = NULL; } wxGTKTheme::~wxGTKTheme() @@ -645,6 +646,7 @@ wxGTKTheme::~wxGTKTheme() delete m_handlerDefault; delete m_renderer; delete m_scheme; + wxArtProvider::RemoveProvider(m_artProvider); } wxRenderer *wxGTKTheme::GetRenderer() @@ -1324,7 +1326,7 @@ void wxGTKRenderer::DrawCheckItem(wxDC& dc, DrawCheckButton(dc, _T(""), bitmap, rectBitmap, flags & ~wxCONTROL_FOCUSED); wxRect rectLabel = rect; - wxCoord shift = rectBitmap.width + 2*GetCheckItemMargin(); + wxCoord shift = rectBitmap.width + 2*GetCheckItemMargin(); rectLabel.x += shift; rectLabel.width -= shift; DrawItem(dc, label, rectLabel, flags); diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 4f02fc9394..ccf87bc3ff 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -1176,6 +1176,7 @@ wxWin32Theme::wxWin32Theme() m_scheme = NULL; m_renderer = NULL; m_handlerDefault = NULL; + m_artProvider = NULL; } wxWin32Theme::~wxWin32Theme() @@ -1191,6 +1192,7 @@ wxWin32Theme::~wxWin32Theme() delete m_renderer; delete m_scheme; + wxArtProvider::RemoveProvider(m_artProvider); } wxRenderer *wxWin32Theme::GetRenderer()