[Libreoffice-commits] .: Branch 'libreoffice-3-6' - config_host.mk.in configure.in desktop/source scp2/source solenv/bin
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Oct 2 06:33:39 PDT 2012
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 71b584680e4527283ccc4fa14169bc7d28d32344
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sat Sep 29 20:03:12 2012 +0400
fdo#52268: splash: change color and position of messages
Change-Id: If6c607fc9f0be1f7a71eda8d555399451938c5fc
Signed-off-by: Jan Holesovsky <kendy at suse.cz>
diff --git a/config_host.mk.in b/config_host.mk.in
index 96635db..4fb80d1 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -413,6 +413,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 11e20a0..651963a 100644
--- a/configure.in
+++ b/configure.in
@@ -11310,6 +11310,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 0ef211a..6678aa8 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -88,6 +88,7 @@ private:
BitmapEx _aIntroBmp;
Color _cProgressFrameColor;
Color _cProgressBarColor;
+ Color _cProgressTextColor;
bool _bNativeProgress;
OUString _sAppName;
OUString _sProgressText;
@@ -103,7 +104,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;
@@ -132,6 +133,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)
@@ -146,6 +148,7 @@ SplashScreen::SplashScreen()
, _barwidth(NOT_LOADED)
, _barheight(NOT_LOADED)
, _barspace(2)
+ , _textBaseline(NOT_LOADED)
, _fXPos(-1.0)
, _fYPos(-1.0)
, _fWidth(-1.0)
@@ -299,6 +302,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 );
@@ -313,6 +319,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 ) );
@@ -365,6 +375,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(
@@ -420,6 +434,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();
@@ -610,7 +647,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 c2ce2c2..997a142 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -934,6 +934,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 95b5638..651469b 100644
--- a/solenv/bin/modules/installer/ziplist.pm
+++ b/solenv/bin/modules/installer/ziplist.pm
@@ -755,6 +755,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 "" );
}
###########################################################
More information about the Libreoffice-commits
mailing list