From a299057a351b0aff2c961e920839451b67e50f4e Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 13 Jan 2010 18:29:15 +0100 Subject: Make input mask cursor blink Task-number: QTBUG-7174 Reviewed-by: Leo --- src/gui/widgets/qlinecontrol.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 117c550..12b4268 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); } -- cgit v0.12