mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
profile: don't render mobile profile in printmode
There is no more reason to render the profile in printMode. DPR is also supported in normal mode. Moreover, don't scale the DPR down by fontScale. If we have to scale down the fonts, we'll have to do this differently without squeezing the rest of the profile features. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9c7974928b
commit
ae1758d4cd
2 changed files with 1 additions and 8 deletions
|
@ -484,7 +484,6 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM
|
|||
struct gasmix lastgasmix = get_gasmix_at_time(d, get_dive_dc_const(d, dc), duration_t{1});
|
||||
|
||||
while (event) {
|
||||
#ifndef SUBSURFACE_MOBILE
|
||||
// if print mode is selected only draw headings, SP change, gas events or bookmark event
|
||||
if (printMode) {
|
||||
if (empty_string(event->name) ||
|
||||
|
@ -496,10 +495,6 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM
|
|||
continue;
|
||||
}
|
||||
}
|
||||
#else
|
||||
// printMode is always selected for SUBSURFACE_MOBILE due to font problems
|
||||
// BUT events are wanted.
|
||||
#endif
|
||||
if (DiveEventItem::isInteresting(d, currentdc, event, plotInfo)) {
|
||||
auto item = new DiveEventItem(d, event, lastgasmix, plotInfo,
|
||||
timeAxis, profileYAxis, animSpeed, *pixmaps);
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
#include <QScreen>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
const double fontScale = 0.6; // profile looks less cluttered with smaller font
|
||||
|
||||
QMLProfile::QMLProfile(QQuickItem *parent) :
|
||||
QQuickPaintedItem(parent),
|
||||
m_devicePixelRatio(1.0),
|
||||
|
@ -33,7 +31,7 @@ QMLProfile::~QMLProfile()
|
|||
|
||||
void QMLProfile::createProfileView()
|
||||
{
|
||||
m_profileWidget.reset(new ProfileScene(fontScale * m_devicePixelRatio, true, false));
|
||||
m_profileWidget.reset(new ProfileScene(m_devicePixelRatio, false, false));
|
||||
}
|
||||
|
||||
// we need this so we can connect update() to the scaleChanged() signal - which the connect above cannot do
|
||||
|
|
Loading…
Reference in a new issue