Reconcile style accross all source files.
- All glabels code is in "glabels" top-level namespace. - Other assorted cleanup.
This commit is contained in:
+33
-28
@@ -24,33 +24,38 @@
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
//
|
||||
// Private Configuration Data
|
||||
//
|
||||
namespace
|
||||
namespace glabels
|
||||
{
|
||||
const QColor outlineColor( 0, 0, 0 );
|
||||
const double outlineWidthPixels = 1;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Constructor
|
||||
///
|
||||
ColorSwatch::ColorSwatch( int w, int h, const QColor& color )
|
||||
: QPixmap( w, h )
|
||||
{
|
||||
fill( Qt::transparent );
|
||||
|
||||
QPainter painter(this );
|
||||
|
||||
painter.setBackgroundMode( Qt::TransparentMode );
|
||||
|
||||
QBrush brush( color );
|
||||
QPen pen( outlineColor );
|
||||
pen.setWidth( outlineWidthPixels );
|
||||
|
||||
painter.setBrush( brush );
|
||||
painter.setPen( pen );
|
||||
painter.drawRect( 1, 1, w-2, h-2 );
|
||||
|
||||
//
|
||||
// Private
|
||||
//
|
||||
namespace
|
||||
{
|
||||
const QColor outlineColor( 0, 0, 0 );
|
||||
const double outlineWidthPixels = 1;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Constructor
|
||||
///
|
||||
ColorSwatch::ColorSwatch( int w, int h, const QColor& color )
|
||||
: QPixmap( w, h )
|
||||
{
|
||||
fill( Qt::transparent );
|
||||
|
||||
QPainter painter(this );
|
||||
|
||||
painter.setBackgroundMode( Qt::TransparentMode );
|
||||
|
||||
QBrush brush( color );
|
||||
QPen pen( outlineColor );
|
||||
pen.setWidth( outlineWidthPixels );
|
||||
|
||||
painter.setBrush( brush );
|
||||
painter.setPen( pen );
|
||||
painter.drawRect( 1, 1, w-2, h-2 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user