Skip to content
Permalink
Browse files
Better SVG downloading icon
(cherry-picked from 887db6e)
  • Loading branch information
nyalldawson committed Apr 9, 2018
1 parent 120a884 commit 75fe8ed691c5aa0bceb44eb1ecb32b790cf3f6bd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
@@ -647,6 +647,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 75fe8ed

Please sign in to comment.