profile: scale dive event items according to font print scale

When printing with low DPI, the dive event items become comically
large, because they are not resized like the fonts. Therefore,
scale using the fontPrintScale.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-07-04 17:27:10 +02:00 committed by Dirk Hohndel
parent 6b2e56e513
commit 65580fceda
3 changed files with 7 additions and 6 deletions

View file

@ -13,7 +13,7 @@ class DiveEventItem : public DivePixmapItem {
public:
DiveEventItem(const struct dive *d, struct event *ev, struct gasmix lastgasmix,
DivePlotDataModel *model, DiveCartesianAxis *hAxis, DiveCartesianAxis *vAxis,
int speed, QGraphicsItem *parent = nullptr);
int speed, double fontPrintScale, QGraphicsItem *parent = nullptr);
~DiveEventItem();
const struct event *getEvent() const;
struct event *getEventMutable();
@ -28,7 +28,7 @@ slots:
private:
void setupToolTipString(struct gasmix lastgasmix);
void setupPixmap(struct gasmix lastgasmix);
void setupPixmap(struct gasmix lastgasmix, double fontPrintScale);
int depthAtTime(int time);
DiveCartesianAxis *vAxis;
DiveCartesianAxis *hAxis;