mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-04 05:20:30 +01:00
hints: CalcHintRect now uses screen width as default
git-svn-id: trunk@9777 -
This commit is contained in:
parent
0a80cefe54
commit
e12027f867
@ -1046,7 +1046,7 @@ begin
|
||||
|
||||
{ Target }
|
||||
p:=Path+'Target/';
|
||||
TargetFilename := XMLConfigFile.GetValue(p+'Filename/Value', '');
|
||||
TargetFilename := f(XMLConfigFile.GetValue(p+'Filename/Value', ''));
|
||||
|
||||
{ SearchPaths }
|
||||
p:=Path+'SearchPaths/';
|
||||
|
||||
@ -1040,6 +1040,7 @@ procedure TCustomForm.UpdateActions;
|
||||
CurControl: TControl;
|
||||
begin
|
||||
if not Container.Showing then exit;
|
||||
//DebugLn(['RecursiveInitiate ',DbgSName(Container)]);
|
||||
for i := 0 to Container.ControlCount - 1 do begin
|
||||
CurControl := Container.Controls[i];
|
||||
if (csActionClient in CurControl.ControlStyle)
|
||||
@ -1059,8 +1060,10 @@ begin
|
||||
// update main menu's top-most items
|
||||
if Menu <> nil then
|
||||
for I := 0 to Menu.Items.Count - 1 do
|
||||
with Menu.Items[I] do
|
||||
with Menu.Items[I] do begin
|
||||
//DebugLn(['TCustomForm.UpdateActions ',Name,' Visible=',Visible]);
|
||||
if Visible then InitiateAction;
|
||||
end;
|
||||
// update all controls
|
||||
RecursiveInitiate(Self);
|
||||
end;
|
||||
|
||||
@ -78,7 +78,6 @@ End;
|
||||
procedure THintWindow.Paint;
|
||||
var
|
||||
ARect: TRect;
|
||||
TS : TTextStyle;
|
||||
begin
|
||||
ARect := ClientRect;
|
||||
Canvas.Brush.Color := Color;
|
||||
@ -126,6 +125,8 @@ end;
|
||||
function THintWindow.CalcHintRect(MaxWidth: Integer; const AHint: String;
|
||||
AData: Pointer): TRect;
|
||||
begin
|
||||
if MaxWidth<=0 then
|
||||
MaxWidth:=Screen.Width-4*HintBorderWidth;
|
||||
Result := Rect(0,0, MaxWidth, Screen.Height-4*HintBorderWidth);
|
||||
if AHint='' then exit;
|
||||
DrawText(Canvas.GetUpdatedHandle([csFontValid]), PChar(AHint), Length(AHint),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user