Skip to content

Commit

Permalink
Some visual tweaks to property assistant widget
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 14, 2017
1 parent 9c19142 commit 2df37a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/qgspropertyassistantwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void QgsPropertyAssistantWidget::updatePreview()
mPreviewList.clear();

QList<double> breaks = QgsSymbolLayerUtils::prettyBreaks( minValueSpinBox->value(),
maxValueSpinBox->value(), 4 );
maxValueSpinBox->value(), 8 );

QList< QgsSymbolLegendNode* > nodes = mTransformerWidget->generatePreviews( breaks, mLayerTreeLayer, mSymbol.get(), minValueSpinBox->value(),
maxValueSpinBox->value() );
Expand All @@ -181,7 +181,9 @@ void QgsPropertyAssistantWidget::updatePreview()
const QSize minSize( node->minimumIconSize() );
node->setIconSize( minSize );
widthMax = qMax( minSize.width(), widthMax );
mPreviewList.appendRow( new QStandardItem( node->data( Qt::DecorationRole ).value<QPixmap>(), QString::number( breaks[i] ) ) );
QStandardItem* item = new QStandardItem( node->data( Qt::DecorationRole ).value<QPixmap>(), QString::number( breaks[i] ) );
item->setEditable( false );
mPreviewList.appendRow( item );
delete node;
i++;
}
Expand Down
8 changes: 8 additions & 0 deletions src/ui/qgspropertyassistantwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Fetch value range from layer</string>
</property>
<property name="icon">
<iconset>
<normalon>:/images/themes/default/mActionDraw.svg</normalon>
</iconset>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
Expand Down

0 comments on commit 2df37a2

Please sign in to comment.