IDE: parameter hints: layout

git-svn-id: trunk@30758 -
This commit is contained in:
mattias 2011-05-16 06:59:12 +00:00
parent 23c34d4e8a
commit 70c510aadc

View File

@ -710,6 +710,7 @@ var
LastTokenEnd: LongInt;
Line: string;
Item: TCodeContextItem;
y: LongInt;
begin
Item:=Hints[Index];
Line:=Item.Hint;
@ -721,12 +722,6 @@ var
LineHeight:=0;
TokenPos:=Point(ATextRect.Left,ATextRect.Top);
TokenEnd:=1;
if Draw and (Item.CopyAllButton<>nil) then begin
// move button at end of first line
Item.CopyAllButton.SetBounds(
AHintRect.Right-RightSpace,AHintRect.Top,FBtnWidth,FBtnWidth);
Item.CopyAllButton.Visible:=true;
end;
while (TokenEnd<=length(Line)) do begin
LastTokenEnd:=TokenEnd;
ReadRawNextPascalAtom(Line,TokenEnd,TokenStart);
@ -815,6 +810,15 @@ var
if (not Draw) and (UsedWidth>0) then
AHintRect.Right:=UsedWidth+RightSpace;
AHintRect.Bottom:=TokenPos.Y+LineHeight+VerticalSpace;
if Draw and (Item.CopyAllButton<>nil) then begin
// move button at end of first line
y:=ATextRect.Top;
if LineHeight>FBtnWidth then
inc(y,(LineHeight-FBtnWidth) div 2);
Item.CopyAllButton.SetBounds(AHintRect.Right-RightSpace,y,FBtnWidth,FBtnWidth);
Item.CopyAllButton.Visible:=true;
end;
end;
var