From 56caea07f8ab1ae3013617695e0613ad0bec061a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 26 May 2005 19:25:26 +0000 Subject: [PATCH] use wx.ART_NEW git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/StyledTextCtrl_2.py | 16 +++++----------- wxPython/wx/tools/XRCed/xrced.py | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/wxPython/demo/StyledTextCtrl_2.py b/wxPython/demo/StyledTextCtrl_2.py index f84912ec10..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_NEW, 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(): diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index fef037a828..0cc4713948 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -177,7 +177,7 @@ class Frame(wxFrame): # Create toolbar tb = self.CreateToolBar(wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT) tb.SetToolBitmapSize((24,24)) - new_bmp = wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_TOOLBAR) + new_bmp = wx.ArtProvider.GetBitmap(wx.ART_NEW, wx.ART_TOOLBAR) open_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR) save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE, wx.ART_TOOLBAR) undo_bmp = wx.ArtProvider.GetBitmap(wx.ART_UNDO, wx.ART_TOOLBAR) -- 2.45.2