Added devicePixelRatio to shadow's radius.
Details
- Reviewers
apol ngraham davidedmundson - Group Reviewers
Plasma VDG - Commits
- R119:4056e24b353d: [Folder view]Make shadow scale aware
Check the shadow of items on the desktop.
Compare scale 100% vs big display scale (e.g. 300%).
Before: Shadow is invisible.
After: Visible shadow at every display scale.
Before vs After
Scale 300% and 100%
Diff Detail
- Repository
- R119 Plasma Desktop
- Branch
- shadow
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 22351 Build 22369: arc lint + arc unit
Oh gosh, are shadows not scale-aware anywhere? We'd have to replicate this code in a lot of places... might it make more sense to fix this in Qt itself?
+1 patch makes sense to me
containments/desktop/package/contents/ui/FolderItemDelegate.qml | ||
---|---|---|
433 | Why's the + 1? |
containments/desktop/package/contents/ui/FolderItemDelegate.qml | ||
---|---|---|
433 | https://doc.qt.io/qt-5/qml-qtgraphicaleffects-dropshadow.html#samples-prop |
containments/desktop/package/contents/ui/FolderItemDelegate.qml | ||
---|---|---|
433 | And I ate the "one" |
So I guess we do need to do this in all places where we use drop shadows, urgh.
Any chance you'd be interested in tackling that, @gvgeo?
As for this patch, seems like a candidate for the stable branch.
That commit has been there since 5.12.5
So I imagine you have it on your system.
It's possible it doesn't work correctly, but it needs some investigation.
I use arch's Qt 5.14.1
Any chance I only have this problem? My build is not exactly stable.
Btw found some places that use radius spallSpacing or gridUnit, like knewstuff. I wonder how that look, with that commit.
I don't know
You can find
./qml/QtGraphicalEffects/private/DropShadowBase.qml
somewhere in /usr on your local system,
add in some
console.log lines and see what's happening.
It was more of a general question...
Anyway I tried, nothing happens. I Believe it uses the qmlc files.
Screen.devicePixelRatio is always 1, while units.devicePixelRatio is correct.
Checked in ./qml/QtGraphicalEffects/DropShadow.qml and other qml in ./qml/ including PC3 files.
I have the same problem with the distro's build. So I guess this is a problem.
plasmashell doesn't use Qt scaling, so using units.devicePixelRatio is correct. It will be 2 when not used, and then divide by Qt scaling so Qt scales back up resulting in the same effect.
So will we need to remove this multiplying by units.devicePixelRatio bit if and when we finally make plasmashell respect Qt scaling and fix https://bugs.kde.org/show_bug.cgi?id=356446?
You've got so many landed patches under your belt now that I think it's time to apply for a developer account. :)
https://community.kde.org/Infrastructure/Get_a_Developer_Account