Skip to content

Commit 2b7d31b

Browse files
committed
fix: set Screen.HintFont globally to what the editors use
1 parent 88115ac commit 2b7d31b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

source/main.pas

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,6 +2078,7 @@ procedure TMainForm.FormCreate(Sender: TObject);
20782078
FFormatSettings.DecimalSeparator := '.';
20792079
FFormatSettings.ThousandSeparator := ' ';;
20802080
FDefaultHintFontName := Screen.HintFont.Name;
2081+
SetHintFontByControl(SynMemoQuery);
20812082

20822083
// Now we are free to use certain methods, which are otherwise fired too early
20832084
MainFormCreated := True;
@@ -14586,13 +14587,11 @@ procedure TMainForm.ApplicationShowHint(var HintStr: string; var CanShow: Boolea
1458614587
HintStr := StringReplace(HintStr, DELIM, SLineBreak, [rfReplaceAll]);
1458714588
end;
1458814589
HintInfo.ReshowTimeout := 1000;
14589-
SetHintFontByControl;
1459014590
end
1459114591

1459214592
else if HintInfo.HintControl is TSynMemo then begin
1459314593
// Token hint displaying through SynEdit's OnShowHint event
1459414594
Editor := TSynMemo(HintInfo.HintControl);
14595-
SetHintFontByControl(Editor);
1459614595
NewHideTimeout := Min(Length(HintStr) * 100, 60*1000);
1459714596
if NewHideTimeout > HintInfo.HideTimeout then
1459814597
HintInfo.HideTimeout := NewHideTimeout;
@@ -14636,11 +14635,6 @@ procedure TMainForm.ApplicationShowHint(var HintStr: string; var CanShow: Boolea
1463614635
HintSQL.Free;
1463714636
end;
1463814637
end;
14639-
end
14640-
14641-
else begin
14642-
// Probably reset hint font
14643-
SetHintFontByControl;
1464414638
end;
1464514639
end;
1464614640

0 commit comments

Comments
 (0)