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

Cao Cuong Ngo (via Code Review) gerrit at gerrit.libreoffice.org
Sat Mar 30 11:32:20 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3127

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/27/3127/1

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

Change-Id: I1d0ed94d41b3b8bcf0504e1528f4f505f817ad86
---
M vcl/source/app/settings.cxx
1 file changed, 10 insertions(+), 3 deletions(-)



diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index d8b1ce5..a237488 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -702,7 +702,7 @@
 enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
 
 /** 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() );
     if ( !xContext.is() )
@@ -721,13 +721,20 @@
     rHeaderFooterBitmap = BitmapEx();
 
     // now read the new values and setup bitmaps
-    OUString aHeader, aFooter;
+    OUString aHeader, aFooter, aColor;
     if ( aPersona == "own" )
     {
         sal_Int32 nIndex = 0;
         aHeader = aPersonaSettings.getToken( 0, ';', nIndex );
         if ( nIndex > 0 )
             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" )
     {
@@ -762,7 +769,7 @@
 
 const BitmapEx StyleSettings::GetPersonaHeader() const
 {
-    setupPersonaHeaderFooter( PERSONA_HEADER, mpData->maPersonaHeaderFooter, mpData->maPersonaHeaderBitmap );
+    setupPersonaHeaderFooter( PERSONA_HEADER, mpData->maPersonaHeaderFooter, mpData->maPersonaHeaderBitmap, mpData->maMenuBarTextColor );
     return mpData->maPersonaHeaderBitmap;
 }
 

-- 
To view, visit https://gerrit.libreoffice.org/3127
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d0ed94d41b3b8bcf0504e1528f4f505f817ad86
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo <cao.cuong.ngo at gmail.com>



More information about the LibreOffice mailing list