[scintilla:bugs] #2500 Thin line when using Qt 6 scintilla to render text

0 views
Skip to first unread message

Gary Wang

unread,
Feb 26, 2026, 2:09:08 AM (12 days ago) Feb 26
to scintill...@googlegroups.com

[bugs:#2500] Thin line when using Qt 6 scintilla to render text

Status: open
Group: Bug
Labels: Qt ScintillaEdit
Created: Thu Feb 26, 2026 07:09 AM UTC by Gary Wang
Last Updated: Thu Feb 26, 2026 07:09 AM UTC
Owner: nobody
Attachments:

See attachment for screenshot. Is this a common issue or usage issue?

I noticed that PRectangle's documentation says:

PRectangle follows the Mac / Windows convention of not including its bottom and right sides
instead of including all its sides as is normal in GTK.

Then I noticed we directly use the PRectangle to fill the color:

void SurfaceImpl::FillRectangle(PRectangle rc, Fill fill)
{
    GetPainter()->fillRect(QRectFFromPRect(rc), QColorFromColourRGBA(fill.colour));
}

...which uses QRectFFromPRect simply convert a PRectangle to QRect. Thus, for me, using the following change could fix this issue (the fix is adding + 1):

inline QRectF QRectFFromPRect(PRectangle pr)
{
    return QRectF(pr.left, pr.top, pr.Width() + 1, pr.Height() + 1);
}

So my question is: Is that a bug or I'm actually using it in a wrong way?

Feel free to let me know if you need any additional information. Thanks!
Gary.


Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

Neil Hodgson

unread,
Feb 26, 2026, 2:52:18 AM (12 days ago) Feb 26
to scintill...@googlegroups.com
  • labels: Qt ScintillaEdit --> Qt ScintillaEdit, scintilla, qt, seam
  • Comment:

This is likely due to scaling. See [#2450].


[bugs:#2500] Thin line when using Qt 6 scintilla to render text

Status: open
Group: Bug
Labels: Qt ScintillaEdit scintilla qt seam

Gary Wang

unread,
Feb 26, 2026, 3:01:14 AM (12 days ago) Feb 26
to scintill...@googlegroups.com

Yeah it indeed look like the same issue as #2450, while I don't think go with setHighDpiScaleFactorRoundingPolicy is a sane way to fix this issue...

https://sourceforge.net/p/scintilla/bugs/2450/#e379: Adding surface->FillRectangle(rcTextArea, Fill(vsDraw.styles[StyleDefault].back)); just above // Loop on visible lines in EditView.cxx also works!

So does it mean QRectFFromPRect actually don't need to add +1 when converting PRectangle to QRect?


[bugs:#2500] Thin line when using Qt 6 scintilla to render text

Status: open
Group: Bug
Labels: Qt ScintillaEdit scintilla qt seam

Created: Thu Feb 26, 2026 07:09 AM UTC by Gary Wang

Last Updated: Thu Feb 26, 2026 07:52 AM UTC
Owner: nobody
Attachments:

Neil Hodgson

unread,
Feb 26, 2026, 4:57:34 PM (11 days ago) Feb 26
to scintill...@googlegroups.com

Scaling seams are a difficult issue to solve unless Scintilla performs its own scaling as the Win32 platform does with dpiAware enabled.

Adding the above extra FillRectangle is only a partial fix in some circumstances. It doesn't, for example, fix most selection drawing or where background colour is used a lot to convey meaning.

There are better patches in this mailing list thread allowing the application to set a background colour and remove seams between runs of the same background colour.
https://groups.google.com/g/scintilla-interest/c/_ZgpYuzZdoU

So does it mean QRectFFromPRect actually don't need to add +1 when converting PRectangle to QRect?

The current code is accurate and +1 will likely cause more drawing problems.

Adding 1 to the bottom of background rectangles so they overlap the next line may be tried but it complicates the implementation and will be slower.


[bugs:#2500] Thin line when using Qt 6 scintilla to render text

Status: open
Group: Bug
Labels: Qt ScintillaEdit scintilla qt seam

Created: Thu Feb 26, 2026 07:09 AM UTC by Gary Wang

Last Updated: Thu Feb 26, 2026 08:01 AM UTC
Owner: nobody
Attachments:

Neil Hodgson

unread,
Feb 26, 2026, 4:57:55 PM (11 days ago) Feb 26
to scintill...@googlegroups.com
  • labels: Qt ScintillaEdit, scintilla, qt, seam --> Qt ScintillaEdit, scintilla, qt, seam, scaling
  • status: open --> open-duplicate

[bugs:#2500] Thin line when using Qt 6 scintilla to render text

Status: open-duplicate
Group: Bug
Labels: Qt ScintillaEdit scintilla qt seam scaling

Created: Thu Feb 26, 2026 07:09 AM UTC by Gary Wang

Last Updated: Thu Feb 26, 2026 09:57 PM UTC
Owner: nobody
Attachments:

Reply all
Reply to author
Forward
0 new messages