hints: CalcHintRect now uses screen width as default

git-svn-id: trunk@9777 -
This commit is contained in:
mattias 2006-09-01 08:37:19 +00:00
parent 0a80cefe54
commit e12027f867
3 changed files with 7 additions and 3 deletions

View File

@ -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/';

View File

@ -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;

View File

@ -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),