]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/control.cpp
removed useless assert from wxArray::Alloc
[wxWidgets.git] / src / mac / control.cpp
index cbbd8e34297699b9c6876a35dba98028cbce2c58..df3790521ac6fdc21f547c9c520369da1dbe313d 100644 (file)
@@ -16,6 +16,7 @@
 #include "wx/control.h"
 #include "wx/panel.h"
 #include "wx/app.h"
+#include "wx/dc.h"
 #include "wx/notebook.h"
 #include "wx/tabctrl.h"
 #include "wx/radiobox.h"
@@ -69,7 +70,7 @@ wxControl::wxControl()
 
        if ( wxMacLiveScrollbarActionUPP == NULL )
        {
-#ifdef __UNIX__
+#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
         wxMacLiveScrollbarActionUPP = NewControlActionUPP( wxMacLiveScrollbarActionProc );
 #else
                wxMacLiveScrollbarActionUPP = NewControlActionProc( wxMacLiveScrollbarActionProc ) ;
@@ -302,6 +303,8 @@ void wxControl::MacAdjustControlRect()
                        if ( IsKindOf( CLASSINFO( wxButton ) ) )
                        {
                                m_width = m_label.Length() * 8 + 12 ;
+                               if ( m_width < 70 )
+                                 m_width = 70 ;
                        }
                        else if ( IsKindOf( CLASSINFO( wxStaticText ) ) )
                        {
@@ -643,7 +646,6 @@ void wxControl::MacRedrawControl()
                                
                                UMADrawControl( m_macControl ) ;
                                UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
-                               wxDC::MacInvalidateSetup() ;
                        }
                }
        }
@@ -685,7 +687,6 @@ void wxControl::OnPaint(wxPaintEvent& event)
                                
                                UMADrawControl( m_macControl ) ;
                                UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
-                               wxDC::MacInvalidateSetup() ;
                        }
                }
        }