0

How do I control all window drop/box shadows? Gnome themes seem to have different size shadows so I assume it is possible.

Here's what I have tried:

  1. Editing the gtk.css at "~/.config/gtk-3.0/gtk.css" by adding:

    .window-frame {box-shadow: none;}
    .window-frame:backdrop {box-shadow: none;}
    
  2. I added the same css to a copy of a downloaded theme installed in "~/.themes/" - this had no .window-frame class so I added it.

  3. I added the same css as well as one of the default themes (Albatross) copied out of "/usr/share/themes/" - this had a .window-frame class in "gtk-widgets.css" so I modified it.

I restarted Gnome shell after each. Attempts 1 and 2 did nothing. Attempt 3 did get rid of the shadows but also seemed to affect refresh in applications - text scrolling doesn't refresh.

--

Specs: Ubuntu 18.04 with Gnome/Mutter

1

The solution to this is to edit the "gtk.css" in whatever theme you are using - themes do control the drop/box shadow. I've tested this on Ubuntu 18.04. You can edit the default at "~/.config/gtk-3.0/gtk.css" or, a much better idea, you can edit your own installed theme, even if that's a copy of the default theme. Install your theme in your home directory "~/.themes/" folder and then find the "gtk.css" file in it's "gtk-3.0" folder. Open the file in a text editor and search for "decoration" and "decoration:backdrop". To remove the windows shadow comment out the box-shadow line and add your own set to "none" like so:

decoration
{
    border-radius: 6px 6px 0 0;
    border-width: 0px;
    /*box-shadow: 1px 12px 12px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.18);*/
    box-shadow: none;
    margin: 4px;
}

decoration:backdrop
{
    border-radius: 6px 6px 0 0;
    border-width: 0px;
    /*box-shadow: 1px 12px 12px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.18);*/
    box-shadow: none;
    margin: 4px;
}

Save the file. In Settings > Appearance you'll need to load the theme - if you were already using it change the them to another theme and then change it back to your theme again. Windows should now have no shadows - see image below.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.