[Lazarus] Object Inspector, FValueFont and FDefaultValueFont

Juha Manninen juha.manninen62 at gmail.com
Fri Oct 16 15:00:32 CEST 2020


Regarding issue :
 https://bugs.freepascal.org/view.php?id=37901
I improved the property name/value hints in OI.
I had to comment out code that selects FValueFont or FDefaultValueFont.
The relevant code is below.
Q: How to get a font with negated color?
Does it even make sense to tweak it? The hint works OK with the default
color now.
I ask in case somebody knows the topic well.

I did not study what Editor.ValueIsStreamed means. It never triggered in my
tests.

Regards,
Juha

---

  procedure DoShow(pt: TPoint); inline;
  //var HintFont: TFont;
  begin
    if WidgetSet.GetLCLCapability(lcTransparentWindow)=LCL_CAPABILITY_NO
then
      Inc(pt.Y, fPropRow.Height);
{ By Juha :
  FValueFont and FDefaultValueFont are nearly unreadable.
  We should maybe get their negated color as the hint background is black.

    if HintType<>pehValue then
      HintFont := Screen.HintFont
    else
    if fPropRow.Editor.ValueIsStreamed then
      HintFont:=FValueFont
    else
      HintFont:=FDefaultValueFont;  }
    FHintManager.ShowHint(ClientToScreen(pt), TheHint, False{, HintFont});
    if FHintManager.CurHintWindow<>nil then
      FHintManager.CurHintWindow.OnMouseLeave := @HintMouseLeave;
  end;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20201016/72dd61b5/attachment-0001.html>


More information about the lazarus mailing list