From fa4cfdbf62d0d1b367cabdbd518f9b13d2f5ad19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 17 Nov 2006 09:56:42 +0000 Subject: [PATCH] * use B_RGBA32 icons in shutdown process window (untested) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19313 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/registrar/ShutdownProcess.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/servers/registrar/ShutdownProcess.cpp b/src/servers/registrar/ShutdownProcess.cpp index 460b01a42e..3f01b5fbf6 100644 --- a/src/servers/registrar/ShutdownProcess.cpp +++ b/src/servers/registrar/ShutdownProcess.cpp @@ -555,7 +555,12 @@ private: FillRect(Bounds(), B_SOLID_LOW); if (fAppInfo && fAppInfo->largeIcon) { - SetDrawingMode(B_OP_OVER); + if (fAppInfo->largeIcon->ColorSpace() == B_RGBA32) { + SetDrawingMode(B_OP_ALPHA); + SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY); + } else + SetDrawingMode(B_OP_OVER); + DrawBitmap(fAppInfo->largeIcon, BPoint(0, 0)); } } @@ -975,9 +980,14 @@ ShutdownProcess::_AddShutdownWindowApps(AppInfoList &infos) } // get the application icons +#ifdef __HAIKU__ + color_space format = B_RGBA32; +#else + color_space format = B_CMAP8; +#endif // mini icon - BBitmap *miniIcon = new(nothrow) BBitmap(BRect(0, 0, 15, 15), B_CMAP8); + BBitmap *miniIcon = new(nothrow) BBitmap(BRect(0, 0, 15, 15), format); if (miniIcon != NULL) { error = miniIcon->InitCheck(); if (error == B_OK) @@ -989,7 +999,7 @@ ShutdownProcess::_AddShutdownWindowApps(AppInfoList &infos) } // mini icon - BBitmap *largeIcon = new(nothrow) BBitmap(BRect(0, 0, 31, 31), B_CMAP8); + BBitmap *largeIcon = new(nothrow) BBitmap(BRect(0, 0, 31, 31), format); if (largeIcon != NULL) { error = largeIcon->InitCheck(); if (error == B_OK)