D18322: [Look and Feel and KSplash KCM] Set sourceSize for thumbnail
This revision was automatically updated to reflect the committed changes. Closed by commit R119:7c49e1498aab: [Look and Feel and KSplash KCM] Set sourceSize for thumbnail (authored by broulik). REPOSITORY R119 Plasma Desktop CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18322?vs=49722&id=60629 REVISION DETAIL https://phabricator.kde.org/D18322 AFFECTED FILES kcms/ksplash/package/contents/ui/main.qml kcms/lookandfeel/package/contents/ui/main.qml To: broulik, #plasma, davidedmundson Cc: apol, davidedmundson, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart
D18322: [Look and Feel and KSplash KCM] Set sourceSize for thumbnail
apol added a comment. (Catching up with e-mail) did this fall through? REPOSITORY R119 Plasma Desktop REVISION DETAIL https://phabricator.kde.org/D18322 To: broulik, #plasma Cc: apol, davidedmundson, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart
D18322: [Look and Feel and KSplash KCM] Set sourceSize for thumbnail
davidedmundson added a comment. I put debug in Qt, in qmlscene it works as you'd expect. In the system settings case QQuickImage thinks the DPR is always 1. The relevant window is QQuickWindow(0x55f9aee446d0, visibility=QWindow::Windowed, flags=QFlags(Window), title="Offscreen", geometry=336,21 426x592) with window()->effectiveDevicePixelRatio() == 1 It's a bug in the window embedding. I have a consistent rule about working round Qt bugs. I'll allow it if and only if we understand the root cause and have filed a bug or patch upstream and then reference it. REPOSITORY R119 Plasma Desktop REVISION DETAIL https://phabricator.kde.org/D18322 To: broulik, #plasma Cc: davidedmundson, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D18322: [Look and Feel and KSplash KCM] Set sourceSize for thumbnail
davidedmundson added a comment. Setting sourceSize +++ Only thing: 211: void QQuickImageBase::load() { 258:d->pix.load(qmlEngine(this), loadUrl, d->sourcesize * d->devicePixelRatio, options, d->providerOptions); If you need to change this here we're working around something. REPOSITORY R119 Plasma Desktop REVISION DETAIL https://phabricator.kde.org/D18322 To: broulik, #plasma Cc: davidedmundson, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D18322: [Look and Feel and KSplash KCM] Set sourceSize for thumbnail
broulik created this revision. broulik added a reviewer: Plasma. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. broulik requested review of this revision. REVISION SUMMARY Avoids loading huge screenshots just to show them in a tiny thumbnail. It's using `GridView.cellWidth` instead of `width` to avoid reloading the image as the layouting is done. Everytime `sourceSize` changes, the image is reloaded. TEST PLAN Saves like 10 MB in both KCMS for me Verified that the Images are only loaded once upon opening the KCM Still looks ok, albeit slightly blurrier, as before `smooth` wasn't set on resizing and now it's done in image reader or so. REPOSITORY R119 Plasma Desktop REVISION DETAIL https://phabricator.kde.org/D18322 AFFECTED FILES kcms/ksplash/package/contents/ui/main.qml kcms/lookandfeel/package/contents/ui/main.qml To: broulik, #plasma Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart