1
0
Fork 0

Tweak painting of aircraft ratings in launcher.

Should ensure the full text is visible with a wider range of font sizes.
This commit is contained in:
James Turner 2016-11-28 18:17:25 +00:00
parent 831053bd04
commit 53d50d9ba0

View file

@ -139,9 +139,8 @@ void AircraftItemDelegate::paint(QPainter * painter, const QStyleOptionViewItem
}
QRect r = contentRect;
r.setWidth(contentRect.width() / 3);
r.setWidth(contentRect.width() / 2);
r.moveTop(actualBounds.bottom() + MARGIN);
r.moveLeft(r.right());
r.setHeight(qMax(24, smallMetrics.height() + MARGIN));
painter->setRenderHint(QPainter::Antialiasing, true);
@ -375,7 +374,7 @@ QRect AircraftItemDelegate::packageButtonRect(const QRect& visualRect, const QMo
QPixmap thumbnail = index.data(Qt::DecorationRole).value<QPixmap>();
contentRect.setLeft(contentRect.left() + MARGIN + thumbnail.width());
return QRect(contentRect.left() + ARROW_SIZE, contentRect.bottom() - 24,
return QRect(contentRect.left() + ARROW_SIZE, contentRect.bottom() - BUTTON_HEIGHT,
BUTTON_WIDTH, BUTTON_HEIGHT);
}