1

OS: Ubuntu 18.04

dkb@dkb-G:/usr/share/themes$ find -iname gtk-3* -type d
./Radiant-MATE/gtk-3.0
./Greybird/gtk-3.0
./Emacs/gtk-3.0
./Ambiance/gtk-3.0
./Ambiance/gtk-3.20
./Adwaita-dark/gtk-3.0
./Numix/gtk-3.0
./Numix/gtk-3.20
./Ambiant-MATE-Dark/gtk-3.0
./Radiance/gtk-3.0
./Radiance/gtk-3.20
./HighContrast/gtk-3.0
./Adwaita/gtk-3.0
./Ambiant-MATE/gtk-3.0
./Default/gtk-3.0
dkb@dkb-G:/usr/share/themes$ 

Why do Ambiance, Radiance, and Numix have gtk-3.0 and gtk-3.20 folders whereas others just have gtk-3.0?

From brief testing, it appears that changes to files in gtk-3.20 matter whereas making the same change to the corresponding file in gtk-3.0 has no effect.

For example, I edited gtk-main.css in both folders of the Ambiance theme to change

@define-color selected_bg_color #f07746;

to

@define-color selected_bg_color #ff00ff;

And only the change in gtk-3.20 had effect.

  • It is great that you are playing with MATE. But I can add that ordinary GNOME Shell edition also have ./Ambiance/gtk-3.20, ./Radiance/gtk-3.20. So your question is actual. – N0rbert Sep 21 '18 at 15:59
  • See this: reddit.com/r/linux/comments/4l5meg/… – pomsky Sep 25 '18 at 5:38
  • @pomsky, I went through that reddit but there wasn't any mention of why, for example, a Bionic theme such as Ambiance, has both gtk-3.0 and gtk-3.20 folders. In Kubuntu 18.04, the Breeze folder has gtk-3.18 and 3.20 folders but no gtk-3.0 folder! All very confusing but it looks like if there are multiple gtk-3* folders, the one with the higher version is the operative one. If I remember, when I get back on Ubuntu 18.04, I'll try deleting the lower version gtk-3* folders in ~/.themes, not in /usr/share/themes, to see if anything breaks. – DK Bose Sep 25 '18 at 5:53
1

The gtk-3.0 and gtk-3.20 folders contain text files which are based on the CSS web standard, but with some extensions and modification. Each file contains many rules which describe how information should be displayed when certain conditions are met - for example, what colours and fonts are to be used for a text label inside a flow box inside a note book. Since there many different types of widget and container, the number of rules quickly multiply.

The designers of the GTK have taken the decision that the original form of CSS (3.0) is no longer suitable, and a number of changes must be made. This means that previous CSS files are no longer valid, and the new set of CSS files must be put in the gkt-3.20 folder. However, since not every app would/could be rebuilt to the new version of the framework, the old gtk-3.0 folder remains so that older apps can continue to work as before. Indeed the gtk-2.0 folder is still required for that same reason.

If you edit a theme then any changes you make to the 3.20 folder will only affect those apps which were built to 3.20 (or later) framework. To change the look of older apps, you'll need to make corresponding changes to the gtk-3.0 folder. For really old apps, you'll also need to change the gtk-2.0 folder, but that's a whole different story.

|improve this answer|||||

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.