From: Stefan Csomor <csomor@advancedconcepts.ch>
Date: Mon, 15 Jun 2009 21:31:24 +0000 (+0000)
Subject: moving to a 10.4 compatible implementation
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/da52d42b9da5513de2d7a7575ac0ef647b34cb43

moving to a 10.4 compatible implementation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/osx/cocoa/button.mm b/src/osx/cocoa/button.mm
index 54becf5d1a..9efc79667e 100644
--- a/src/osx/cocoa/button.mm
+++ b/src/osx/cocoa/button.mm
@@ -270,6 +270,23 @@ void wxWidgetCocoaImpl::PerformClick()
 
 @end
 
+static const char * disc_triangle_xpm[] = {
+"10 9 4 1",
+"   c None",
+".  c #737373",
+"+  c #989898",
+"-  c #c6c6c6",
+" .-       ",
+" ..+-     ",
+" ....+    ",
+" ......-  ",
+" .......- ",
+" ......-  ",
+" ....+    ",
+" ..+-     ",
+" .-       ",
+};
+
 @implementation wxDisclosureNSButton
 
 + (void)initialize
@@ -313,15 +330,16 @@ wxCFRef<NSImage*> downArray ;
 
 - (void) updateImage
 {
+    static wxBitmap trianglebm(disc_triangle_xpm);
     if ( downArray.get() == NULL )
     {
-        downArray.reset( [wxDisclosureNSButton rotateImage:[NSImage imageNamed:NSImageNameRightFacingTriangleTemplate]] );
+        downArray.reset( [wxDisclosureNSButton rotateImage:trianglebm.GetNSImage()] );
     }
     
     if ( isOpen )
         [self setImage:(NSImage*)downArray.get()];
     else
-        [self setImage:[NSImage imageNamed:NSImageNameRightFacingTriangleTemplate]];
+        [self setImage:trianglebm.GetNSImage()];
 }
 
 + (NSImage *)rotateImage: (NSImage *)image