Kaydet (Commit) 3b80c1ac authored tarafından Caolán McNamara's avatar Caolán McNamara

add a basic GetOptimalSize to progress bar

Change-Id: I34b98d4c98b3f9af062473f254ffeadb05130471
üst 2bb1a845
......@@ -79,9 +79,10 @@ public:
virtual void Resize();
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual Size GetOptimalSize() const;
void SetValue( sal_uInt16 nNewPercent );
sal_uInt16 GetValue() const { return mnPercent; }
sal_uInt16 GetValue() const { return mnPercent; }
};
#endif // INCLUDED_VCL_PRGSBAR_HXX
......
......@@ -43,10 +43,15 @@ static WinBits clearProgressBarBorder( Window* pParent, WinBits nOrgStyle )
return nOutStyle;
}
Size ProgressBar::GetOptimalSize() const
{
return Size(150, 20);
}
ProgressBar::ProgressBar( Window* pParent, WinBits nWinStyle ) :
Window( pParent, clearProgressBarBorder( pParent, nWinStyle ) )
{
SetOutputSizePixel( Size( 150, 20 ) );
SetOutputSizePixel( GetOptimalSize() );
ImplInit();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment