Commit 25d916e7 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/header: Add support for HDS_FLAT style.

parent 85224d7f
...@@ -330,6 +330,8 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU ...@@ -330,6 +330,8 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
else { else {
HBRUSH hbr; HBRUSH hbr;
if (!(infoPtr->dwStyle & HDS_FLAT))
{
if (infoPtr->dwStyle & HDS_BUTTONS) { if (infoPtr->dwStyle & HDS_BUTTONS) {
if (phdi->bDown) { if (phdi->bDown) {
DrawEdge (hdc, &r, BDR_RAISEDOUTER, DrawEdge (hdc, &r, BDR_RAISEDOUTER,
...@@ -341,6 +343,7 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU ...@@ -341,6 +343,7 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
} }
else else
DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST); DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST);
}
hbr = CreateSolidBrush(GetBkColor(hdc)); hbr = CreateSolidBrush(GetBkColor(hdc));
FillRect(hdc, &r, hbr); FillRect(hdc, &r, hbr);
...@@ -547,7 +550,12 @@ HEADER_Refresh (HEADER_INFO *infoPtr, HDC hdc) ...@@ -547,7 +550,12 @@ HEADER_Refresh (HEADER_INFO *infoPtr, HDC hdc)
if (theme != NULL) { if (theme != NULL) {
DrawThemeBackground(theme, hdc, HP_HEADERITEM, HIS_NORMAL, &rcRest, NULL); DrawThemeBackground(theme, hdc, HP_HEADERITEM, HIS_NORMAL, &rcRest, NULL);
} }
else { else if (infoPtr->dwStyle & HDS_FLAT) {
hbrBk = GetSysColorBrush(COLOR_3DFACE);
FillRect(hdc, &rcRest, hbrBk);
}
else
{
if (infoPtr->dwStyle & HDS_BUTTONS) if (infoPtr->dwStyle & HDS_BUTTONS)
DrawEdge (hdc, &rcRest, EDGE_RAISED, BF_TOP|BF_LEFT|BF_BOTTOM|BF_SOFT|BF_MIDDLE); DrawEdge (hdc, &rcRest, EDGE_RAISED, BF_TOP|BF_LEFT|BF_BOTTOM|BF_SOFT|BF_MIDDLE);
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment