mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 13:09:20 +02:00
IDEIntf: THintWindowManager.ShowHint limit size to active form, from Russell
git-svn-id: trunk@55095 -
This commit is contained in:
parent
72e6211499
commit
9b548421fa
@ -1,4 +1,3 @@
|
|||||||
{ $Id: helpintf.pas 9271 2006-05-13 12:00:43Z mattias $ }
|
|
||||||
{
|
{
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
See the file COPYING.modifiedLGPL.txt, included in this distribution,
|
See the file COPYING.modifiedLGPL.txt, included in this distribution,
|
||||||
@ -383,6 +382,9 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure DoHtml;
|
procedure DoHtml;
|
||||||
|
var
|
||||||
|
ActFrm: TForm;
|
||||||
|
MaxWidth, MaxHeight: Integer;
|
||||||
begin
|
begin
|
||||||
if HintFont<>nil then
|
if HintFont<>nil then
|
||||||
HintRenderWindow.Font := HintFont;
|
HintRenderWindow.Font := HintFont;
|
||||||
@ -397,10 +399,17 @@ var
|
|||||||
ms.Free;
|
ms.Free;
|
||||||
end;
|
end;
|
||||||
HtmlHelpProvider.ControlIntf.GetPreferredControlSize(NewWidth,NewHeight);
|
HtmlHelpProvider.ControlIntf.GetPreferredControlSize(NewWidth,NewHeight);
|
||||||
|
ActFrm:=Screen.ActiveForm;
|
||||||
|
MaxWidth := ActFrm.Left + ActFrm.Width - ScreenPos.x;
|
||||||
|
MaxHeight := ActFrm.Top + ActFrm.Height - ScreenPos.y;
|
||||||
if NewWidth <= 0 then
|
if NewWidth <= 0 then
|
||||||
NewWidth := 500;
|
NewWidth := 500
|
||||||
|
else if NewWidth > MaxWidth then
|
||||||
|
NewWidth := MaxWidth;
|
||||||
if NewHeight <= 0 then
|
if NewHeight <= 0 then
|
||||||
NewHeight := 200;
|
NewHeight := 200
|
||||||
|
else if NewHeight > MaxHeight then
|
||||||
|
NewHeight := MaxHeight;
|
||||||
HintRenderWindow.HintRectAdjust := Rect(0, 0, NewWidth, NewHeight);
|
HintRenderWindow.HintRectAdjust := Rect(0, 0, NewWidth, NewHeight);
|
||||||
if MouseOffset then
|
if MouseOffset then
|
||||||
HintRenderWindow.OffsetHintRect(ScreenPos)
|
HintRenderWindow.OffsetHintRect(ScreenPos)
|
||||||
|
Loading…
Reference in New Issue
Block a user