From: Stefan Neis Date: Wed, 23 Feb 2000 18:26:47 +0000 (+0000) Subject: Improved wxMotif's look. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cb105ad4346fb32a9fc0e31cc57654aa90bc12f2 Improved wxMotif's look. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 2e625da139..b966f83d1c 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -483,14 +483,16 @@ void wxGridCellTextEditor::SetSize(const wxRect& rectOrig) #if defined(__WXGTK__) rect.Inflate(rect.x ? 1 : 0, rect.y ? 1 : 0); #else // !GTK - int extra = rect.x && rect.y ? 2 : 1; + int extra_x = ( rect.x > 2 )? 2 : 1; + int extra_y = ( rect.y > 2 )? 2 : 1; #if defined(__WXMOTIF__) - extra *= 2; + extra_x *= 2; + extra_y *= 2; #endif - rect.SetLeft( wxMax(0, rect.x - extra) ); - rect.SetTop( wxMax(0, rect.y - extra) ); - rect.SetRight( rect.GetRight() + 2*extra ); - rect.SetBottom( rect.GetBottom() + 2*extra ); + rect.SetLeft( wxMax(0, rect.x - extra_x) ); + rect.SetTop( wxMax(0, rect.y - extra_y) ); + rect.SetRight( rect.GetRight() + 2*extra_x ); + rect.SetBottom( rect.GetBottom() + 2*extra_y ); #endif // GTK/!GTK wxGridCellEditor::SetSize(rect);