--Boundary-00=_ihbSHuQSTPmCj4c Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I just committed a patch to restore the semi-transparent background of our on-screen infoboxes. I would like to use the same semi-transparent background for object labels, instead of the current opaque background using the sky color. My proposed patch is attached[1]. I think it looks a lot better this way. The only potential drawback is some confusion when labels overlap, but IMO, it's not that bad. For 4.1, I would make the the rendering of label BGs an option (full opaque, semi-transparent, or full transparent), but for now I'd like to hard-code the semi-transparent rendering. Any objections? regards, Jason [1]: cd $KDESOURCE/kdeedu/kstars/kstars; patch -p0 < semitrans_labels.patch --Boundary-00=_ihbSHuQSTPmCj4c Content-Type: text/x-diff; charset="us-ascii"; name="semitrans_labels.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="semitrans_labels.patch" Index: starobject.cpp =================================================================== --- starobject.cpp (revision 741403) +++ starobject.cpp (working copy) @@ -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 ); Index: skyobject.cpp =================================================================== --- skyobject.cpp (revision 741403) +++ skyobject.cpp (working copy) @@ -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() ); --Boundary-00=_ihbSHuQSTPmCj4c Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kstars-devel mailing list Kstars-devel@kde.org https://mail.kde.org/mailman/listinfo/kstars-devel --Boundary-00=_ihbSHuQSTPmCj4c--