drawing the border based on the native control's border, as things like calctrl may override the GetPosition etc. call, so that we'd draw a border around the overall control instead of the day's part
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2198,9 +2198,24 @@ void wxWindowMac::MacPaintBorders( int left , int top )
|
||||
if( IsTopLevel() )
|
||||
return ;
|
||||
|
||||
int w , h ;
|
||||
GetSize( &w , &h ) ;
|
||||
Rect rect = { top , left , h + top , w + left } ;
|
||||
Rect rect ;
|
||||
m_peer->GetRect( &rect ) ;
|
||||
InsetRect( &rect, -MacGetLeftBorderSize() , -MacGetTopBorderSize() ) ;
|
||||
|
||||
if ( !IsTopLevel() )
|
||||
{
|
||||
wxTopLevelWindowMac* top = MacGetTopLevelWindow();
|
||||
if (top)
|
||||
{
|
||||
wxPoint pt(0,0) ;
|
||||
wxMacControl::Convert( &pt , GetParent()->m_peer , top->m_peer ) ;
|
||||
rect.left += pt.x ;
|
||||
rect.right += pt.x ;
|
||||
rect.top += pt.y ;
|
||||
rect.bottom += pt.y ;
|
||||
}
|
||||
}
|
||||
|
||||
if (HasFlag(wxRAISED_BORDER) || HasFlag( wxSUNKEN_BORDER) || HasFlag(wxDOUBLE_BORDER) )
|
||||
{
|
||||
Rect srect = rect ;
|
||||
|
Reference in New Issue
Block a user