Skip to content
Permalink
Browse files

Fix truncated symbol name text in style manager dialog

  • Loading branch information
nyalldawson committed Oct 2, 2018
1 parent d5e0d33 commit 5c7fd20aa4555c9f0b87336745ab2e2505cf5b82
Showing with 8 additions and 9 deletions.
  1. +3 −1 src/gui/symbology/qgsstylemanagerdialog.cpp
  2. +5 −8 src/ui/qgsstylemanagerdialogbase.ui
@@ -255,7 +255,6 @@ void QgsStyleManagerDialog::tabItemType_currentChanged( int )

double iconSize = Qgis::UI_SCALE_FACTOR * fontMetrics().width( 'X' ) * 10;
listItems->setIconSize( QSize( static_cast< int >( iconSize ), static_cast< int >( iconSize * 0.9 ) ) ); // ~100, 90 on low dpi
listItems->setGridSize( QSize( static_cast< int >( iconSize * 1.2 ), static_cast< int >( iconSize * 1.1 ) ) ); // ~120,110 on low dpi

populateList();
}
@@ -287,6 +286,9 @@ void QgsStyleManagerDialog::populateSymbols( const QStringList &symbolNames, boo
QIcon icon = QgsSymbolLayerUtils::symbolPreviewIcon( symbol.get(), listItems->iconSize(), static_cast< int >( listItems->iconSize().width() * 0.16 ) );
item->setIcon( icon );
item->setData( name ); // used to find out original name when user edited the name
QFont f = item->data( Qt::FontRole ).value< QFont >();
f.setPointSize( 9 );
item->setData( f, Qt::FontRole );
item->setCheckable( check );
item->setToolTip( QStringLiteral( "<b>%1</b><br><i>%2</i>" ).arg( name, tags.count() > 0 ? tags.join( QStringLiteral( ", " ) ) : tr( "Not tagged" ) ) );
// add to model
@@ -237,10 +237,13 @@
</property>
<property name="iconSize">
<size>
<width>0</width>
<height>0</height>
<width>77</width>
<height>70</height>
</size>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="movement">
<enum>QListView::Static</enum>
</property>
@@ -250,12 +253,6 @@
<property name="spacing">
<number>5</number>
</property>
<property name="gridSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>

0 comments on commit 5c7fd20

Please sign in to comment.
You can’t perform that action at this time.