Kaydet (Commit) 143b635b authored tarafından Andre Fischer's avatar Andre Fischer

122620: Tweeked the splash screen a little.

üst cf9b9953
......@@ -55,6 +55,7 @@ SplashScreen::SplashScreen(const Reference< XMultiServiceFactory >& rSMgr)
: IntroWindow()
, _vdev(*((IntroWindow*)this))
, _cProgressFrameColor(sal::static_int_cast< ColorData >(NOT_LOADED))
, _bShowProgressFrame(true)
, _cProgressBarColor(sal::static_int_cast< ColorData >(NOT_LOADED))
, _bNativeProgress(true)
, _iMax(100)
......@@ -303,6 +304,8 @@ void SplashScreen::loadConfig()
OUString( RTL_CONSTASCII_USTRINGPARAM( "FullScreenSplash" ) ) );
OUString sNativeProgress = implReadBootstrapKey(
OUString( RTL_CONSTASCII_USTRINGPARAM( "NativeProgress" ) ) );
OUString sShowProgressFrame = implReadBootstrapKey(
OUString( RTL_CONSTASCII_USTRINGPARAM( "ShowProgressFrame" ) ) );
// Determine full screen splash mode
......@@ -334,6 +337,11 @@ void SplashScreen::loadConfig()
}
}
if (sShowProgressFrame.getLength() > 0)
{
_bShowProgressFrame = sShowProgressFrame.toBoolean();
}
if ( sProgressBarColor.getLength() )
{
sal_uInt8 nRed = 0;
......@@ -658,18 +666,40 @@ void SplashScreen::Paint( const Rectangle&)
if (_bPaintBitmap)
_vdev.DrawBitmapEx( Point(), _aIntroBmp );
if (_bPaintProgress) {
if (_bPaintProgress)
{
// draw progress...
long length = (_iProgress * _barwidth / _iMax) - (2 * _barspace);
if (length < 0) length = 0;
// border
_vdev.SetFillColor();
_vdev.SetLineColor( _cProgressFrameColor );
_vdev.DrawRect(Rectangle(_tlx, _tly, _tlx+_barwidth, _tly+_barheight));
_vdev.SetFillColor( _cProgressBarColor );
_vdev.SetLineColor();
_vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace));
long length = (_iProgress * _barwidth / _iMax);
if (_bShowProgressFrame)
length -= (2 * _barspace);
if (length < 0)
length = 0;
if (_bShowProgressFrame)
{
// border
_vdev.SetFillColor();
_vdev.SetLineColor( _cProgressFrameColor );
_vdev.DrawRect(Rectangle(_tlx, _tly, _tlx+_barwidth, _tly+_barheight));
_vdev.SetFillColor( _cProgressBarColor );
_vdev.SetLineColor();
_vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace));
_vdev.DrawText( Rectangle(_tlx, _tly+_barheight+5, _tlx+_barwidth, _tly+_barheight+5+20), _sProgressText, TEXT_DRAW_CENTER );
}
else
{
// Show flat progress bar without frame.
// border
_vdev.SetFillColor( _cProgressFrameColor );
_vdev.SetLineColor();
_vdev.DrawRect(Rectangle(_tlx, _tly, _tlx+_barwidth, _tly+_barheight));
_vdev.SetFillColor( _cProgressBarColor );
_vdev.SetLineColor();
_vdev.DrawRect(Rectangle(_tlx, _tly, _tlx+length, _tly+_barheight));
}
_vdev.DrawText( Rectangle(_tlx, _tly+_barheight+5, _tlx+_barwidth, _tly+_barheight+5+20), _sProgressText, TEXT_DRAW_CENTER );
}
Size aSize = GetOutputSizePixel();
......
......@@ -84,6 +84,7 @@ private:
VirtualDevice _vdev;
BitmapEx _aIntroBmp;
Color _cProgressFrameColor;
bool _bShowProgressFrame;
Color _cProgressBarColor;
bool _bNativeProgress;
OUString _sAppName;
......
......@@ -20,10 +20,11 @@ Globals
LIBRARYVERSION 10.0.0
POOLPRODUCT 1
PROGRESSBARCOLOR 14,133,205
PROGRESSSIZE 320,7
PROGRESSPOSITION 185,206
PROGRESSSIZE 432,4
PROGRESSPOSITION 60,180
PROGRESSFRAMECOLOR 207,208,211
NATIVEPROGRESS true
SHOWPROGRESSFRAME false
NATIVEPROGRESS false
REGISTRYLAYERNAME Layers
SERVICEPACK 1
UPDATE_DATABASE 1
......
......@@ -848,6 +848,15 @@ ProfileItem gid_Brand_Profileitem_Soffice_ProgressFrameColor_So
Value = "${PROGRESSFRAMECOLOR}";
End
ProfileItem gid_Brand_Profileitem_Soffice_ShowProgressFrame_So
ProfileID = gid_Brand_Profile_Soffice_Ini;
ModuleID = gid_Module_Root_Brand;
Section = "Bootstrap";
Order = 5;
Key = "ShowProgressFrame";
Value = "${SHOWPROGRESSFRAME}";
End
ProfileItem gid_Brand_Profileitem_Soffice_NativeProgress_So
ProfileID = gid_Brand_Profile_Soffice_Ini;
ModuleID = gid_Module_Root_Brand;
......
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