From b01ec07a061f53776a0a178f7fe24f5321122f06 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Thu, 17 Oct 2013 16:52:29 +0300 Subject: Remove sunken state for Android. Only QLineEdit always sets the sunken state and on some Android devices (e.g HTC) the line edit is painted as it is pressed. Task-number: QTBUG-29565 Change-Id: I25031ffaadba85cae6b6ff17c0847cb706e23503 Reviewed-by: Paul Olav Tvete --- src/widgets/styles/qandroidstyle.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/widgets/styles') diff --git a/src/widgets/styles/qandroidstyle.cpp b/src/widgets/styles/qandroidstyle.cpp index 9595e49f40..ceb95aa125 100644 --- a/src/widgets/styles/qandroidstyle.cpp +++ b/src/widgets/styles/qandroidstyle.cpp @@ -515,8 +515,15 @@ void QAndroidStyle::drawPrimitive(PrimitiveElement pe, AndroidControlsHash::const_iterator it = itemType != QC_UnknownType ? m_androidControlsHash.find(itemType) : m_androidControlsHash.end(); - if (it != m_androidControlsHash.end()) - it.value()->drawControl(opt, p, w); + if (it != m_androidControlsHash.end()) { + if (itemType != QC_EditText) + it.value()->drawControl(opt, p, w); + else { + QStyleOption copy(*opt); + copy.state &= ~QStyle::State_Sunken; + it.value()->drawControl(©, p, w); + } + } else QFusionStyle::drawPrimitive(pe, opt, p, w); } -- cgit v1.2.3