Skip to content

Commit

Permalink
Tune planets hints so that they don't appear in day time
Browse files Browse the repository at this point in the history
  • Loading branch information
xalioth committed Dec 5, 2010
1 parent 15b4ddc commit 25d9628
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/modules/Planet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ void Planet::drawHints(const StelCore* core, const QFont& planetNameFont)
StelPainter sPainter(prj);
sPainter.setFont(planetNameFont);
// Draw nameI18 + scaling if it's not == 1.
float tmp = 10.f + getAngularSize(core)*M_PI/180.f*prj->getPixelPerRadAtCenter()/1.44f; // Shift for nameI18 printing
float tmp = (hintFader.getInterstate()<=0 ? 7.f : 10.f) + getAngularSize(core)*M_PI/180.f*prj->getPixelPerRadAtCenter()/1.44f; // Shift for nameI18 printing
sPainter.setColor(labelColor[0], labelColor[1], labelColor[2],labelsFader.getInterstate());
sPainter.drawText(screenPos[0],screenPos[1], getSkyLabel(nav), 0, tmp, tmp, false);

Expand Down
5 changes: 4 additions & 1 deletion src/core/modules/SolarSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,11 @@ void SolarSystem::draw(StelCore* core)
delete sPainter;
}

// Make some voodoo to determine when labels should be displayed
float maxMagLabel = (core->getSkyDrawer()->getLimitMagnitude()<5.f ? core->getSkyDrawer()->getLimitMagnitude() :
5.f+(core->getSkyDrawer()->getLimitMagnitude()-5.f)*1.2f) +(labelsAmount-3.f)*1.2f;

// Draw the elements
float maxMagLabel=core->getSkyDrawer()->getLimitMagnitude()*0.80f+(labelsAmount*1.2f)-2.f;
foreach (const PlanetP& p, systemPlanets)
{
p->draw(core, maxMagLabel, planetNameFont);
Expand Down

0 comments on commit 25d9628

Please sign in to comment.