Skip to content

Commit

Permalink
workaround for editor border lines missing (#3980)
Browse files Browse the repository at this point in the history
* workaround for editor border lines missing

* add exception for win10

* simplify version testing
  • Loading branch information
octaeder authored Feb 17, 2025
1 parent 170ccbb commit 7d584c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/qcodeedit/lib/document/qdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "encoding.h"
#include "latexparser/latexparser.h"
#include <QtMath>
#include <QSysInfo>

// returns the number of chars/columns from column to the next tab location
// for a given tabstop periodicity
Expand Down Expand Up @@ -3605,7 +3606,15 @@ void QDocumentLineHandle::drawBorders(QPainter *p, qreal yStart, qreal yEnd) con
if (d->hardLineWrap() || d->lineWidthConstraint()) {
QColor linescolor = QDocumentPrivate::m_formatScheme->format("background").linescolor;
if (!linescolor.isValid()) {
#ifdef Q_OS_WIN
// workaround for windows10 only
if (QSysInfo::productVersion() == "10") {
linescolor = QColor("lightGray").rgb();
}
else return;
#else
return;
#endif
}
p->save();
p->setPen(linescolor);
Expand Down

0 comments on commit 7d584c9

Please sign in to comment.