summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-05-16 11:18:09 -0700
committerQt by Nokia <qt-info@nokia.com>2012-05-17 05:14:34 +0200
commit601a707f66485450e6fad24c5964874592a87f09 (patch)
treee8e84ad1ab6e55df5edaf3a485948cb56d050e61
parent40583c3d31422921ad90212fb179ac5e62261e5a (diff)
eglfs: Allow cursor atlas to be specified using an env variable
The atlas it assumed to have 8 cursors per row. All cursors have to be square. Change-Id: I7ffbad4662be450b146f84032bb26187894d528f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
-rw-r--r--src/plugins/platforms/eglfs/qeglfscursor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfscursor.cpp b/src/plugins/platforms/eglfs/qeglfscursor.cpp
index f997b64a0c..20cd7b978b 100644
--- a/src/plugins/platforms/eglfs/qeglfscursor.cpp
+++ b/src/plugins/platforms/eglfs/qeglfscursor.cpp
@@ -114,7 +114,10 @@ void QEglFSCursor::createCursorTexture(uint *texture, const QImage &image)
void QEglFSCursor::initCursorAtlas()
{
- QImage image = QImage(":/cursor-atlas.png").convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ static QByteArray atlas = qgetenv("QT_QPA_EGLFS_CURSORATLAS");
+ if (atlas.isEmpty())
+ atlas = ":/cursor-atlas.png";
+ QImage image = QImage(atlas).convertToFormat(QImage::Format_ARGB32_Premultiplied);
m_cursorAtlas.cursorWidth = image.width() / CURSORS_PER_ROW;
m_cursorAtlas.cursorHeight = image.height() / ((Qt::LastCursor + CURSORS_PER_ROW - 1) / CURSORS_PER_ROW);
m_cursorAtlas.hotSpot = QPoint(m_cursorAtlas.cursorWidth/2, m_cursorAtlas.cursorHeight/2); // ## be smarter