summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcombobox_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-10-20 15:04:24 +0200
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2014-10-22 06:21:54 +0200
commitab556d6b321bb02cec2a0c0705b1212377fde095 (patch)
treeea6e45e58b3481e69f20a33b97a95b200b9bed2e /src/widgets/widgets/qcombobox_p.h
parent1a097dc139d42f165af0c78ced0934b7e6747d9e (diff)
Fix height of combo popup when the list view has non-zero spacing.
QListView::spacing() is the space around the item (layout margin), so the effective spacing is twice as big. This differs conceptionally from QTableView, which has a spacing of 1 and a line on top/bottom. Split up QComboBoxPrivateContainer::spacing() into functions return spacing and top/bottom margins to reflect this. Task-number: QTBUG-37865 Change-Id: I1ff812e7856e00a53f1119ef3304956cbb7cbfca Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/widgets/widgets/qcombobox_p.h')
-rw-r--r--src/widgets/widgets/qcombobox_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h
index becdde55ae..67b1aa6943 100644
--- a/src/widgets/widgets/qcombobox_p.h
+++ b/src/widgets/widgets/qcombobox_p.h
@@ -214,6 +214,8 @@ public:
QAbstractItemView *itemView() const;
void setItemView(QAbstractItemView *itemView);
int spacing() const;
+ int topMargin() const;
+ int bottomMargin() const { return topMargin(); }
void updateTopBottomMargin();
QTimer blockMouseReleaseTimer;