How to remove drop shadow from desktop icons Ubuntu Studio using Plasma

Ubuntu Studio: 24.04

Desktop Environment (if applicable):KDE Plasma Version 5.27.12

Problem Description:
Trying to remove the drop shadow on the text on the desktop icons…
There doesn’t seem to be any menu based option to do this…

What I’ve Tried:
I have tried editing the following file with Kate and searching for textShadow:
/usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml
and changed the value as per these instructions:
It contains the following two lines of code:

if ((frameLoader.textShadow && frameLoader.textShadow.visible) || fallbackRectangleBackground.visible) { return "#fff";

Change #fff to #00000000, then reboot or simply log out and back in, and the icon text will be invisible.

This change does indeed remove the icon text completely, but I would prefer to have the text without the drop shadow effect!
I suspect there is another piece of code in this file which will allow me to do what I want, but I am reluctant to try altering it in case I am unable to login again. I have created a Rescuezilla backup just in case…
Many thanks for any help!

Seems like you’re having to engineer your own plasma modifications!

Since this isn’t Ubuntu Studio-specific, (or even Ubuntu or Kubuntu specific!), I’d suggest checking with the good folks at https://discuss.kde.org.

1 Like

Thanks for that - I’ll wait a while and see if I get any more answers before trying there…

I seem to have found a workaround, and although I have posted the same question in the KDE forums, I’ll post my solution here:
As mentioned, I did make the change of #fff to #000000 to change the text colour to black, but I also made these changes to the same file:

Changed the textcolour conmponent from black to white:

               Component {
                    id: textShadowComponent

                    DropShadow {
                        anchors.fill: label

                        z: 1

                        horizontalOffset: 1
                        verticalOffset: 1

                        radius: Math.round(4 * PlasmaCore.Units.devicePixelRatio)
                        samples: radius * 2 + 1
                        spread: 0.35

//                       color: "black"
                        color: "white"

                        opacity: model.isHidden ? 0.6 : 1

                        source: label

                        visible: !editor || editor.targetItem !== main
                    }
                }

And commented out this line

          Component.onCompleted: {
                if (root.isContainment && main.GridView.view.isRootView && root.GraphicsInfo.api === GraphicsInfo.OpenGL) {
                    frameLoader.textShadow = textShadowComponent.createObject(frameLoader);
 //                   frameLoader.iconShadow = iconShadowComponent.createObject(frameLoader);

I had already changed my desk top wallpaper to a light beige so now although the is a white backgound to the icon text, it fades almost invisibly into the desktop wall paper, so that no drop shadows appear…
I’ve tried to upload an image of my desktop as it now appears, but this doesn’t seem to work - I clicked on the upload icon in the menu bar above and navigated to my phone camera directory and selected the photo, but nothing happened :thinking:

1 Like

Thanks for sharing the solution with the community, it is very much appreciated.

Hope it helps someone else, done a lot of head scratching!
I would like to include a photo of my desktop, but cannot get the upload to work - should I start a new topic or is there a simple solution to what I’m doing wrong?

Uploading images should work fine but if the file is too large that might be the issue.

Also, depending on the filetype and size it can sometimes take awhile to upload.

Or are you getting error messages?

Thanks! No error messages but probably the file is too big at 4MB. I’ve taken a screenshot now and will try to upload that as it’s only 4K…
Screenshot_20251101_164501
That seems to have done something as text has appeared with the file name, so maybe it will show when I hit ‘Reply’
Thanks for your patience.
By the way, I suspect that my solution to the drop shadows may disappear with a system update, so I’ve copied the *.xml file so I can repeat my changes…

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.