mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
Better text for dive site completions
Also make the explanation text slightly smaller. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
14016f83ff
commit
a5b378bdf4
1 changed files with 10 additions and 0 deletions
|
@ -550,6 +550,14 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
||||||
bottomText += tr(" (~ %1 away)").arg(distance);
|
bottomText += tr(" (~ %1 away)").arg(distance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (bottomText.isEmpty()) {
|
||||||
|
if (dive_site_has_gps_location(&displayed_dive_site))
|
||||||
|
bottomText = tr("(no existing GPS data, add GPS fix from this dive)");
|
||||||
|
else
|
||||||
|
bottomText = tr("(no GPS data)");
|
||||||
|
}
|
||||||
|
bottomText = tr("Pick site: ") + bottomText;
|
||||||
|
|
||||||
print_part:
|
print_part:
|
||||||
|
|
||||||
fontBigger.setPointSize(fontBigger.pointSize() + 1);
|
fontBigger.setPointSize(fontBigger.pointSize() + 1);
|
||||||
|
@ -571,6 +579,8 @@ print_part:
|
||||||
painter->setBrush(option.palette.text());
|
painter->setBrush(option.palette.text());
|
||||||
painter->setFont(fontBigger);
|
painter->setFont(fontBigger);
|
||||||
painter->drawText(option.rect.x(),option.rect.y() + fmBigger.boundingRect("YH").height(), diveSiteName);
|
painter->drawText(option.rect.x(),option.rect.y() + fmBigger.boundingRect("YH").height(), diveSiteName);
|
||||||
|
double pointSize = fontSmaller.pointSizeF();
|
||||||
|
fontSmaller.setPointSizeF(0.9 * pointSize);
|
||||||
painter->setFont(fontSmaller);
|
painter->setFont(fontSmaller);
|
||||||
painter->setBrush(option.palette.brightText());
|
painter->setBrush(option.palette.brightText());
|
||||||
painter->drawText(option.rect.x(),option.rect.y() + fmBigger.boundingRect("YH").height() * 2, bottomText);
|
painter->drawText(option.rect.x(),option.rect.y() + fmBigger.boundingRect("YH").height() * 2, bottomText);
|
||||||
|
|
Loading…
Reference in a new issue