summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2015-03-08 21:33:02 +0100
committerAndy Shaw <andy.shaw@digia.com>2015-03-11 11:21:00 +0000
commit8a60f57462cab5203aae5892a590a8bf767acd63 (patch)
treedf17d3f2a76e101abc3c972045012f966f37f2b3 /src
parent156be545785d959aa07bd2afd99ddfd6098ab85d (diff)
[Android]: Ensure clicking on the arrow shows the popup
This was a problem with editable comboboxes specifically as there is an edit field area which is separate to the arrow. Giving a valid rectangle for the arrow allows QComboBox to know that it was clicked on. Task-number: QTBUG-44931 Change-Id: Ie1d06a6631d6c7f5e813419a5e76f67ec9dcd7e8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qandroidstyle.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/styles/qandroidstyle.cpp b/src/widgets/styles/qandroidstyle.cpp
index a5a75dae02..18074b7aed 100644
--- a/src/widgets/styles/qandroidstyle.cpp
+++ b/src/widgets/styles/qandroidstyle.cpp
@@ -1811,6 +1811,10 @@ QRect QAndroidStyle::AndroidSpinnerControl::subControlRect(const QStyleOptionCom
{
if (sc == QStyle::SC_ComboBoxListBoxPopup)
return option->rect;
+ if (sc == QStyle::SC_ComboBoxArrow) {
+ const QRect editField = subControlRect(option, QStyle::SC_ComboBoxEditField, widget);
+ return QRect(editField.topRight(), QSize(option->rect.width() - editField.width(), option->rect.height()));
+ }
return AndroidControl::subControlRect(option, sc, widget);
}