Skip to content

Commit a8f0358

Browse files
author
timlinux
committed
Use 0.2 as default line width thoughout.
git-svn-id: http://svn.osgeo.org/qgis/trunk@9710 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 1be590b commit a8f0358

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

src/app/qgscontinuouscolordialog.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "qgscontinuouscolordialog.h"
2121
#include "qgscontinuouscolorrenderer.h"
22+
#include "qgis.h"
2223
#include "qgsfield.h"
2324
#include "qgssymbol.h"
2425
#include "qgsvectordataprovider.h"
@@ -122,7 +123,7 @@ QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
122123
else
123124
{
124125
cb_polygonOutline->setCheckState( Qt::Checked );
125-
outlinewidthspinbox->setValue( 0.4 );
126+
outlinewidthspinbox->setValue( DEFAULT_LINE_WIDTH );
126127
if ( mVectorLayer->geometryType() != QGis::Polygon )
127128
cb_polygonOutline->setVisible( false );
128129

src/core/qgis.h

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ const int USER_CRS_START_ID = 100000;
151151
const double MINIMUM_POINT_SIZE = 0.1;
152152
/** Magic number that determines the default point size for point symbols */
153153
const double DEFAULT_POINT_SIZE = 2.0;
154+
const double DEFAULT_LINE_WIDTH = 0.2;
154155

155156
// FIXME: also in qgisinterface.h
156157
#ifndef QGISEXTERN

src/core/renderer/qgssinglesymbolrenderer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ QgsSingleSymbolRenderer::QgsSingleSymbolRenderer( QGis::GeometryType type )
5353
sy->setFillStyle( Qt::SolidPattern );
5454
sy->setColor( QColor( 0, 0, 0 ) );
5555
}
56-
sy->setLineWidth( 0.2 );
56+
sy->setLineWidth( DEFAULT_LINE_WIDTH ); //declared in qgis.h
5757
mSymbol = sy;
5858
updateSymbolAttributes();
5959
}

src/core/symbology/qgssymbol.cpp

+13-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/* $Id$ */
1919
#include <cmath>
2020

21+
#include "qgis.h"
2122
#include "qgssymbol.h"
2223
#include "qgslogger.h"
2324
#include "qgssymbologyutils.h"
@@ -47,7 +48,9 @@ QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QStr
4748
mCacheUpToDate2( false ),
4849
mRotationClassificationField( -1 ),
4950
mScaleClassificationField( -1 )
50-
{}
51+
{
52+
mPen.setWidth( DEFAULT_LINE_WIDTH );
53+
}
5154

5255

5356
QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QString label, QColor c ) :
@@ -65,7 +68,9 @@ QgsSymbol::QgsSymbol( QGis::GeometryType t, QString lvalue, QString uvalue, QStr
6568
mCacheUpToDate2( false ),
6669
mRotationClassificationField( -1 ),
6770
mScaleClassificationField( -1 )
68-
{}
71+
{
72+
mPen.setWidth( DEFAULT_LINE_WIDTH );
73+
}
6974

7075
QgsSymbol::QgsSymbol()
7176
: mPointSymbolName( "hard:circle" ),
@@ -76,7 +81,9 @@ QgsSymbol::QgsSymbol()
7681
mCacheUpToDate2( false ),
7782
mRotationClassificationField( -1 ),
7883
mScaleClassificationField( -1 )
79-
{}
84+
{
85+
mPen.setWidth( DEFAULT_LINE_WIDTH );
86+
}
8087

8188

8289
QgsSymbol::QgsSymbol( QColor c )
@@ -90,7 +97,9 @@ QgsSymbol::QgsSymbol( QColor c )
9097
mCacheUpToDate2( false ),
9198
mRotationClassificationField( -1 ),
9299
mScaleClassificationField( -1 )
93-
{}
100+
{
101+
mPen.setWidth( DEFAULT_LINE_WIDTH );
102+
}
94103

95104
QgsSymbol::QgsSymbol( const QgsSymbol& s )
96105
{

0 commit comments

Comments
 (0)