[Kstars-devel] KDE/kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Sun Nov 25 20:10:29 CET 2007


SVN commit 741493 by harris:

Use semi-transparent backgrounds for object name labels.  For 4.1, we
should add a user option to control background transparency for the
infoboxes and the object name labels.

CCMAIL: kstars-devel at kde.org



 M  +3 -1      skyobject.cpp  
 M  +3 -1      starobject.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skyobject.cpp #741492:741493
@@ -431,8 +431,10 @@
     QFontMetricsF fm = SkyLabeler::Instance()->fontMetrics();
     qreal width = fm.width( translatedName() );
     qreal height = fm.height();
+
+    //FIXME: Implement label background options
     QColor color( KStarsData::Instance()->colorScheme()->colorNamed( "SkyColor" ) );
-    psky.fillRect( QRectF( x+offset, y+offset - height * 0.7, width, height ), QBrush( color ) );
+    psky.fillRect( QRectF( x+offset, y+offset - height * 0.7, width, height ), QBrush( color, Qt::Dense4Pattern ) );
 
     if ( Options::useAntialias() )
         psky.drawText( QPointF(x+offset, y+offset), translatedName() );
--- trunk/KDE/kdeedu/kstars/kstars/starobject.cpp #741492:741493
@@ -400,8 +400,10 @@
     QFontMetricsF fm = SkyLabeler::Instance()->fontMetrics();
     qreal width = fm.width( sName );
     qreal height = fm.height();
+
+    //FIXME: Implement label background options
     QColor color( KStarsData::Instance()->colorScheme()->colorNamed( "SkyColor" ) );
-    psky.fillRect( QRectF( x+offset, y+offset - height * 0.7, width, height ), QBrush( color ) );
+    psky.fillRect( QRectF( x+offset, y+offset - height * 0.7, width, height ), QBrush( color, Qt::Dense4Pattern ) );
 
     if ( Options::useAntialias() )
         psky.drawText( QPointF( x+offset, y+offset ), sName );


More information about the Kstars-devel mailing list