optimize: add specific icon for wiktionary

This commit is contained in:
xiaoyifang 2022-03-24 20:14:01 +08:00
parent c35a97b88f
commit a9a457cc00
3 changed files with 8 additions and 3 deletions

BIN
icons/wiktionary.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -63,8 +63,7 @@ public:
unsigned long maxResults ) ; unsigned long maxResults ) ;
virtual sptr< DataRequest > getArticle( wstring const &, vector< wstring > const & alts, virtual sptr< DataRequest > getArticle( wstring const &, vector< wstring > const & alts,
wstring const &, bool ) wstring const &, bool );
;
virtual quint32 getLangFrom() const virtual quint32 getLangFrom() const
{ return langId; } { return langId; }
@ -90,7 +89,12 @@ void MediaWikiDictionary::loadIcon() throw()
loadIconFromFile( fInfo.absoluteFilePath(), true ); loadIconFromFile( fInfo.absoluteFilePath(), true );
} }
if( dictionaryIcon.isNull() ) if( dictionaryIcon.isNull() )
{
if( url.contains( "tionary" ) )
dictionaryIcon = dictionaryNativeIcon = QIcon( ":/icons/wiktionary.png" );
else
dictionaryIcon = dictionaryNativeIcon = QIcon( ":/icons/icon32_wiki.png" ); dictionaryIcon = dictionaryNativeIcon = QIcon( ":/icons/icon32_wiki.png" );
}
dictionaryIconLoaded = true; dictionaryIconLoaded = true;
} }

View file

@ -18,6 +18,7 @@
<file>icons/icon32_dictd.png</file> <file>icons/icon32_dictd.png</file>
<file>icons/icon32_hunspell.png</file> <file>icons/icon32_hunspell.png</file>
<file>icons/icon32_wiki.png</file> <file>icons/icon32_wiki.png</file>
<file>icons/wiktionary.png</file>
<file>qt-style-st-lingvo.css</file> <file>qt-style-st-lingvo.css</file>
<file>article-style-st-lingvo.css</file> <file>article-style-st-lingvo.css</file>
<file>icons/icon_dsl_native.png</file> <file>icons/icon_dsl_native.png</file>