summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2020-08-07 21:10:46 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-03 11:46:18 -0700
commit52aa7d83b6eb0200702c75425972223720fde00a (patch)
tree7a1dc70e63ed775b8500c0fee5fb7eb69d398158
parentc6fa41588067b3c9787ded63207014ee5ae4d2d8 (diff)
downloadsubsurface-52aa7d83b6eb0200702c75425972223720fde00a.tar.gz
Increase event icon size in print mode
When plotting the profile in higher resolution for export, increase the icon size in the same way. This is commented out for the mobile version as that uses printMode for profile display. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--desktop-widgets/divelogexportdialog.cpp3
-rw-r--r--profile-widget/profilewidget2.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp
index 3204842ee..e9a4beb4e 100644
--- a/desktop-widgets/divelogexportdialog.cpp
+++ b/desktop-widgets/divelogexportdialog.cpp
@@ -225,11 +225,11 @@ void DiveLogExportDialog::on_buttonBox_accepted()
void exportProfile(const struct dive *dive, const QString filename)
{
ProfileWidget2 *profile = MainWindow::instance()->graphics;
- profile->plotDive(dive, true, false, true);
profile->setToolTipVisibile(false);
profile->setPrintMode(true);
double scale = profile->getFontPrintScale();
profile->setFontPrintScale(4 * scale);
+ profile->plotDive(dive, true, false, true);
QImage image = QImage(profile->size() * 4, QImage::Format_RGB32);
QPainter paint;
paint.begin(&image);
@@ -238,4 +238,5 @@ void exportProfile(const struct dive *dive, const QString filename)
profile->setToolTipVisibile(true);
profile->setFontPrintScale(scale);
profile->setPrintMode(false);
+ profile->plotDive(dive, true);
}
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 7fffb04e2..01870406b 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -796,6 +796,9 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict
item->setModel(dataModel);
item->setEvent(event, lastgasmix);
item->setZValue(2);
+#ifndef SUBSURFACE_MOBILE
+ item->setScale(printMode ? 4 :1);
+#endif
scene()->addItem(item);
eventItems.push_back(item);
if (event_is_gaschange(event))