summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlinecontrol.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-01 01:41:07 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-01 01:41:07 (GMT)
commit7e85c6dc7ba0aaa6dfcad40dc0e9df0e2adb3741 (patch)
tree07e839b8dd88c381471b96917ef5aafa484233b1 /src/gui/widgets/qlinecontrol.cpp
parent6e8feab83fa9303b1345f4a27478ba3ee0316e86 (diff)
parent5cf8677758e6fbfa5bf360c73519c14630db808c (diff)
downloadQt-7e85c6dc7ba0aaa6dfcad40dc0e9df0e2adb3741.zip
Qt-7e85c6dc7ba0aaa6dfcad40dc0e9df0e2adb3741.tar.gz
Qt-7e85c6dc7ba0aaa6dfcad40dc0e9df0e2adb3741.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/declarative/util/qmlpixmapcache.cpp
Diffstat (limited to 'src/gui/widgets/qlinecontrol.cpp')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 070091a..b0a64ea 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -510,10 +510,12 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl
o.format.setForeground(m_palette.brush(QPalette::HighlightedText));
} else {
// mask selection
- o.start = m_cursor;
- o.length = 1;
- o.format.setBackground(m_palette.brush(QPalette::Text));
- o.format.setForeground(m_palette.brush(QPalette::Window));
+ if(!m_blinkPeriod || m_blinkStatus){
+ o.start = m_cursor;
+ o.length = 1;
+ o.format.setBackground(m_palette.brush(QPalette::Text));
+ o.format.setForeground(m_palette.brush(QPalette::Window));
+ }
}
selections.append(o);
}
@@ -522,8 +524,11 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl
m_textLayout.draw(painter, offset, selections, clip);
if (flags & DrawCursor){
+ int cursor = m_cursor;
+ if (m_preeditCursor != -1)
+ cursor += m_preeditCursor;
if(!m_blinkPeriod || m_blinkStatus)
- m_textLayout.drawCursor(painter, offset, m_cursor, m_cursorWidth);
+ m_textLayout.drawCursor(painter, offset, cursor, m_cursorWidth);
}
}