Commit 04ec29f8 authored by Marco Martin's avatar Marco Martin
Browse files

Correct sizing of combobox items


The qstyle can set as preferred size for itemview items a different
size than the text height depending from the result of
sizeFromContents( CT_ItemViewItem, ..

Examples of styles that do this, are Oxygen and Breeze,
in order to have a bit more spacing.
This makes the combobox render incorrectly.

This patch makes use of the size hint of the qstyle instead of the
text height. Since the height can be more than the font height,
the text (and optional icon) are now drawn vertically centered
in the delegate.

Change-Id: I898d85c994d5760979750c2f3a5dafd83f1e3cbd
Reviewed-by: default avatarJ-P Nurmi <jpnurmi@theqtcompany.com>
Showing with 4 additions and 2 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment