[REVIEWED 3-5] fdo#34324 Math icon color bug

Michael Meeks michael.meeks at suse.com
Mon Apr 2 08:25:07 PDT 2012


On Mon, 2012-04-02 at 15:06 +0200, Andras Timar wrote:
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=b36a42fb831b853120928e05dcf322898a92a731
> This commit fixes fdo#34324. Icon of LibreOffice Math was in
> grayscale, and was displayed with wrong colors (blue instead of white)
> in Quickstarter menu under Linux.

	That's a bit odd - we shouldn't be rendering blue for that; at least, I
don't see that in the images themselves - I wonder what's going wrong
there.

	I wonder if it'd be better to fix it like this (untested):

--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -90,6 +90,9 @@ static GdkPixbuf * ResIdToPixbuf( sal_uInt16 nResId )
     Bitmap pInSalBitmap = aIcon.GetBitmap();
     AlphaMask pInSalAlpha = aIcon.GetAlpha();
 
+    if( pInSalBitmap.GetBitCount() != 24 )
+        pInSalBitmap.Convert( BMP_CONVERSION_24BIT );
+
     Bitmap::ScopedReadAccess pSalBitmap(pInSalBitmap);
     AlphaMask::ScopedReadAccess pSalAlpha(pInSalAlpha);


	And that's not just because I'm too lazy to convert the icon paths for
the old source tree layout ;-)

	Really we should share this code with GtkFrame::SetIcon, and really the
bulk of the quick-starter should live in vcl/ too but ...

	Does that help ?

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list