Skip to content

Commit

Permalink
Split a couple long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
10110111 committed Jan 30, 2025
1 parent 43e72e8 commit dfe97bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/modules/Planet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4828,9 +4828,12 @@ void Planet::drawHints(const StelCore* core, StelPainter &sPainter, const QFont&
//StelPainter sPainter(prj);
sPainter.setFont(planetNameFont);
// Draw nameI18 + scaling if it's not == 1.
float tmp = (hintFader.getInterstate()<=0.f ? 7.f : 10.f) + static_cast<float>(getAngularRadius(core)*M_PI/180.)*sPainter.getProjector()->getPixelPerRadAtCenter()/1.44f; // Shift for nameI18 printing
const float pixPerRad = sPainter.getProjector()->getPixelPerRadAtCenter();
const float angularRadius = getAngularRadius(core)*M_PI/180.;
float tmp = (hintFader.getInterstate()<=0.f ? 7.f : 10.f) + angularRadius*pixPerRad/1.44f; // Shift for nameI18 printing
sPainter.setColor(labelColor,labelsFader.getInterstate());
const QString label = (sphereScale != 1.) ? QString(u8"%1 (\u00d7%2)").arg(getPlanetLabel(), QString::number(sphereScale, 'f', 2)) : getPlanetLabel();
const QString label = sphereScale != 1. ? QString(u8"%1 (\u00d7%2)").arg(getPlanetLabel(), QString::number(sphereScale, 'f', 2))
: getPlanetLabel();
sPainter.drawText(static_cast<float>(screenPos[0]),static_cast<float>(screenPos[1]), label, 0, tmp, tmp, false);

// hint disappears smoothly on close view
Expand Down

0 comments on commit dfe97bc

Please sign in to comment.