simplified ::Show
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1357,22 +1357,21 @@ bool wxTopLevelWindowMac::Show(bool show)
|
|||||||
if ( !wxTopLevelWindowBase::Show(show) )
|
if ( !wxTopLevelWindowBase::Show(show) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
bool plainTransition = false;
|
||||||
|
|
||||||
|
#if wxUSE_SYSTEM_OPTIONS
|
||||||
|
// code contributed by Ryan Wilcox December 18, 2003
|
||||||
|
plainTransition = UMAGetSystemVersion() >= 0x1000 ;
|
||||||
|
if ( wxSystemOptions::HasOption(wxMAC_WINDOW_PLAIN_TRANSITION) )
|
||||||
|
plainTransition = ( wxSystemOptions::GetOptionInt( wxMAC_WINDOW_PLAIN_TRANSITION ) == 1 ) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (show)
|
if (show)
|
||||||
{
|
{
|
||||||
#if wxUSE_SYSTEM_OPTIONS
|
|
||||||
// code contributed by Ryan Wilcox December 18, 2003
|
|
||||||
bool plainTransition = UMAGetSystemVersion() >= 0x1000 ;
|
|
||||||
if ( wxSystemOptions::HasOption(wxMAC_WINDOW_PLAIN_TRANSITION) )
|
|
||||||
plainTransition = ( wxSystemOptions::GetOptionInt( wxMAC_WINDOW_PLAIN_TRANSITION ) == 1 ) ;
|
|
||||||
|
|
||||||
if ( plainTransition )
|
if ( plainTransition )
|
||||||
::ShowWindow( (WindowRef)m_macWindow );
|
::ShowWindow( (WindowRef)m_macWindow );
|
||||||
else
|
else
|
||||||
::TransitionWindow( (WindowRef)m_macWindow, kWindowZoomTransitionEffect, kWindowShowTransitionAction, NULL );
|
::TransitionWindow( (WindowRef)m_macWindow, kWindowZoomTransitionEffect, kWindowShowTransitionAction, NULL );
|
||||||
#else
|
|
||||||
|
|
||||||
::TransitionWindow( (WindowRef)m_macWindow, kWindowZoomTransitionEffect, kWindowShowTransitionAction, NULL );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
::SelectWindow( (WindowRef)m_macWindow ) ;
|
::SelectWindow( (WindowRef)m_macWindow ) ;
|
||||||
|
|
||||||
@@ -1383,19 +1382,10 @@ bool wxTopLevelWindowMac::Show(bool show)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if wxUSE_SYSTEM_OPTIONS
|
|
||||||
bool plainTransition = UMAGetSystemVersion() >= 0x1000 ;
|
|
||||||
if ( wxSystemOptions::HasOption(wxMAC_WINDOW_PLAIN_TRANSITION) )
|
|
||||||
plainTransition = ( wxSystemOptions::GetOptionInt( wxMAC_WINDOW_PLAIN_TRANSITION ) == 1 ) ;
|
|
||||||
if ( plainTransition )
|
if ( plainTransition )
|
||||||
{
|
::HideWindow( (WindowRef)m_macWindow );
|
||||||
::HideWindow((WindowRef) m_macWindow );
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
#endif
|
::TransitionWindow( (WindowRef)m_macWindow, kWindowZoomTransitionEffect, kWindowHideTransitionAction, NULL );
|
||||||
{
|
|
||||||
::TransitionWindow((WindowRef)m_macWindow, kWindowZoomTransitionEffect, kWindowHideTransitionAction, NULL );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MacPropagateVisibilityChanged() ;
|
MacPropagateVisibilityChanged() ;
|
||||||
@@ -1491,12 +1481,13 @@ void wxTopLevelWindowMac::SetExtraStyle(long exStyle)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// we are still using coordinates of the content view; TODO: switch to structure bounds
|
// we are still using coordinates of the content view
|
||||||
|
// TODO: switch to structure bounds
|
||||||
|
//
|
||||||
void wxTopLevelWindowMac::MacGetContentAreaInset( int &left , int &top , int &right , int &bottom )
|
void wxTopLevelWindowMac::MacGetContentAreaInset( int &left , int &top , int &right , int &bottom )
|
||||||
{
|
{
|
||||||
Rect content ;
|
Rect content, structure ;
|
||||||
Rect structure ;
|
|
||||||
GetWindowBounds( (WindowRef) m_macWindow, kWindowStructureRgn , &structure ) ;
|
GetWindowBounds( (WindowRef) m_macWindow, kWindowStructureRgn , &structure ) ;
|
||||||
GetWindowBounds( (WindowRef) m_macWindow, kWindowContentRgn , &content ) ;
|
GetWindowBounds( (WindowRef) m_macWindow, kWindowContentRgn , &content ) ;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user