mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
c6fa415880
commit
52aa7d83b6
2 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue