Skip to content

Commit

Permalink
Use 0.2 as default line width thoughout.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9710 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Nov 26, 2008
1 parent 654c509 commit fda285a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/app/qgscontinuouscolordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "qgscontinuouscolordialog.h"
#include "qgscontinuouscolorrenderer.h"
#include "qgis.h"
#include "qgsfield.h"
#include "qgssymbol.h"
#include "qgsvectordataprovider.h"
Expand Down Expand Up @@ -122,7 +123,7 @@ QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
else
{
cb_polygonOutline->setCheckState( Qt::Checked );
outlinewidthspinbox->setValue( 0.4 );
outlinewidthspinbox->setValue( DEFAULT_LINE_WIDTH );
if ( mVectorLayer->geometryType() != QGis::Polygon )
cb_polygonOutline->setVisible( false );

Expand Down
1 change: 1 addition & 0 deletions src/core/qgis.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const int USER_CRS_START_ID = 100000;
const double MINIMUM_POINT_SIZE = 0.1;
/** Magic number that determines the default point size for point symbols */
const double DEFAULT_POINT_SIZE = 2.0;
const double DEFAULT_LINE_WIDTH = 0.2;

// FIXME: also in qgisinterface.h
#ifndef QGISEXTERN
Expand Down
2 changes: 1 addition & 1 deletion src/core/renderer/qgssinglesymbolrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ QgsSingleSymbolRenderer::QgsSingleSymbolRenderer( QGis::GeometryType type )
sy->setFillStyle( Qt::SolidPattern );
sy->setColor( QColor( 0, 0, 0 ) );
}
sy->setLineWidth( 0.2 );
sy->setLineWidth( DEFAULT_LINE_WIDTH ); //declared in qgis.h
mSymbol = sy;
updateSymbolAttributes();
}
Expand Down
17 changes: 13 additions & 4 deletions src/core/symbology/qgssymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/* $Id$ */
#include <cmath>

#include "qgis.h"
#include "qgssymbol.h"
#include "qgslogger.h"
#include "qgssymbologyutils.h"
Expand Down Expand Up @@ -47,7 +48,9 @@ QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QStr
mCacheUpToDate2( false ),
mRotationClassificationField( -1 ),
mScaleClassificationField( -1 )
{}
{
mPen.setWidth( DEFAULT_LINE_WIDTH );
}


QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QString label, QColor c ) :
Expand All @@ -65,7 +68,9 @@ QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QStr
mCacheUpToDate2( false ),
mRotationClassificationField( -1 ),
mScaleClassificationField( -1 )
{}
{
mPen.setWidth( DEFAULT_LINE_WIDTH );
}

QgsSymbol::QgsSymbol()
: mPointSymbolName( "hard:circle" ),
Expand All @@ -76,7 +81,9 @@ QgsSymbol::QgsSymbol()
mCacheUpToDate2( false ),
mRotationClassificationField( -1 ),
mScaleClassificationField( -1 )
{}
{
mPen.setWidth( DEFAULT_LINE_WIDTH );
}


QgsSymbol::QgsSymbol( QColor c )
Expand All @@ -90,7 +97,9 @@ QgsSymbol::QgsSymbol( QColor c )
mCacheUpToDate2( false ),
mRotationClassificationField( -1 ),
mScaleClassificationField( -1 )
{}
{
mPen.setWidth( DEFAULT_LINE_WIDTH );
}

QgsSymbol::QgsSymbol( const QgsSymbol& s )
{
Expand Down

0 comments on commit fda285a

Please sign in to comment.