win32: fix MenuBar drawing for selected items (issue #0017752)

git-svn-id: trunk@28034 -
This commit is contained in:
paul 2010-11-02 06:14:05 +00:00
parent 9faeff7d08
commit 9bcde488e1

View File

@ -968,13 +968,13 @@ begin
if AMenuItem.IsInMenuBar and not IsFlatMenus then
begin
if (ItemState and ODS_SELECTED) <> 0 then
DrawEdge(AHDC, ARect, BDR_SUNKENOUTER, BF_RECT)
DrawEdge(AHDC, ARect, BDR_SUNKENOUTER, BF_RECT or BF_ADJUST)
else
if (ItemState and ODS_HOTLIGHT) <> 0 then
DrawEdge(AHDC, ARect, BDR_RAISEDINNER, BF_RECT);
end;
TmpHeight := ARect.bottom - ARect.top;
TmpHeight := ARect.Bottom - ARect.Top;
{$ifdef WindowsUnicodeSupport}
if UnicodeEnabledOS then
@ -992,10 +992,10 @@ begin
{$endif}
if IsRightToLeft then
Dec(ARect.Right, leftCaptionPosition(AMenuItem))
Dec(ARect.Right, LeftCaptionPosition(AMenuItem))
else
Inc(ARect.Left, leftCaptionPosition(AMenuItem));
Inc(ARect.Top, topPosition(TmpHeight, WorkRect.Bottom - WorkRect.Top));
Inc(ARect.Left, LeftCaptionPosition(AMenuItem));
Inc(ARect.Top, TopPosition(TmpHeight, WorkRect.Bottom - WorkRect.Top));
{$ifdef WindowsUnicodeSupport}
if UnicodeEnabledOS then