Skip to content

Commit 2ee79cf

Browse files

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed
 

‎src/gui/qgsrasterlayerproperties.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ email : tim@linfiniti.com
1616
***************************************************************************/
1717

1818

19+
#include "qgsapplication.h"
1920
#include "qgsrasterlayerproperties.h"
2021
#include "qgslayerprojectionselector.h"
2122
#include "qgsproject.h"
@@ -194,12 +195,9 @@ QgsRasterLayerProperties::QgsRasterLayerProperties(QgsMapLayer *lyr, QWidget *pa
194195
cboGray->insertItem(tr("Not Set"));
195196
}
196197

197-
//
198-
#if defined(WIN32) || defined(Q_OS_MACX)
199-
QString PKGDATAPATH = qApp->applicationDirPath() + "/share/qgis";
200-
#endif
201-
QPixmap myPyramidPixmap(QString(PKGDATAPATH) + QString("/images/icons/pyramid.png"));
202-
QPixmap myNoPyramidPixmap(QString(PKGDATAPATH) + QString("/images/icons/no_pyramid.png"));
198+
QString myThemePath = QgsApplication::themePath();
199+
QPixmap myPyramidPixmap(myThemePath + "/mIconPyramid.png");
200+
QPixmap myNoPyramidPixmap(myThemePath + "/mIconNoPyramid.png");
203201

204202
// Only do pyramids if dealing directly with GDAL.
205203
if (!(rasterLayer->usesProvider()))
@@ -458,11 +456,10 @@ void QgsRasterLayerProperties::on_buttonBuildPyramids_clicked()
458456
// repopulate the pyramids list
459457
//
460458
lbxPyramidResolutions->clear();
461-
#if defined(WIN32) || defined(Q_OS_MACX)
462-
QString PKGDATAPATH = qApp->applicationDirPath() + "/share/qgis";
463-
#endif
464-
QPixmap myPyramidPixmap(QString(PKGDATAPATH) + QString("/images/icons/pyramid.png"));
465-
QPixmap myNoPyramidPixmap(QString(PKGDATAPATH) + QString("/images/icons/no_pyramid.png"));
459+
QString myThemePath = QgsApplication::themePath();
460+
QPixmap myPyramidPixmap(myThemePath + "/mIconPyramid.png");
461+
QPixmap myNoPyramidPixmap(myThemePath + "/mIconNoPyramid.png");
462+
466463
QgsRasterLayer::RasterPyramidList::iterator myRasterPyramidIterator;
467464
for ( myRasterPyramidIterator=myPyramidList.begin();
468465
myRasterPyramidIterator != myPyramidList.end();

0 commit comments

Comments
 (0)
Please sign in to comment.