21 - 12 - 2024

Cinnamon, Font color fix for Adwaita

Recent update of opensuse packages for Cinnamon, totally made my desktop fonts unreadable. Trying alot of fix tutorials, none of those worked for Adwaita theme. More even, the Adwaita theme was hardcoded(gtk.gresource) whichrequired some additional steps to re-generate the DB used for CSS schemas. But I could find a easy fix, maybe it will be useful for other themes too...

All files for themes are located at /usr/share/themes/ directory, we need to edit some gtk-3.0 files used by Adwaita theme. First one we want to have is nemo.css created under apps/ folder with following content

$ cat gtk-3.0/apps/nemo,css
/* desktop mode */
.nemo-desktop.nemo-canvas-item {
color: #FFFFFF;
text-shadow: 1 1 alpha (#000000, 0.8);
}

As you can see to color definiton under .nemo-desktop.nemo-canvas-item section defines the color that will be used for our files/directories names under workspace enviromnent.We could also use some variables, instead hardcoding the color value, for example we could use @bg_color 

Now, when we have defined correct color to use, we need to make Adwaita aware to load it! For this we need to edit gtk.css following statement:

$ cat gtk-3.0/gtk.css
@import url("resource:///org/gnome/adwaita/gtk-main.css");
@import url("apps/nemo.css");

The last requires step it to relog current user, that's it