Desktop icon label backgrounds?

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
pizza_rat
Level 1
Level 1
Posts: 6
Joined: Tue May 17, 2022 3:32 am

Desktop icon label backgrounds?

Post by pizza_rat »

Is there a way to put a colored background behind the white label text for background icons? ie. black or blue. On xfce I can do it through editing a gtk config file but is there a way to do it on cinnamon? The icon text is rather hard to read with some wallpapers.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Desktop icon label backgrounds?

Post by smurphos »

Yes.

You need to add your custom css to the file (create it if not already present) ~/.config/gtk-3.0/gtk.css

The css you are overriding (and which you can thus use as a template) is here - https://github.com/linuxmint/nemo/blob/ ... cation.css

Some relevant discussions on the forum
viewtopic.php?f=208&t=308825
viewtopic.php?f=29&t=285306
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
pizza_rat
Level 1
Level 1
Posts: 6
Joined: Tue May 17, 2022 3:32 am

Re: Desktop icon label backgrounds?

Post by pizza_rat »

Hmm, I must be missing something here.

I pasted the above into my gtk.css, and I can change the background-color attribute of .nemo-desktop.nemo-canvas-item:hover and .nemo-desktop.nemo-canvas-item:selected and have the changes show up, but when I change it for .nemo-desktop.nemo-canvas-item it's still totally transparent.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Desktop icon label backgrounds?

Post by smurphos »

You are not - it looks like the background isn't actually drawn if the is no user interaction with the desktop icon, so there is nothing to apply a colour to. :(

https://github.com/linuxmint/nemo/issues/1940

So tweaking the text shadow is the only option to improve readability of icon labels across a variety of backgrounds.

This is what I use for that

Code: Select all

.nemo-desktop.nemo-canvas-item {
    color: #fff;
    text-shadow: 0px 0px 2px #000, 1px 1px #000, 1px -1px #000, -1px 1px #000, -1px -1px #000, 1px 0px #000, 0px 1px #000, -1px 0px #000, 0px -1px #000;
}
Last edited by smurphos on Wed May 18, 2022 8:37 am, edited 1 time in total.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
pizza_rat
Level 1
Level 1
Posts: 6
Joined: Tue May 17, 2022 3:32 am

Re: Desktop icon label backgrounds?

Post by pizza_rat »

Aw, that's a shame. I love having solid or semi transparent background labels for my desktop icons. I did set the shadows how you had them in one of those threads you linked, though, and that helped with readability a lot. So thanks!
Locked

Return to “Cinnamon”