From 6505062b5a360fcd311bbb3bf36e839578a2eea9 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Wed, 4 Feb 2004 09:29:53 +0000 Subject: [PATCH] added special logo bitmap for 4 bpp color resolution svn path=/trunk/; revision=8023 --- reactos/subsys/system/explorer/explorer_intres.h | 1 + .../subsys/system/explorer/explorer_intres.rc | 1 + reactos/subsys/system/explorer/res/logov16.bmp | Bin 0 -> 2806 bytes .../subsys/system/explorer/taskbar/startmenu.cpp | 15 +++------------ 4 files changed, 5 insertions(+), 12 deletions(-) create mode 100644 reactos/subsys/system/explorer/res/logov16.bmp diff --git a/reactos/subsys/system/explorer/explorer_intres.h b/reactos/subsys/system/explorer/explorer_intres.h index b049da16af4..8f4485aa7b1 100644 --- a/reactos/subsys/system/explorer/explorer_intres.h +++ b/reactos/subsys/system/explorer/explorer_intres.h @@ -86,6 +86,7 @@ #define IDB_ICON_ALIGN_8 161 #define IDB_ICON_ALIGN_9 162 #define IDB_ICON_ALIGN_10 163 +#define IDB_LOGOV16 164 #define ID_VIEW_NAME 401 #define ID_VIEW_ALL_ATTRIBUTES 402 #define ID_VIEW_SELECTED_ATTRIBUTES 403 diff --git a/reactos/subsys/system/explorer/explorer_intres.rc b/reactos/subsys/system/explorer/explorer_intres.rc index dda2bd8378d..4de4bdbfe0d 100644 --- a/reactos/subsys/system/explorer/explorer_intres.rc +++ b/reactos/subsys/system/explorer/explorer_intres.rc @@ -151,6 +151,7 @@ IDB_TOOLBAR BITMAP DISCARDABLE "res/toolbar.bmp" IDB_DRIVEBAR BITMAP DISCARDABLE "res/drivebar.bmp" IDB_LOGOV BITMAP DISCARDABLE "res/logov.bmp" IDB_LOGOV256 BITMAP DISCARDABLE "res/logov256.bmp" +IDB_LOGOV16 BITMAP DISCARDABLE "res/logov16.bmp" ///////////////////////////////////////////////////////////////////////////// // diff --git a/reactos/subsys/system/explorer/res/logov16.bmp b/reactos/subsys/system/explorer/res/logov16.bmp new file mode 100644 index 0000000000000000000000000000000000000000..a36b06df87fb05e65f281dc36d2e90dec88895e7 GIT binary patch literal 2806 zcmeHHOHRZv3=I-1PQj9Mu;)6%CW{`2WAp%#avQoCsl4aJvE2d953xYaOj198pPkOU zzI{F=SqGdi*w5G>*bnIuXG&AI3kb&qBNWrr9ylSUd7km4VU=%MS4!CUP=(|D|E*m5 zs;##ZOnq5Khf>vpKHp6l4x6FTpc?n5ySmm$NwxJ zlw8cI5f}=2wcPvFh}gV)sAf=u^3^&2+EeT4z!WRtEx#@QK5%tM-)z`HXs%iktZnn3 zOc;!e__a|U^8g_B^PtUR$~R*qXF=AGMIm4$N5eWk@d literal 0 HcmV?d00001 diff --git a/reactos/subsys/system/explorer/taskbar/startmenu.cpp b/reactos/subsys/system/explorer/taskbar/startmenu.cpp index 2d0bfa02e66..0e19c8eea22 100644 --- a/reactos/subsys/system/explorer/taskbar/startmenu.cpp +++ b/reactos/subsys/system/explorer/taskbar/startmenu.cpp @@ -1473,17 +1473,16 @@ void StartMenuRoot::Paint(PaintCanvas& canvas) { int clr_bits; {WindowCanvas dc(_hwnd); clr_bits=GetDeviceCaps(dc, BITSPIXEL);} - bool logo256 = clr_bits<=8; MemCanvas mem_dc; - ResBitmap bmp(logo256? IDB_LOGOV256: IDB_LOGOV); + ResBitmap bmp(clr_bits<=8? clr_bits<=4? IDB_LOGOV16: IDB_LOGOV256: IDB_LOGOV); BitmapSelection sel(mem_dc, bmp); ClientRect clnt(_hwnd); int h = min(_logo_size.cy, clnt.bottom); - RECT rect = {0, 0, _logo_size.cx-1, clnt.bottom-h}; - HBRUSH hbr = CreateSolidBrush(logo256? RGB(166,202,240): RGB(71,103,121)); //RGB(255,255,255)); // same color as the background color in the logo bitmap + RECT rect = {0, 0, _logo_size.cx, clnt.bottom-h}; + HBRUSH hbr = CreateSolidBrush(clr_bits<=8? clr_bits<=4? RGB(192,192,192): RGB(166,202,240): RGB(71,103,121)); // same color as the background color in the logo bitmap FillRect(canvas, &rect, hbr); DeleteObject(hbr); @@ -1491,14 +1490,6 @@ void StartMenuRoot::Paint(PaintCanvas& canvas) BitBlt(canvas, 0, clnt.bottom-h, _logo_size.cx, h, mem_dc, 0, 0, SRCCOPY); - if (!logo256) { - rect.left = rect.right++; - rect.bottom = clnt.bottom; - HBRUSH hbr_border = GetStockBrush(GRAY_BRUSH); //CreateSolidBrush(RGB(71,88,85)); - FillRect(canvas, &rect, hbr_border); - //DeleteObject(hbr_border); - } - super::Paint(canvas); }