diff options
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/diveeventitem.cpp | 4 | ||||
-rw-r--r-- | profile-widget/profilewidget2.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp index f1f0f8016..e61182051 100644 --- a/profile-widget/diveeventitem.cpp +++ b/profile-widget/diveeventitem.cpp @@ -11,6 +11,7 @@ #include "core/membuffer.h" #include "core/sample.h" #include "core/subsurface-string.h" +#include <QDebug> #define DEPTH_NOT_FOUND (-2342) @@ -50,6 +51,7 @@ struct event *DiveEventItem::getEventMutable() void DiveEventItem::setupPixmap(struct gasmix lastgasmix, double fontPrintScale) { + extern int verbose; const IconMetrics& metrics = defaultIconMetrics(); #ifndef SUBSURFACE_MOBILE int sz_bigger = metrics.sz_med + metrics.sz_small; // ex 40px @@ -65,6 +67,8 @@ void DiveEventItem::setupPixmap(struct gasmix lastgasmix, double fontPrintScale) #endif sz_bigger = lrint(sz_bigger * fontPrintScale); int sz_pix = sz_bigger/2; // ex 20px + if (verbose) + qDebug() << __FUNCTION__ << "fontPrintScale" << fontPrintScale << "metrics" << metrics.sz_med << metrics.sz_small << "sz_bigger" << sz_bigger; #define EVENT_PIXMAP(PIX) QPixmap(QString(PIX)).scaled(sz_pix, sz_pix, Qt::KeepAspectRatio, Qt::SmoothTransformation) #define EVENT_PIXMAP_BIGGER(PIX) QPixmap(QString(PIX)).scaled(sz_bigger, sz_bigger, Qt::KeepAspectRatio, Qt::SmoothTransformation) diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 930df1267..9e307ef39 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -723,9 +723,6 @@ void ProfileWidget2::plotDive(const struct dive *dIn, int dcIn, bool doClearPict #endif DiveEventItem *item = new DiveEventItem(d, event, lastgasmix, dataModel, timeAxis, profileYAxis, animSpeed, getFontPrintScale()); item->setZValue(2); -#ifndef SUBSURFACE_MOBILE - item->setScale(printMode ? 4 :1); -#endif scene()->addItem(item); eventItems.push_back(item); if (event_is_gaschange(event)) |