X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c75a4cf0f94cbe53bfde4fbcddff741158fbc7c..a8cb1a4947bbbf5e18ce52448f4c3bb4cff4daee:/wxPython/demo/StyledTextCtrl_2.py diff --git a/wxPython/demo/StyledTextCtrl_2.py b/wxPython/demo/StyledTextCtrl_2.py index e976433ec7..589407b7cc 100644 --- a/wxPython/demo/StyledTextCtrl_2.py +++ b/wxPython/demo/StyledTextCtrl_2.py @@ -168,17 +168,11 @@ class PythonSTC(stc.StyledTextCtrl): # register some images for use in the AutoComplete box. self.RegisterImage(1, images.getSmilesBitmap()) - self.RegisterImage(2, self._fix_image( - wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_TOOLBAR, (16,16)))) - self.RegisterImage(3, self._fix_image( - wx.ArtProvider.GetBitmap(wx.ART_COPY, wx.ART_TOOLBAR, (16,16)))) - - def _fix_image(self, bmp): - img = bmp.ConvertToImage() - if img.HasAlpha(): - img.ConvertAlphaToMask() - bmp = wx.BitmapFromImage(img) - return bmp + self.RegisterImage(2, + wx.ArtProvider.GetBitmap(wx.ART_NEW, size=(16,16))) + self.RegisterImage(3, + wx.ArtProvider.GetBitmap(wx.ART_COPY, size=(16,16))) + def OnKeyPressed(self, event): if self.CallTipActive():