TApplication: adjust position of THintWindow depending on LTR or RTL alignment.

git-svn-id: trunk@43368 -
This commit is contained in:
bart 2013-11-03 23:13:54 +00:00
parent 9e3191112e
commit 2937458fa6

View File

@ -842,7 +842,11 @@ begin
// calculate the width of the hint based on HintStr and MaxWidth
with HintInfo do
HintWinRect := FHintWindow.CalcHintRect(HintMaxWidth, HintStr, HintData);
OffsetRect(HintWinRect, HintInfo.HintPos.X, HintInfo.HintPos.Y);
//Position HintWindow depending on LTR/RTL
if FHintWindow.UseRightToLeftAlignment then
OffsetRect(HintWinRect, HintInfo.HintPos.X - (HintWinRect.Right - HintWinRect.Left), HintInfo.HintPos.Y)
else
OffsetRect(HintWinRect, HintInfo.HintPos.X, HintInfo.HintPos.Y);
//DebugLn(['TApplication.ShowHintWindow HintStr="',HintInfo.HintStr,'" HintWinRect=',dbgs(HintWinRect)]);
FHintWindow.Color := HintInfo.HintColor;