Skip to content
Permalink
Browse files
Fix #6214. Show names under symbols
  • Loading branch information
NathanW2 committed Dec 28, 2012
1 parent 9c91d31 commit 837f1872fdc108e679f1d52d7701135526de4aa9
Showing with 10 additions and 2 deletions.
  1. +7 −2 src/gui/symbology-ng/qgssymbolslistwidget.cpp
  2. +3 −0 src/ui/symbollayer/widget_symbolslist.ui
@@ -157,9 +157,14 @@ void QgsSymbolsListWidget::populateSymbols( QStringList names )
continue;
}
QStandardItem* item = new QStandardItem( names[i] );
item->setData( names[i], Qt::UserRole ); //so we can show a label when it is clicked
item->setText( "" ); //set the text to nothing and show in label when clicked rather
item->setData( names[i], Qt::UserRole ); //so we can load symbol with that name
item->setText( names[i] );
item->setToolTip( names[i] );
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
// Set font to 10points to show reasonable text
QFont itemFont = item->font();
itemFont.setPointSize( 10 );
item->setFont( itemFont );
// create preview icon
QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( s, previewSize );
item->setIcon( icon );
@@ -285,6 +285,9 @@
<height>48</height>
</size>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="flow">
<enum>QListView::LeftToRight</enum>
</property>

0 comments on commit 837f187

Please sign in to comment.