Kaydet (Commit) 84e99bd7 authored tarafından Cao Cuong Ngo's avatar Cao Cuong Ngo Kaydeden (comit) Jan Holesovsky

fdo#60542 Persona setting: change color of the text menu.

Change-Id: I1d0ed94d41b3b8bcf0504e1528f4f505f817ad86
Reviewed-on: https://gerrit.libreoffice.org/3127Reviewed-by: 's avatarJan Holesovsky <kendy@suse.cz>
Tested-by: 's avatarJan Holesovsky <kendy@suse.cz>
üst c3ffd741
...@@ -702,7 +702,7 @@ static BitmapEx readBitmapEx( const OUString& rPath ) ...@@ -702,7 +702,7 @@ static BitmapEx readBitmapEx( const OUString& rPath )
enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER }; enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
/** Update the setting of the Persona header / footer in ImplStyleData */ /** Update the setting of the Persona header / footer in ImplStyleData */
static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap ) static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, Color& maMenuBarTextColor )
{ {
uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() ); uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
if ( !xContext.is() ) if ( !xContext.is() )
...@@ -721,13 +721,20 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot ...@@ -721,13 +721,20 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot
rHeaderFooterBitmap = BitmapEx(); rHeaderFooterBitmap = BitmapEx();
// now read the new values and setup bitmaps // now read the new values and setup bitmaps
OUString aHeader, aFooter; OUString aHeader, aFooter, aColor;
if ( aPersona == "own" ) if ( aPersona == "own" )
{ {
sal_Int32 nIndex = 0; sal_Int32 nIndex = 0;
aHeader = aPersonaSettings.getToken( 0, ';', nIndex ); aHeader = aPersonaSettings.getToken( 0, ';', nIndex );
if ( nIndex > 0 ) if ( nIndex > 0 )
aFooter = aPersonaSettings.getToken( 0, ';', nIndex ); aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
// change menu text color, advance nIndex to skip the '#'
if ( nIndex > 0 )
{
aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
maMenuBarTextColor = Color( aColor.toInt64( 16 ) );
}
} }
else if ( aPersona == "default" ) else if ( aPersona == "default" )
{ {
...@@ -762,7 +769,7 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot ...@@ -762,7 +769,7 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot
const BitmapEx StyleSettings::GetPersonaHeader() const const BitmapEx StyleSettings::GetPersonaHeader() const
{ {
setupPersonaHeaderFooter( PERSONA_HEADER, mpData->maPersonaHeaderFooter, mpData->maPersonaHeaderBitmap ); setupPersonaHeaderFooter( PERSONA_HEADER, mpData->maPersonaHeaderFooter, mpData->maPersonaHeaderBitmap, mpData->maMenuBarTextColor );
return mpData->maPersonaHeaderBitmap; return mpData->maPersonaHeaderBitmap;
} }
......
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