config_host.mk.in | 2 + configure.in | 22 +++++++++++++++ desktop/source/splash/splash.cxx | 46 ++++++++++++++++++++++++++++++-- scp2/source/ooo/common_brand.scp | 18 ++++++++++++ solenv/bin/modules/installer/ziplist.pm | 2 + 5 files changed, 88 insertions(+), 2 deletions(-)
New commits: commit b14073218ea28a5bf05cd639e30215787d67114c Author: Ivan Timofeev <timofeev....@gmail.com> Date: Sat Sep 29 20:03:12 2012 +0400 fdo#52268: splash: change color and position of messages Change-Id: If6c607fc9f0be1f7a71eda8d555399451938c5fc diff --git a/config_host.mk.in b/config_host.mk.in index d6f5f16..48b470e 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -465,6 +465,8 @@ export PRODUCTNAME=@PRODUCTNAME@ export PRODUCTVERSION=@PRODUCTVERSION@ export PROGRESSBARCOLOR=@PROGRESSBARCOLOR@ export PROGRESSFRAMECOLOR=@PROGRESSFRAMECOLOR@ +export PROGRESSTEXTCOLOR=@PROGRESSTEXTCOLOR@ +export PROGRESSTEXTBASELINE=@PROGRESSTEXTBASELINE@ export PROGRESSPOSITION=@PROGRESSPOSITION@ export PROGRESSSIZE=@PROGRESSSIZE@ export PROEXT=@PROEXT@ diff --git a/configure.in b/configure.in index 93b828d..34dfce7 100644 --- a/configure.in +++ b/configure.in @@ -12053,6 +12053,28 @@ else fi AC_SUBST(PROGRESSFRAMECOLOR) +AC_MSG_CHECKING([for custom 'intro' progress text color]) +PROGRESSTEXTCOLOR= +if test -z "$with_intro_progressbar_text_color"; then + PROGRESSTEXTCOLOR="255,255,255" + AC_MSG_RESULT([none]) +else + PROGRESSTEXTCOLOR="$with_intro_progressbar_text_color" + AC_MSG_RESULT([$PROGRESSTEXTCOLOR]) +fi +AC_SUBST(PROGRESSTEXTCOLOR) + +AC_MSG_CHECKING([for custom 'intro' progress text baseline]) +PROGRESSTEXTBASELINE= +if test -z "$with_intro_progressbar_text_baseline"; then + PROGRESSTEXTBASELINE="287" + AC_MSG_RESULT([none]) +else + PROGRESSTEXTBASELINE="$with_intro_progressbar_text_baseline" + AC_MSG_RESULT([$PROGRESSTEXTBASELINE]) +fi +AC_SUBST(PROGRESSTEXTBASELINE) + AC_MSG_CHECKING([for alternative branding images directory]) INTRO_BITMAP= ABOUT_BACKGROUND_SVG= diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index 38de2eb..e55b5b2 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -86,6 +86,7 @@ private: BitmapEx _aIntroBmp; Color _cProgressFrameColor; Color _cProgressBarColor; + Color _cProgressTextColor; bool _bNativeProgress; OUString _sAppName; OUString _sProgressText; @@ -101,7 +102,7 @@ private: sal_Bool _bFullScreenSplash; sal_Bool _bProgressEnd; long _height, _width, _tlx, _tly, _barwidth; - long _barheight, _barspace; + long _barheight, _barspace, _textBaseline; double _fXPos, _fYPos; double _fWidth, _fHeight; const long _xoffset, _yoffset; @@ -130,6 +131,7 @@ SplashScreen::SplashScreen() , _vdev(*((IntroWindow*)this)) , _cProgressFrameColor(sal::static_int_cast< ColorData >(NOT_LOADED)) , _cProgressBarColor(sal::static_int_cast< ColorData >(NOT_LOADED)) + , _cProgressTextColor(sal::static_int_cast< ColorData >(NOT_LOADED)) , _bNativeProgress(true) , _iMax(100) , _iProgress(0) @@ -144,6 +146,7 @@ SplashScreen::SplashScreen() , _barwidth(NOT_LOADED) , _barheight(NOT_LOADED) , _barspace(2) + , _textBaseline(NOT_LOADED) , _fXPos(-1.0) , _fYPos(-1.0) , _fWidth(-1.0) @@ -297,6 +300,9 @@ SplashScreen::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::sta } } + if ( NOT_LOADED == _textBaseline ) + _textBaseline = _height; + if ( sal::static_int_cast< ColorData >(NOT_LOADED) == _cProgressFrameColor.GetColor() ) _cProgressFrameColor = Color( COL_LIGHTGRAY ); @@ -311,6 +317,10 @@ SplashScreen::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::sta _cProgressBarColor = Color( COL_BLUE ); } + if ( sal::static_int_cast< ColorData >(NOT_LOADED) == + _cProgressTextColor.GetColor() ) + _cProgressTextColor = Color( COL_BLACK ); + Application::AddEventListener( LINK( this, SplashScreen, AppEventListenerHdl ) ); @@ -363,6 +373,10 @@ void SplashScreen::loadConfig() OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressFrameColor" ) ) ); OUString sProgressBarColor = implReadBootstrapKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressBarColor" ) ) ); + OUString sProgressTextColor = implReadBootstrapKey( + OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressTextColor" ) ) ); + OUString sProgressTextBaseline = implReadBootstrapKey( + OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressTextBaseline" ) ) ); OUString sSize = implReadBootstrapKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressSize" ) ) ); OUString sPosition = implReadBootstrapKey( @@ -418,6 +432,29 @@ void SplashScreen::loadConfig() } } + if ( !sProgressTextColor.isEmpty() ) + { + sal_uInt8 nRed = 0; + sal_Int32 idx = 0; + sal_Int32 temp = sProgressTextColor.getToken( 0, ',', idx ).toInt32(); + if ( idx != -1 ) + { + nRed = static_cast< sal_uInt8 >( temp ); + temp = sProgressTextColor.getToken( 0, ',', idx ).toInt32(); + } + if ( idx != -1 ) + { + sal_uInt8 nGreen = static_cast< sal_uInt8 >( temp ); + sal_uInt8 nBlue = static_cast< sal_uInt8 >( sProgressTextColor.getToken( 0, ',', idx ).toInt32() ); + _cProgressTextColor = Color( nRed, nGreen, nBlue ); + } + } + + if ( !sProgressTextBaseline.isEmpty() ) + { + _textBaseline = sProgressTextBaseline.toInt32(); + } + if( !sNativeProgress.isEmpty() ) { _bNativeProgress = sNativeProgress.toBoolean(); @@ -608,7 +645,12 @@ void SplashScreen::Paint( const Rectangle&) _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 ); + Font aFont; + aFont.SetSize(Size(0, 12)); + aFont.SetAlign(ALIGN_BASELINE); + _vdev.SetFont(aFont); + _vdev.SetTextColor(_cProgressTextColor); + _vdev.DrawText(Point(_tlx, _textBaseline), _sProgressText); } DrawOutDev(Point(), GetOutputSizePixel(), Point(), _vdev.GetOutputSizePixel(), _vdev ); } diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp index 0a7c847..b000c0a 100644 --- a/scp2/source/ooo/common_brand.scp +++ b/scp2/source/ooo/common_brand.scp @@ -932,6 +932,24 @@ ProfileItem gid_Brand_Profileitem_Soffice_NativeProgress_So Value = "${NATIVEPROGRESS}"; End +ProfileItem gid_Brand_Profileitem_Soffice_ProgressTextColor_So + ProfileID = gid_Brand_Profile_Soffice_Ini; + ModuleID = gid_Module_Root_Brand; + Section = "Bootstrap"; + Order = 7; + Key = "ProgressTextColor"; + Value = "${PROGRESSTEXTCOLOR}"; +End + +ProfileItem gid_Brand_Profileitem_Soffice_ProgressTextBaseline_So + ProfileID = gid_Brand_Profile_Soffice_Ini; + ModuleID = gid_Module_Root_Brand; + Section = "Bootstrap"; + Order = 8; + Key = "ProgressTextBaseline"; + Value = "${PROGRESSTEXTBASELINE}"; +End + ProfileItem gid_Brand_Profileitem_Soffice_Hideeula ProfileID = gid_Brand_Profile_Soffice_Ini; ModuleID = gid_Module_Root_Brand; diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm index 4a3e476..c9ba238 100644 --- a/solenv/bin/modules/installer/ziplist.pm +++ b/solenv/bin/modules/installer/ziplist.pm @@ -828,6 +828,8 @@ sub overwrite_branding $variableshashref->{'PROGRESSSIZE'} = $ENV{'PROGRESSSIZE'} , if( defined $ENV{'PROGRESSSIZE'} && $ENV{'PROGRESSSIZE'} ne "" ); $variableshashref->{'PROGRESSPOSITION'} = $ENV{'PROGRESSPOSITION'} , if( defined $ENV{'PROGRESSPOSITION'} && $ENV{'PROGRESSPOSITION'} ne "" ); $variableshashref->{'PROGRESSFRAMECOLOR'} = $ENV{'PROGRESSFRAMECOLOR'} , if( defined $ENV{'PROGRESSFRAMECOLOR'} && $ENV{'PROGRESSFRAMECOLOR'} ne "" ); + $variableshashref->{'PROGRESSTEXTCOLOR'} = $ENV{'PROGRESSTEXTCOLOR'} , if( defined $ENV{'PROGRESSTEXTCOLOR'} && $ENV{'PROGRESSTEXTCOLOR'} ne "" ); + $variableshashref->{'PROGRESSTEXTBASELINE'} = $ENV{'PROGRESSTEXTBASELINE'} , if( defined $ENV{'PROGRESSTEXTBASELINE'} && $ENV{'PROGRESSTEXTBASELINE'} ne "" ); } ########################################################### _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits