Skip to content

Commit

Permalink
Small enhancements for labeling dialog: disable minimum size ui for p…
Browse files Browse the repository at this point in the history
…oints, add pt to font name and set two decimal places for distance spin boxes

git-svn-id: http://svn.osgeo.org/qgis/trunk@13616 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 1, 2010
1 parent 3887ec9 commit b946c33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/app/qgslabelinggui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ QgsLabelingGui::QgsLabelingGui( QgsPalLabeling* lbl, QgsVectorLayer* layer, QWid
}

chkMergeLines->setEnabled( layer->geometryType() == QGis::Line );
label_19->setEnabled( layer->geometryType() != QGis::Point );
mMinSizeSpinBox->setEnabled( layer->geometryType() != QGis::Point );

populateFieldNames();

Expand Down Expand Up @@ -266,7 +268,7 @@ void QgsLabelingGui::changeTextFont()

void QgsLabelingGui::updateFont( QFont font )
{
lblFontName->setText( QString( "%1, %2" ).arg( font.family() ).arg( font.pointSize() ) );
lblFontName->setText( QString( "%1, %2 %3" ).arg( font.family() ).arg( font.pointSize() ).arg( tr( "pt" ) ) );
lblFontPreview->setFont( font );

updatePreview();
Expand Down
8 changes: 4 additions & 4 deletions src/ui/qgslabelingguibase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<item>
<widget class="QStackedWidget" name="stackedPlacement">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="pagePoint">
<layout class="QVBoxLayout" name="verticalLayout_2">
Expand Down Expand Up @@ -182,7 +182,7 @@
<item>
<widget class="QStackedWidget" name="stackedOptions">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="pageOptionsPoint">
<layout class="QGridLayout" name="gridLayout_2">
Expand All @@ -199,7 +199,7 @@
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="spinDistPoint">
<property name="decimals">
<number>0</number>
<number>2</number>
</property>
</widget>
</item>
Expand Down Expand Up @@ -305,7 +305,7 @@
<item>
<widget class="QDoubleSpinBox" name="spinDistLine">
<property name="decimals">
<number>0</number>
<number>2</number>
</property>
</widget>
</item>
Expand Down

0 comments on commit b946c33

Please sign in to comment.