profile-widget: use smaller event icons on Subsurface-mobile

Smaller event icons fit the mobile display much nicer

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Rick Walsh 2016-02-06 16:27:52 +11:00 committed by Dirk Hohndel
parent 130f4cd7ac
commit 8facdc62fd

View file

@ -63,7 +63,11 @@ void DiveEventItem::setEvent(struct event *ev)
void DiveEventItem::setupPixmap()
{
const IconMetrics& metrics = defaultIconMetrics();
#ifndef SUBSURFACE_MOBILE
int sz_bigger = metrics.sz_med + metrics.sz_small; // ex 40px
#else
int sz_bigger = metrics.sz_med;
#endif
int sz_pix = sz_bigger/2; // ex 20px
#define EVENT_PIXMAP(PIX) QPixmap(QString(PIX)).scaled(sz_pix, sz_pix, Qt::KeepAspectRatio, Qt::SmoothTransformation)