Commit ca3b882a authored by Eike Ziller's avatar Eike Ziller

TextEditor: Fix painting with frame turned on

When using our text editor in a normal panel, we want to turn on the
frame again. Make sure that the extra text editor area does not overlap
the frame, and also make sure that there is no extra area shown at all
if all its features are turned off.

This fixes the painting of the input fields in the Clang Query advanced

Task-number: QTCREATORBUG-18815
Change-Id: Ie74f87ddc576c02cd5ea7650f2632fe91df143eb
Reviewed-by: Marco Bubke's avatarMarco Bubke <>
Reviewed-by: Tim Jenssen's avatarTim Jenssen <>
parent d010dbd1
......@@ -3370,7 +3370,8 @@ void TextEditorWidget::resizeEvent(QResizeEvent *e)
QRect cr = rect();
QStyle::visualRect(layoutDirection(), cr,
QRect(cr.left(),, extraAreaWidth(), cr.height())));
QRect(cr.left() + frameWidth(), + frameWidth(),
extraAreaWidth(), cr.height() - 2 * frameWidth())));
......@@ -4649,6 +4650,9 @@ int TextEditorWidget::extraAreaWidth(int *markWidthPtr) const
if (!d->m_marksVisible && documentLayout->hasMarks)
d->m_marksVisible = true;
if (!d->m_marksVisible && !d->m_lineNumbersVisible && !d->m_codeFoldingVisible)
return 0;
int space = 0;
const QFontMetrics fm(d->m_extraArea->fontMetrics());
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment