Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


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@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.