summaryrefslogtreecommitdiff
path: root/src/scripttools/debugging/qscriptedit.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-12 03:00:35 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-12 03:00:35 +0100
commita21580952f5ba9dbde3ee5a9a7119e2afa692b87 (patch)
treed90eee7eb9a24e3f380e7259e147f5cf3bb6fa72 /src/scripttools/debugging/qscriptedit.cpp
parentf6b551b31c7d0b76c4e0416f73a2baa1ab29602f (diff)
parentda2f08af67916ce09daf6dea185a118e0f8bcd6b (diff)
downloadqtscript-a21580952f5ba9dbde3ee5a9a7119e2afa692b87.tar.gz
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I4f4fee1eed9127999829d0bf3cb6fdb03a2ece48
Diffstat (limited to 'src/scripttools/debugging/qscriptedit.cpp')
-rw-r--r--src/scripttools/debugging/qscriptedit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scripttools/debugging/qscriptedit.cpp b/src/scripttools/debugging/qscriptedit.cpp
index d3d533f..c012a76 100644
--- a/src/scripttools/debugging/qscriptedit.cpp
+++ b/src/scripttools/debugging/qscriptedit.cpp
@@ -283,7 +283,7 @@ int QScriptEdit::extraAreaWidth() const
max /= 10;
++digits;
}
- space += fm.width(QLatin1Char('9')) * digits;
+ space += fm.horizontalAdvance(QLatin1Char('9')) * digits;
int markWidth = fm.lineSpacing();
space += markWidth;
@@ -306,16 +306,16 @@ void QScriptEdit::extraAreaPaintEvent(QPaintEvent *e)
int extraAreaWidth = m_extraArea->width();
QLinearGradient gradient(QPointF(extraAreaWidth - 10, 0), QPointF(extraAreaWidth, 0));
- gradient.setColorAt(0, pal.color(QPalette::Background));
+ gradient.setColorAt(0, pal.color(QPalette::Window));
gradient.setColorAt(1, pal.color(QPalette::Base));
painter.fillRect(rect, gradient);
QLinearGradient gradient2(QPointF(0, 0), QPointF(markWidth, 0));
gradient2.setColorAt(0, pal.color(QPalette::Dark));
- gradient2.setColorAt(1, pal.color(QPalette::Background));
+ gradient2.setColorAt(1, pal.color(QPalette::Window));
painter.fillRect(rect.intersected(QRect(rect.x(), rect.y(), markWidth, rect.height())), gradient2);
- painter.setPen(QPen(pal.color(QPalette::Background), 2));
+ painter.setPen(QPen(pal.color(QPalette::Window), 2));
if (isLeftToRight())
painter.drawLine(rect.x() + extraAreaWidth-1, rect.top(), rect.x() + extraAreaWidth-1, rect.bottom());
else