From ab556d6b321bb02cec2a0c0705b1212377fde095 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 20 Oct 2014 15:04:24 +0200 Subject: 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 --- src/widgets/widgets/qcombobox_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/widgets/widgets/qcombobox_p.h') 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; -- cgit v1.2.3