Commit cf4c1315 authored by Daniel Teske's avatar Daniel Teske

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

Change-Id: Ib07cdc5cbe9a26385f82e6a845d72f218de7b2a6
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent c760f6d4
......@@ -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);
......
......@@ -72,6 +72,10 @@ ITextMark::Priority ITextMark::priority() const
return m_priority;
}
bool ITextMark::visible() const
{
return true;
}
double ITextMark::widthFactor() const
{
......
......@@ -77,6 +77,7 @@ public:
void setIcon(const QIcon &icon);
Priority priority() const;
void setPriority(Priority prioriy);
virtual bool visible() const;
virtual double widthFactor() const;
private:
......
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