Skip to content
Permalink
Browse files
Better SVG downloading icon
  • Loading branch information
nyalldawson committed Apr 9, 2018
1 parent 9c28c91 commit 887db6e7b2a30b6f57395113450cab33d8b1a841
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
@@ -648,6 +648,7 @@
<file>themes/default/mIconLayout.svg</file>
<file>themes/default/mActionNewReport.svg</file>
<file>themes/default/mIconReport.svg</file>
<file>themes/default/downloading_svg.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -84,7 +84,21 @@ QgsSvgCache::QgsSvgCache( QObject *parent )
, mMutex( QMutex::Recursive )
{
mMissingSvg = QStringLiteral( "<svg width='10' height='10'><text x='5' y='10' font-size='10' text-anchor='middle'>?</text></svg>" ).toLatin1();
mFetchingSvg = QStringLiteral( "<svg width='10' height='10'><text x='5' y='10' font-size='10' text-anchor='middle'>&#8987;</text></svg>" ).toLatin1();

const QString downloadingSvgPath = QgsApplication::defaultThemePath() + QStringLiteral( "downloading_svg.svg" );
if ( QFile::exists( downloadingSvgPath ) )
{
QFile file( downloadingSvgPath );
if ( file.open( QIODevice::ReadOnly ) )
{
mFetchingSvg = file.readAll();
}
}

if ( mFetchingSvg.isEmpty() )
{
mFetchingSvg = QStringLiteral( "<svg width='10' height='10'><text x='5' y='10' font-size='10' text-anchor='middle'>?</text></svg>" ).toLatin1();
}
}

QgsSvgCache::~QgsSvgCache()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 887db6e

Please sign in to comment.