Skip to content

Commit 19368cf

Browse files
committed
[style manager] inform users of successful import
1 parent 08f8ca7 commit 19368cf

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

src/gui/symbology-ng/qgsstyleexportimportdialog.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ void QgsStyleExportImportDialog::doExportImport()
151151
.arg( mTempStyle->errorString() ) );
152152
return;
153153
}
154+
else
155+
{
156+
QMessageBox::information( this, tr( "Export successful" ),
157+
tr( "The selected symbols were successfully exported to file:\n%1" )
158+
.arg( mFileName ) );
159+
}
154160
}
155161
else // import
156162
{
@@ -192,7 +198,7 @@ bool QgsStyleExportImportDialog::populateStyles( QgsStyle* style )
192198
name = styleNames[i];
193199
QgsSymbol* symbol = style->symbol( name );
194200
QStandardItem* item = new QStandardItem( name );
195-
QIcon icon = QgsSymbolLayerUtils::symbolPreviewIcon( symbol, listItems->iconSize() );
201+
QIcon icon = QgsSymbolLayerUtils::symbolPreviewIcon( symbol, listItems->iconSize(), 15 );
196202
item->setIcon( icon );
197203
model->appendRow( item );
198204
delete symbol;
@@ -207,7 +213,7 @@ bool QgsStyleExportImportDialog::populateStyles( QgsStyle* style )
207213
QScopedPointer< QgsColorRamp > ramp( style->colorRamp( name ) );
208214

209215
QStandardItem* item = new QStandardItem( name );
210-
QIcon icon = QgsSymbolLayerUtils::colorRampPreviewIcon( ramp.data(), listItems->iconSize() );
216+
QIcon icon = QgsSymbolLayerUtils::colorRampPreviewIcon( ramp.data(), listItems->iconSize(), 15 );
211217
item->setIcon( icon );
212218
model->appendRow( item );
213219
}

src/ui/qgsstyleexportimportdialogbase.ui

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,15 @@
111111
</property>
112112
<property name="iconSize">
113113
<size>
114-
<width>48</width>
115-
<height>48</height>
114+
<width>77</width>
115+
<height>70</height>
116116
</size>
117117
</property>
118-
<property name="movement">
119-
<enum>QListView::Static</enum>
118+
<property name="textElideMode">
119+
<enum>Qt::ElideNone</enum>
120+
</property>
121+
<property name="flow">
122+
<enum>QListView::LeftToRight</enum>
120123
</property>
121124
<property name="resizeMode">
122125
<enum>QListView::Adjust</enum>
@@ -127,6 +130,12 @@
127130
<property name="viewMode">
128131
<enum>QListView::IconMode</enum>
129132
</property>
133+
<property name="uniformItemSizes">
134+
<bool>true</bool>
135+
</property>
136+
<property name="wordWrap">
137+
<bool>true</bool>
138+
</property>
130139
</widget>
131140
</item>
132141
<item row="3" column="0">

0 commit comments

Comments
 (0)