From 601a707f66485450e6fad24c5964874592a87f09 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 16 May 2012 11:18:09 -0700 Subject: eglfs: Allow cursor atlas to be specified using an env variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The atlas it assumed to have 8 cursors per row. All cursors have to be square. Change-Id: I7ffbad4662be450b146f84032bb26187894d528f Reviewed-by: Samuel Rødal --- src/plugins/platforms/eglfs/qeglfscursor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/eglfs') 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 -- cgit v1.2.3