no message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0ff2493d74
commit
2b1fe32e2e
@ -47,8 +47,10 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
|
||||
m_peer = new wxMacControl() ;
|
||||
verify_noerr ( CreateProgressBarControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
|
||||
GetValue() , 0 , GetRange() , false /* not indeterminate */ , m_peer->GetControlRefAddr() ) );
|
||||
|
||||
|
||||
|
||||
if ( GetValue() == 0 )
|
||||
m_peer->SetData<Boolean>( kControlEntireControl , kControlProgressBarAnimatingTag , (Boolean) false ) ;
|
||||
|
||||
MacPostControlCreate(pos,size) ;
|
||||
|
||||
return TRUE;
|
||||
@ -69,7 +71,18 @@ void wxGauge::SetValue(int pos)
|
||||
// some change behind the values by it
|
||||
wxGaugeBase::SetValue(pos) ;
|
||||
if ( m_peer && m_peer->Ok() )
|
||||
{
|
||||
m_peer->SetValue( GetValue() ) ;
|
||||
Boolean shouldAnimate = ( GetValue() > 0 && GetValue() < GetRange() ) ;
|
||||
if ( m_peer->GetData<Boolean>( kControlEntireControl , kControlProgressBarAnimatingTag ) != shouldAnimate )
|
||||
{
|
||||
m_peer->SetData<Boolean>( kControlEntireControl , kControlProgressBarAnimatingTag , shouldAnimate ) ;
|
||||
if ( !shouldAnimate )
|
||||
{
|
||||
Refresh() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int wxGauge::GetValue() const
|
||||
|
Loading…
Reference in New Issue
Block a user