Add ITextMark::visible() to make ITextMarks not take any space

Change-Id: Ib07cdc5cbe9a26385f82e6a845d72f218de7b2a6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Daniel Teske
2012-02-13 19:26:16 +01:00
parent c760f6d424
commit cf4c131541
3 changed files with 7 additions and 0 deletions

View File

@@ -3797,6 +3797,8 @@ void BaseTextEditorWidget::extraAreaPaintEvent(QPaintEvent *e)
if (d->m_marksVisible) {
int xoffset = 0;
foreach (ITextMark *mark, userData->marks()) {
if (!mark->visible())
continue;
const int height = fmLineSpacing - 1;
const int width = int(.5 + height * mark->widthFactor());
const QRect r(xoffset, top, width, height);