summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kde.org>2013-10-17 16:52:29 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-25 18:11:51 +0200
commitb01ec07a061f53776a0a178f7fe24f5321122f06 (patch)
tree392447933e28032366ebbdedc44c5652693bcf69 /src/widgets/styles
parent9b9c63c27d6f9945d0b662a4a931750d775e1955 (diff)
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 <paul.tvete@digia.com>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qandroidstyle.cpp11
1 files changed, 9 insertions, 2 deletions
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(&copy, p, w);
+ }
+ }
else
QFusionStyle::drawPrimitive(pe, opt, p, w);
}