1
0
Fork 0

Avoid overlap of ratings / progress bar

Part of issues mentioned in:

https://sourceforge.net/p/flightgear/codetickets/1865/
This commit is contained in:
James Turner 2016-06-17 22:42:33 +01:00
parent e4e0db5cac
commit 1d912c91df

View file

@ -268,11 +268,10 @@ QSize AircraftItemDelegate::sizeHint(const QStyleOptionViewItem & option, const
// ratings
int ratingHeight = qMax(24, smallMetrics.height() + MARGIN);
textHeight += ratingHeight * 2;
} else {
// just the button height
textHeight += BUTTON_HEIGHT;
}
textHeight += BUTTON_HEIGHT;
textHeight = qMax(textHeight, thumbnailSize.height());
return QSize(option.rect.width(), textHeight + (MARGIN * 2));
}