patch-CopyrightLabel_position_-20091210.txt

Steven Mizuno, 2009-12-13 12:39 PM

Download (1.74 KB)

 
1
Index: src/plugins/copyright_label/plugin.cpp
2
===================================================================
3
--- src/plugins/copyright_label/plugin.cpp	(revision 12391)
4
+++ src/plugins/copyright_label/plugin.cpp	(working copy)
5
@@ -108,8 +108,9 @@
6
   now = QDate::currentDate();
7
   defString = "© QGIS " + now.toString( "yyyy" );
8
 
9
-  mQFont.setFamily( QgsProject::instance()->readEntry( "CopyrightLabel", "/FontName", "Sans Serif" ) );
10
-  mQFont.setPointSize( QgsProject::instance()->readNumEntry( "CopyrightLabel", "/FontSize", 9 ) );
11
+  // there is no font setting in the UI, so just use the Qt/QGIS default font (what mQFont gets when created)
12
+  //  mQFont.setFamily( QgsProject::instance()->readEntry( "CopyrightLabel", "/FontName", "Sans Serif" ) );
13
+  //  mQFont.setPointSize( QgsProject::instance()->readNumEntry( "CopyrightLabel", "/FontSize", 9 ) );
14
   mLabelQString = QgsProject::instance()->readEntry( "CopyrightLabel", "/Label", defString );
15
   mPlacementIndex = QgsProject::instance()->readNumEntry( "CopyrightLabel", "/Placement", 3 );
16
   mEnable = QgsProject::instance()->readBoolEntry( "CopyrightLabel", "/Enabled", true );
17
@@ -171,7 +172,7 @@
18
     {
19
       case 0: // Bottom Left
20
         //Define bottom left hand corner start point
21
-        myYOffset = myHeight - size.height() + 5;
22
+        myYOffset = myHeight - ( size.height() + 5 );
23
         myXOffset = 5;
24
         break;
25
       case 1: // Top left
26
@@ -186,7 +187,7 @@
27
         break;
28
       case 3: // Bottom Right
29
         //Define bottom right hand corner start point
30
-        myYOffset = myHeight - size.height() + 5;
31
+        myYOffset = myHeight - ( size.height() + 5 );
32
         myXOffset = myWidth - ( size.width() + 5 );
33
         break;
34
       default: