You are not logged in.

#1 2017-06-15 13:59:12

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,426

HINT: plasma 5: enable and tweak shadows in folderview plasmoid

I really missed that lost functionality from kde 4, because:
1) i like them
2) i like transparent plasma themes
3) I'd like to read white text even when i select a bright background.

Now i found the way to do by myself:
http://i.imgur.com/7BDJdjT.png

Unfortunately, this requires hacking a plasma-desktop package file, so:
1) keep a backup
2) be prepared to make the changes everytime you upgrade the package

File to edit: org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml

Search for:

            Component.onCompleted: {
                if (root.isContainment && main.GridView.view.isRootView) {
                    frameLoader.textShadow = textShadowComponent.createObject(frameLoader);
                }

and replace with:

            Component.onCompleted: {
                //if (root.isContainment && main.GridView.view.isRootView) {
                    frameLoader.textShadow = textShadowComponent.createObject(frameLoader);
                //}

This is sufficient to enable shadows in the folderview plasmoid too.

To tweak the shadow appaerance, search for this:

          DropShadow {
                        anchors.fill: label

                        z: 1

                        horizontalOffset: 1
                        verticalOffset: 1

                        radius: 2.0
                        samples: 4
                        spread: 0.15

                        color: "black"

                        opacity: model.isHidden ? 0.6 : 1

                        source: label

                        visible: editor.targetItem != main
                    }

...and experiment with various values (example follows);

horizontalOffset: 1
VerticalOffset: 1
radius: 2.0
samples: 4
spread: 0.15

Note that:
* the tweaked shadows will be applied to the desktop containment too.
* For some reasons the text appears to be brighter when a shadow is painted under it.


Have fun!

Last edited by kokoko3k (2017-06-15 14:04:32)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

Board footer

Powered by FluxBB