mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 20:58:16 +02:00
IDE: html hint: increase width in order not to show vertical scrollbar
git-svn-id: trunk@55165 -
This commit is contained in:
parent
8ebd490576
commit
844bef4565
@ -18,7 +18,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, types, LCLProc, Forms, Controls, HelpIntfs, LazHelpIntf,
|
Classes, SysUtils, types, LCLProc, Forms, Controls, HelpIntfs, LazHelpIntf,
|
||||||
LMessages, LCLType, TextTools, Graphics;
|
LMessages, LCLType, TextTools, Graphics, LCLIntf;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ THelpDBIRegExprMessage
|
{ THelpDBIRegExprMessage
|
||||||
@ -383,6 +383,7 @@ function THintWindowManager.ShowHint(ScreenPos: TPoint; TheHint: string;
|
|||||||
var
|
var
|
||||||
ms: TMemoryStream;
|
ms: TMemoryStream;
|
||||||
NewWidth, NewHeight: integer;
|
NewWidth, NewHeight: integer;
|
||||||
|
R1, R2: TRect;
|
||||||
begin
|
begin
|
||||||
if HintFont<>nil then
|
if HintFont<>nil then
|
||||||
HintRenderWindow.Font := HintFont;
|
HintRenderWindow.Font := HintFont;
|
||||||
@ -407,7 +408,17 @@ function THintWindowManager.ShowHint(ScreenPos: TPoint; TheHint: string;
|
|||||||
if MouseOffset then
|
if MouseOffset then
|
||||||
HintRenderWindow.OffsetHintRect(ScreenPos)
|
HintRenderWindow.OffsetHintRect(ScreenPos)
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
|
R1 := HintRenderWindow.HintRect;
|
||||||
HintRenderWindow.OffsetHintRect(ScreenPos, 0, True, False); // shrink height only for fixed (no MouseOffset) hints
|
HintRenderWindow.OffsetHintRect(ScreenPos, 0, True, False); // shrink height only for fixed (no MouseOffset) hints
|
||||||
|
R2 := HintRenderWindow.HintRect;
|
||||||
|
if R1.Bottom-R1.Top>R2.Bottom-R2.Top then // the height was decreased -> scrollbar will be shown, increase width
|
||||||
|
begin
|
||||||
|
Inc(R2.Right, GetSystemMetrics(SM_CXVSCROLL));
|
||||||
|
HintRenderWindow.HintRect := R2;
|
||||||
|
HintRenderWindow.OffsetHintRect(Point(0, 0), 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
HintRenderWindow.ActivateRendered;
|
HintRenderWindow.ActivateRendered;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user