@@ -805,7 +805,9 @@ void QgisApp::createStatusBar()
805
805
// For Qt/Mac 3.3, the default toolbutton height is 30 and labels were expanding to match
806
806
mOnTheFlyProjectionStatusButton ->setMaximumHeight (mScaleLabel ->height ());
807
807
QPixmap myProjPixmap;
808
- myProjPixmap.load (QString (PKGDATAPATH) + QString (" /images/icons/icon_projection_disabled.png" ));
808
+ QString myIconPath = mAppDir +" /share/qgis/themes/" + mThemeName ;
809
+ myProjPixmap.load (myIconPath+" /mIconProjectionDisabled.png" );
810
+ qDebug (" Icon disabled projection icon to: " + myIconPath.toLocal8Bit ()+" /mIconProjectionDisabled.png" );
809
811
mOnTheFlyProjectionStatusButton ->setPixmap (myProjPixmap);
810
812
assert (!myProjPixmap.isNull ());
811
813
QWhatsThis::add (mOnTheFlyProjectionStatusButton , tr (" This icon shows whether on the fly projection is enabled or not. Click the icon to bring up the project properties dialog to alter this behaviour." ));
@@ -4904,19 +4906,21 @@ void QgisApp::removePluginToolBarIcon(QAction *qAction)
4904
4906
4905
4907
void QgisApp::projectionsEnabled (bool theFlag)
4906
4908
{
4907
- #if defined(WIN32) || defined(Q_OS_MACX)
4908
- QString PKGDATAPATH = qApp->applicationDirPath () + " /share/qgis" ;
4909
- #endif
4909
+ QString myIconPath = mAppDir +" /share/qgis/themes/" + mThemeName ;
4910
4910
if (theFlag)
4911
4911
{
4912
4912
QPixmap myProjPixmap;
4913
- myProjPixmap.load (QString (PKGDATAPATH) + QString (" /images/icons/icon_projection.png" ));
4913
+ myProjPixmap.load (myIconPath+" /mIconProjectionEnabled.png" );
4914
+ qDebug (" Icon disabled projection icon to: " + myIconPath.toLocal8Bit ()+" /mIconProjectionEnabled.png" );
4915
+ assert (!myProjPixmap.isNull ());
4914
4916
mOnTheFlyProjectionStatusButton ->setPixmap (myProjPixmap);
4915
4917
}
4916
4918
else
4917
4919
{
4918
4920
QPixmap myProjPixmap;
4919
- myProjPixmap.load (QString (PKGDATAPATH) + QString (" /images/icons/icon_projection_disabled.png" ));
4921
+ myProjPixmap.load (myIconPath+" /mIconProjectionDisabled.png" );
4922
+ qDebug (" Icon disabled projection icon to: " + myIconPath.toLocal8Bit ()+" /mIconProjectionDisabled.png" );
4923
+ assert (!myProjPixmap.isNull ());
4920
4924
mOnTheFlyProjectionStatusButton ->setPixmap (myProjPixmap);
4921
4925
}
4922
4926
}
0 commit comments