Commit 5ec1c8c9 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Improve visibility of the magnitude number in the labels.

parent 9e82b30f
......@@ -157,19 +157,22 @@ double DeepSkyObject::labelOffset() const {
return 0.5*size + 4.;
}
QString DeepSkyObject::labelString() const {
QString DeepSkyObject::labelString() const
{
QString oName;
if( Options::showDeepSkyNames() ) {
if( Options::showDeepSkyNames() )
{
if( Options::deepSkyLongLabels() && translatedLongName() != translatedName() )
oName = translatedLongName() + " (" + translatedName() + ')';
else
oName = translatedName();
}
if( Options::showDeepSkyMagnitudes() ) {
if( Options::showDeepSkyMagnitudes() )
{
if( Options::showDeepSkyNames() )
oName += "; ";
oName += QLocale().toString( mag(), 1 );
oName += " ";
oName += "[" + QLocale().toString( mag(), 'f', 1 ) + "m]";
}
return oName;
......
......@@ -552,14 +552,14 @@ QString StarObject::nameLabel( bool drawName, bool drawMag ) const
sName = gname( true );
else {
if ( drawMag )
return QLocale().toString( mag(), 1 );
return ("[" + QLocale().toString( mag(), 'f', 1 ) + "m]");
}
if ( ! drawMag )
return sName;
else
return sName + ' ' + QLocale().toString( mag(), 1 );
return sName + " [" + QLocale().toString( mag(), 'f', 1 ) + "m]";
}
return QLocale().toString( mag(), 1 );
return ("[" + QLocale().toString( mag(), 'f', 1 ) + "m]");
}
//If this works, we can maybe get rid of customLabel() and nameLabel()??
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment