vkrause added inline comments. INLINE COMMENTS
> davidedmundson wrote in barcodequickitem.cpp:37 > Is createBarcode a heavy function? It sounds like it could be. > > If so I'd recommend using QQmlParserStatus so you don't generate it 4 times > on startup as each property gets set. Right, that's cleaner, I'll fix that. > davidedmundson wrote in barcodequickitem.cpp:113 > you have the actual up-to-date item size from inside paint. Would that be > better than minimumSize? > > Please also change to > > img = m_barcode->toImage(size * qApp->devicePixelRatio()); > img.setDevicePixelRatio(qApp->devicePixelRatio()); > > for high DPI support. I don't think any of this makes a visual difference here, as the image is ultimately just a black/white pattern that is scaled with nearest neighbor scaling anyway, we'd just be moving that scaling around a bit. Results look sharp here at 1x/1.5x/2x scaling and are detected correctly by the barcode scanner. > davidedmundson wrote in barcodequickitem.cpp:131 > You're doing this in the paint, do you need to do this here? That's an issue with Prison, you only get a valid minimum size after one call to toImage(). I'll add a comment about that. REPOSITORY R280 Prison REVISION DETAIL https://phabricator.kde.org/D10433 To: vkrause, #frameworks, svuorela Cc: davidedmundson, michaelh