From 0090b737ff36c419accb9a801dc633e89fb630df Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 15 Jun 2012 17:48:29 +0000 Subject: [PATCH] trying to improve appearance of gridcelltexteditor under OSX, see #14042 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grideditors.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/generic/grideditors.cpp b/src/generic/grideditors.cpp index 6af6ad1462..de8831342a 100644 --- a/src/generic/grideditors.cpp +++ b/src/generic/grideditors.cpp @@ -56,6 +56,10 @@ #define WXUNUSED_GTK(identifier) identifier #endif +#ifdef __WXOSX__ +#include "wx/osx/private.h" +#endif + // Required for wxIs... functions #include @@ -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; -- 2.47.2