Recent

Author Topic: Focus rectangle bug ?  (Read 871 times)

440bx

  • Hero Member
  • *****
  • Posts: 5078
Focus rectangle bug ?
« on: November 02, 2024, 08:44:31 am »
Hello,

observed in Lazarus v3.99, 2024-10-23

when using the IDE directive %REGION and folding the region, the region indicator "over-paints" the focus rectangle.

This is a bit disconcerting because it seems to be the only case where that happens and the resulting gap looks strange.  See attachment.

Should this be considered a bug or is that the way it was meant to be ?

Comments welcome.

(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

paweld

  • Hero Member
  • *****
  • Posts: 1327
Re: Focus rectangle bug ?
« Reply #1 on: November 02, 2024, 08:56:22 am »
On the current version of trunk (main) is ok.
Best regards / Pozdrawiam
paweld

440bx

  • Hero Member
  • *****
  • Posts: 5078
Re: Focus rectangle bug ?
« Reply #2 on: November 02, 2024, 09:03:53 am »
On the current version of trunk (main) is ok.
I guess I'm going to have to upgrade soon.

Thank you for pointing that out.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

flowCRANE

  • Hero Member
  • *****
  • Posts: 911
Re: Focus rectangle bug ?
« Reply #3 on: February 12, 2025, 11:59:34 pm »
Each type of the folded-code-marker overrides the style of the current line, not just the one for regions. This is visible if you have a separate highlight style for the line with a caret - then the highlight style is replaced by the one for the marker. See the attachment — this is what the marker looks like for a folded comment and any other folded code fragment for me (zoomed twice, line 2059).

I think this can be considered a bug, because if the background for the folded marker is not set, the marker is rendered on top of the line, ignoring the current line style. If any of you use trunk, please check if the problem occurs in the circumstances I described.
« Last Edit: February 13, 2025, 12:03:34 am by flowCRANE »
Lazarus 3.6 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on a retro-style action/adventure game (pixel art), programming the engine from scratch, using Free Pascal and SDL3.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10920
  • Debugger - SynEdit - and more
    • wiki
Re: Focus rectangle bug ?
« Reply #4 on: February 13, 2025, 02:33:43 am »
What is "focus rect"?

Do you mean the "current line highlight" and you have that set to "frame", so it draws a rectangle?

If so, what is the setting you have for the fold indicator "[...]" => that has by default a frame too => so I don't see it in your image. Did you switch it off, or did you set it to the same as background?

If the same as background, then that may explain it. Well you need to compare the priorities in that case (color settings, down where you pick the colors, is a switch to go to priorities).

 

TinyPortal © 2005-2018