With all the recent changes, some of the previous assumptions about the scale
of items seem to be no longer appropriate. Now that we are showing the icons in
the profile again on device it's quite obvious that they were way too big -
clearly we don't need the special scaling anymore.
Also implement a suggestion from Berthold to get slightly smaller fonts and
finer structures in the profile on mobile devices. This scaling of the DPR
seems to work well in my tests.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We do want the -Wfloat-conversion warnings where they point out
potential bugs. But they are very distracting when they are triggered by
floating point literals (which the standard defines as double) passed to
a function expecting float arguments.
The fact that Qt6 changes the arguments to all these functions from
double to float is... hard to explain, but it is what it is. With these
changes, for the majority of cases we create inlined helpers that
conditionally compile to do the right thing. And in a handful of other
cases we simply cast to float (and accept that on Qt5 this then gets
cast back to double... for none of these cases the potential loss in
precision makes any difference, anyway - which likely is why the Qt
community made the decision to change the type of the arguments in the
first place).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
On iOS there was special code to scale event icons with DPR
(device pixel ratio). However, that became redundant, when
printing started to also use DPR to scale the icons. Now,
on iOS icon sizes where multiplied twice with DPR.
Let's remove that and, if it is broken, try to fix it
at the correct place.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This looks much better on print-outs. The remaining event icons
still need to be converted to SVG.
SVG created by Lubomir I. Ivanov <neolit123@gmail.com> and
made compatible with the Qt SVG renderer by BS.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
For better scalability, we might replace the dive event icons
by SVGs. Since rendering SVGs is potentially very slow, cache
the pixmaps when the scene is generated.
Note: this does not yet do any SVG rendering, only the caching
of pixmaps.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>