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>
This commit is contained in:
parent
40583c3d31
commit
601a707f66
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user