Skip to content

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed
 

‎src/qgisapp.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,9 @@ void QgisApp::createStatusBar()
805805
// For Qt/Mac 3.3, the default toolbutton height is 30 and labels were expanding to match
806806
mOnTheFlyProjectionStatusButton->setMaximumHeight(mScaleLabel->height());
807807
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");
809811
mOnTheFlyProjectionStatusButton->setPixmap(myProjPixmap);
810812
assert(!myProjPixmap.isNull());
811813
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)
49044906

49054907
void QgisApp::projectionsEnabled(bool theFlag)
49064908
{
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;
49104910
if (theFlag)
49114911
{
49124912
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());
49144916
mOnTheFlyProjectionStatusButton->setPixmap(myProjPixmap);
49154917
}
49164918
else
49174919
{
49184920
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());
49204924
mOnTheFlyProjectionStatusButton->setPixmap(myProjPixmap);
49214925
}
49224926
}

0 commit comments

Comments
 (0)
Please sign in to comment.