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

comctl32/header: Add support for HDS_FLAT style.

parent 85224d7f
......@@ -329,18 +329,21 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
}
else {
HBRUSH hbr;
if (infoPtr->dwStyle & HDS_BUTTONS) {
if (phdi->bDown) {
DrawEdge (hdc, &r, BDR_RAISEDOUTER,
BF_RECT | BF_FLAT | BF_MIDDLE | BF_ADJUST);
if (!(infoPtr->dwStyle & HDS_FLAT))
{
if (infoPtr->dwStyle & HDS_BUTTONS) {
if (phdi->bDown) {
DrawEdge (hdc, &r, BDR_RAISEDOUTER,
BF_RECT | BF_FLAT | BF_MIDDLE | BF_ADJUST);
}
else
DrawEdge (hdc, &r, EDGE_RAISED,
BF_RECT | BF_SOFT | BF_MIDDLE | BF_ADJUST);
}
else
DrawEdge (hdc, &r, EDGE_RAISED,
BF_RECT | BF_SOFT | BF_MIDDLE | BF_ADJUST);
DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST);
}
else
DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST);
hbr = CreateSolidBrush(GetBkColor(hdc));
FillRect(hdc, &r, hbr);
......@@ -547,14 +550,19 @@ HEADER_Refresh (HEADER_INFO *infoPtr, HDC hdc)
if (theme != 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)
DrawEdge (hdc, &rcRest, EDGE_RAISED, BF_TOP|BF_LEFT|BF_BOTTOM|BF_SOFT|BF_MIDDLE);
else
DrawEdge (hdc, &rcRest, EDGE_ETCHED, BF_BOTTOM|BF_MIDDLE);
}
}
if (infoPtr->iHotDivider != -1)
HEADER_DrawHotDivider(infoPtr, hdc);
......
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