diff --git a/reactos/subsys/system/explorer/explorer_intres.rc b/reactos/subsys/system/explorer/explorer_intres.rc index d3e7fce2709..e5053b4a1b8 100644 --- a/reactos/subsys/system/explorer/explorer_intres.rc +++ b/reactos/subsys/system/explorer/explorer_intres.rc @@ -141,8 +141,8 @@ IDB_LOGOV BITMAP DISCARDABLE "res/logov.bmp" IDA_EXPLORER ACCELERATORS DISCARDABLE BEGIN - 0x58, ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT - 0x53, ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL, + "X", ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT + "S", ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL, NOINVERT END diff --git a/reactos/subsys/system/explorer/res/reactos.ico b/reactos/subsys/system/explorer/res/reactos.ico index c0c0ac504ce..a8369c76aa2 100644 Binary files a/reactos/subsys/system/explorer/res/reactos.ico and b/reactos/subsys/system/explorer/res/reactos.ico differ diff --git a/reactos/subsys/system/explorer/res/startmenu.ico b/reactos/subsys/system/explorer/res/startmenu.ico index 60fc893823d..778ae5b1d0f 100644 Binary files a/reactos/subsys/system/explorer/res/startmenu.ico and b/reactos/subsys/system/explorer/res/startmenu.ico differ diff --git a/reactos/subsys/system/explorer/taskbar/desktopbar.cpp b/reactos/subsys/system/explorer/taskbar/desktopbar.cpp index 06d42d19831..6641d666694 100644 --- a/reactos/subsys/system/explorer/taskbar/desktopbar.cpp +++ b/reactos/subsys/system/explorer/taskbar/desktopbar.cpp @@ -86,7 +86,7 @@ LRESULT DesktopBar::Init(LPCREATESTRUCT pcs) // create start button new PictureButton(Button(_hwnd, ResString(IDS_START), 2, 2, STARTBUTTON_WIDTH, DESKTOPBARBAR_HEIGHT-8, IDC_START, WS_VISIBLE|WS_CHILD|BS_OWNERDRAW), - SmallIcon(IDI_STARTMENU)); + SmallIcon(IDI_STARTMENU)/*, GetStockBrush(WHITE_BRUSH)*/); // create task bar _hwndTaskBar = TaskBar::Create(_hwnd); diff --git a/reactos/subsys/system/explorer/taskbar/startmenu.cpp b/reactos/subsys/system/explorer/taskbar/startmenu.cpp index 1388e6c55f2..a7d1ca47389 100644 --- a/reactos/subsys/system/explorer/taskbar/startmenu.cpp +++ b/reactos/subsys/system/explorer/taskbar/startmenu.cpp @@ -526,10 +526,11 @@ void StartMenuButton::DrawItem(LPDRAWITEMSTRUCT dis) TCHAR title[BUFFER_LEN]; GetWindowText(_hwnd, title, BUFFER_LEN); + BkMode bk_mode(dis->hDC, TRANSPARENT); + if (dis->itemState & (ODS_DISABLED|ODS_GRAYED)) DrawGrayText(dis, &textRect, title, DT_SINGLELINE|DT_NOPREFIX|DT_VCENTER); else { - BkMode mode(dis->hDC, TRANSPARENT); TextColor lcColor(dis->hDC, GetSysColor(text_color)); DrawText(dis->hDC, title, -1, &textRect, DT_SINGLELINE|DT_NOPREFIX|DT_VCENTER); } diff --git a/reactos/subsys/system/explorer/utility/window.cpp b/reactos/subsys/system/explorer/utility/window.cpp index 6c6fe4f8856..ad3b5709279 100644 --- a/reactos/subsys/system/explorer/utility/window.cpp +++ b/reactos/subsys/system/explorer/utility/window.cpp @@ -591,7 +591,6 @@ void OwnerdrawnButton::DrawGrayText(LPDRAWITEMSTRUCT dis, LPRECT pRect, LPCTSTR RECT shadowRect = {pRect->left+1, pRect->top+1, pRect->right+1, pRect->bottom+1}; DrawText(dis->hDC, title, -1, &shadowRect, dt_flags); - BkMode mode(dis->hDC, TRANSPARENT); SetTextColor(dis->hDC, gray); DrawText(dis->hDC, title, -1, pRect, dt_flags); } else { @@ -612,27 +611,39 @@ void OwnerdrawnButton::DrawGrayText(LPDRAWITEMSTRUCT dis, LPRECT pRect, LPCTSTR } +static BOOL DrawButton(HDC hdc, LPRECT prect, UINT state, HBRUSH hbrush) +{ + FillRect(hdc, prect, hbrush); + DrawEdge(hdc, prect, EDGE_RAISED, BF_RECT|BF_SOFT); + + return TRUE; +} + + /* not yet used void ColorButton::DrawItem(LPDRAWITEMSTRUCT dis) { - UINT style = DFCS_BUTTONPUSH; + UINT state = DFCS_BUTTONPUSH; if (dis->itemState & ODS_DISABLED) - style |= DFCS_INACTIVE; + state |= DFCS_INACTIVE; RECT textRect = {dis->rcItem.left+2, dis->rcItem.top+2, dis->rcItem.right-4, dis->rcItem.bottom-4}; if (dis->itemState & ODS_SELECTED) { - style |= DFCS_PUSHED; + state |= DFCS_PUSHED; ++textRect.left; ++textRect.top; ++textRect.right; ++textRect.bottom; } - DrawFrameControl(dis->hDC, &dis->rcItem, DFC_BUTTON, style); + DrawFrameControl(dis->hDC, &dis->rcItem, DFC_BUTTON, state); + //DrawButton(dis->hDC, &dis->rcItem, state, GetSysColorBrush(COLOR_BTNFACE)); TCHAR title[BUFFER_LEN]; GetWindowText(_hwnd, title, BUFFER_LEN); + BkMode bk_mode(dis->hDC, TRANSPARENT); + if (dis->itemState & (ODS_DISABLED|ODS_GRAYED)) DrawGrayText(dis, &textRect, title, DT_SINGLELINE|DT_VCENTER|DT_CENTER); else { @@ -657,36 +668,40 @@ void ColorButton::DrawItem(LPDRAWITEMSTRUCT dis) void PictureButton::DrawItem(LPDRAWITEMSTRUCT dis) { - UINT style = DFCS_BUTTONPUSH; + UINT state = DFCS_BUTTONPUSH; if (dis->itemState & ODS_DISABLED) - style |= DFCS_INACTIVE; + state |= DFCS_INACTIVE; POINT iconPos = {dis->rcItem.left+2, (dis->rcItem.top+dis->rcItem.bottom-16)/2}; RECT textRect = {dis->rcItem.left+16+4, dis->rcItem.top+2, dis->rcItem.right-4, dis->rcItem.bottom-4}; if (dis->itemState & ODS_SELECTED) { - style |= DFCS_PUSHED; + state |= DFCS_PUSHED; ++iconPos.x; ++iconPos.y; ++textRect.left; ++textRect.top; ++textRect.right; ++textRect.bottom; } if (_flat) { + FillRect(dis->hDC, &dis->rcItem, _hBrush); + if (GetWindowStyle(_hwnd) & BS_FLAT) // Only with BS_FLAT set, there will be drawn a frame without highlight. DrawEdge(dis->hDC, &dis->rcItem, EDGE_RAISED, BF_RECT|BF_FLAT); } else - DrawFrameControl(dis->hDC, &dis->rcItem, DFC_BUTTON, style); + //DrawFrameControl(dis->hDC, &dis->rcItem, DFC_BUTTON, state); + DrawButton(dis->hDC, &dis->rcItem, state, _hBrush); - DrawIconEx(dis->hDC, iconPos.x, iconPos.y, _hIcon, 16, 16, 0, GetSysColorBrush(COLOR_BTNFACE), DI_NORMAL); + DrawIconEx(dis->hDC, iconPos.x, iconPos.y, _hIcon, 16, 16, 0, _hBrush, DI_NORMAL); TCHAR title[BUFFER_LEN]; GetWindowText(_hwnd, title, BUFFER_LEN); + BkMode bk_mode(dis->hDC, TRANSPARENT); + if (dis->itemState & (ODS_DISABLED|ODS_GRAYED)) DrawGrayText(dis, &textRect, title, DT_SINGLELINE|DT_VCENTER/*|DT_CENTER*/); else { - //BkMode mode(dis->hDC, TRANSPARENT); TextColor lcColor(dis->hDC, GetSysColor(COLOR_BTNTEXT)); DrawText(dis->hDC, title, -1, &textRect, DT_SINGLELINE|DT_VCENTER/*|DT_CENTER*/); } diff --git a/reactos/subsys/system/explorer/utility/window.h b/reactos/subsys/system/explorer/utility/window.h index f5dc6d58909..fc06d957a0a 100644 --- a/reactos/subsys/system/explorer/utility/window.h +++ b/reactos/subsys/system/explorer/utility/window.h @@ -455,13 +455,16 @@ struct PictureButton : public OwnerdrawnButton { typedef OwnerdrawnButton super; - PictureButton(HWND hwnd, HICON hIcon, bool flat=false) - : super(hwnd), _hIcon(hIcon), _flat(flat) {} + PictureButton(HWND hwnd, HICON hIcon, HBRUSH hbrush=GetSysColorBrush(COLOR_BTNFACE), bool flat=false) + : super(hwnd), _hIcon(hIcon), _hBrush(hbrush), _flat(flat) + { + } protected: virtual void DrawItem(LPDRAWITEMSTRUCT dis); HICON _hIcon; + HBRUSH _hBrush; bool _flat; };