Re: Decreasing seams in scaled windows

Neil Hodgson <[email protected]> Fri, 19 Jun 2026 08:46:40 +1000
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <CACWkrTictzXs6YwD34EuM8OLfhRSwDRPsfGo-zsfXcLmez_ScQ@mail.gmail.com>
The lines of markers and indicators can be made thicker with the
SCI_MARKERSETSTROKEWIDTH and SCI_INDICSETSTROKEWIDTH APIs, This is not
automatic so requires application code.

Changing Haven's MainWindow::rescale code like the following switches
between single pixel and double pixel lines at 170%. The points at
which different thicknesses are applied is up to the application
designer. It looks like
https://www.scintilla.org/QtScaleStrokeWidth.png at 175% on Windows.

void MainWindow::rescale() {
        const qreal scale = isScaled() ? devicePixelRatioF() : 1.0;
        Call(SCI_SETMARGINWIDTHN, 0, lround(scale * 40));
        Call(SCI_SETMARGINWIDTHN, 1, lround(scale * 16));
        Call(SCI_SETMARGINWIDTHN, 2, lround(scale * 13));

        const int strokeWidth = scale > 1.7 ? 200 : 100;
        for (int mark = SC_MARKNUM_FOLDEREND; mark <=
SC_MARKNUM_FOLDEROPEN; mark++) {
                Call(SCI_MARKERSETSTROKEWIDTH, mark, strokeWidth);
        }

        Call(SCI_INDICSETSTROKEWIDTH, INDIC_CONTAINER, strokeWidth);
}


Neil

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/CACWkrTictzXs6YwD34EuM8OLfhRSwDRPsfGo-zsfXcLmez_ScQ%40mail.gmail.com.