mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
Display colorfull startmenu side logo if enough colors are available in the current display mode
svn path=/trunk/; revision=6286
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#define IDI_ARROW 125
|
||||
#define IDI_ARROW_SELECTED 126
|
||||
#define IDB_LOGOV 129
|
||||
#define IDB_LOGOV256 130
|
||||
#define IDA_SEARCH_PROGRAM 133
|
||||
#define ID_VIEW_NAME 401
|
||||
#define ID_VIEW_ALL_ATTRIBUTES 402
|
||||
|
||||
@@ -137,6 +137,7 @@ IDB_IMAGES BITMAP DISCARDABLE "res/images.bmp"
|
||||
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"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
@@ -741,21 +741,34 @@ LRESULT StartMenuRoot::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
switch(nmsg) {
|
||||
case WM_PAINT: {
|
||||
int clr_bits;
|
||||
{WindowCanvas dc(_hwnd); clr_bits=GetDeviceCaps(dc, BITSPIXEL);}
|
||||
bool logo256 = clr_bits<=8;
|
||||
|
||||
PaintCanvas canvas(_hwnd);
|
||||
MemCanvas mem_dc;
|
||||
ResBitmap bmp(IDB_LOGOV);
|
||||
ResBitmap bmp(logo256? 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(RGB(166,202,240)); // same color as the background color in the logo bitmap
|
||||
HBRUSH hbr = CreateSolidBrush(logo256? RGB(166,202,240): RGB(255,255,255)); // same color as the background color in the logo bitmap
|
||||
FillRect(canvas, &rect, hbr);
|
||||
PatBlt(canvas, _logo_size.cx-1, 0, 1, clnt.bottom-h, WHITENESS);
|
||||
DeleteObject(hbr);
|
||||
//PatBlt(canvas, _logo_size.cx-1, 0, 1, clnt.bottom-h, WHITENESS);
|
||||
PatBlt(canvas, _logo_size.cx-1, 0, 1, clnt.bottom-h, WHITENESS);
|
||||
|
||||
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);
|
||||
}
|
||||
break;}
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user