]> git.saurik.com Git - wxWidgets.git/commitdiff
trying to improve appearance of gridcelltexteditor under OSX, see #14042
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 15 Jun 2012 17:48:29 +0000 (17:48 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 15 Jun 2012 17:48:29 +0000 (17:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grideditors.cpp

index 6af6ad1462735bf873ddbb81f11b501b78015559..de8831342a728a87d2a96e887815832d0e04cd95 100644 (file)
     #define WXUNUSED_GTK(identifier)    identifier
 #endif
 
+#ifdef __WXOSX__
+#include "wx/osx/private.h"
+#endif
+
 // Required for wxIs... functions
 #include <ctype.h>
 
@@ -406,6 +410,10 @@ void wxGridCellTextEditor::DoCreate(wxWindow* parent,
                                wxDefaultPosition, wxDefaultSize,
                                style);
 
+#ifdef __WXOSX__
+    wxWidgetImpl* impl = m_control->GetPeer();
+    impl->SetNeedsFocusRect(false);
+#endif
     // set max length allowed in the textctrl, if the parameter was set
     if ( m_maxChars != 0 )
     {
@@ -451,6 +459,12 @@ void wxGridCellTextEditor::SetSize(const wxRect& rectOrig)
 
     rect.width -= 2;
     rect.height -= 2;
+#elif defined(__WXOSX__)
+    rect.x += 1;
+    rect.y += 1;
+    
+    rect.width -= 1;
+    rect.height -= 1;
 #else
     int extra_x = ( rect.x > 2 ) ? 2 : 1;
     int extra_y = ( rect.y > 2 ) ? 2 : 1;