comctl32: statusbar: Optimize STATUSBAR_RefreshPart.
This commit is contained in:
parent
72d4318c8c
commit
9a70306c53
|
@ -252,15 +252,15 @@ static void
|
||||||
STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
|
STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
|
||||||
{
|
{
|
||||||
HBRUSH hbrBk;
|
HBRUSH hbrBk;
|
||||||
HFONT hOldFont;
|
|
||||||
HTHEME theme;
|
HTHEME theme;
|
||||||
|
|
||||||
TRACE("item %d\n", itemID);
|
TRACE("item %d\n", itemID);
|
||||||
if (!IsWindowVisible (infoPtr->Self))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (part->bound.right < part->bound.left) return;
|
if (part->bound.right < part->bound.left) return;
|
||||||
|
|
||||||
|
if (!RectVisible(hdc, &part->bound))
|
||||||
|
return;
|
||||||
|
|
||||||
if ((theme = GetWindowTheme (infoPtr->Self)))
|
if ((theme = GetWindowTheme (infoPtr->Self)))
|
||||||
{
|
{
|
||||||
RECT cr;
|
RECT cr;
|
||||||
|
@ -278,18 +278,7 @@ STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPA
|
||||||
DeleteObject (hbrBk);
|
DeleteObject (hbrBk);
|
||||||
}
|
}
|
||||||
|
|
||||||
hOldFont = SelectObject (hdc, infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont);
|
STATUSBAR_DrawPart (infoPtr, hdc, part, itemID);
|
||||||
|
|
||||||
STATUSBAR_DrawPart (infoPtr, hdc, part, itemID);
|
|
||||||
|
|
||||||
SelectObject (hdc, hOldFont);
|
|
||||||
|
|
||||||
if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP) {
|
|
||||||
RECT rect;
|
|
||||||
|
|
||||||
GetClientRect (infoPtr->Self, &rect);
|
|
||||||
STATUSBAR_DrawSizeGrip (theme, hdc, &rect);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue