mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
fix:if the applciation has a very large icon ,the application will crash
This commit is contained in:
parent
a4c1e2793a
commit
0ea3ad0149
|
@ -243,6 +243,8 @@ bool Class::loadIconFromFile( QString const & _filename, bool isFullName )
|
||||||
{
|
{
|
||||||
// Load successful
|
// Load successful
|
||||||
|
|
||||||
|
//some icon is very large ,will crash the application.
|
||||||
|
img = img.scaledToWidth( 48 );
|
||||||
// Apply the color key
|
// Apply the color key
|
||||||
|
|
||||||
img.setAlphaChannel( img.createMaskFromColor( QColor( 192, 192, 192 ).rgb(),
|
img.setAlphaChannel( img.createMaskFromColor( QColor( 192, 192, 192 ).rgb(),
|
||||||
|
|
Loading…
Reference in a new issue