GNOME Bugzilla – Bug 656112
theme: Allow disabling fallback colors in gtk:custom()
Last modified: 2011-08-10 16:07:01 UTC
Small feature request from Lapo@guadec - provide designers with the possibility to disable the fallback color in gtk:custom() to catch typos in themed colors more easily. (I don't think it'll harm to have this change in master, but if we don't want to I can just tell him to grab the patch from here ...)
Created attachment 193381 [details] [review] theme: Allow disabling fallback colors in gtk:custom() gtk:custom() requires a fallback color in case the GTK+ theme in use does not define the desired color. As in general the fallback color will approximate the intended color, there is the risk of typos going unnoticed. To make catching these kind of errors easier, allow to ignore the fallback color specified (and fall back to a nice shade of pink instead) by setting an environment variable.
Review of attachment 193381 [details] [review]: Mostly looks good, but: ::: src/ui/theme.c @@ +1200,2 @@ MetaColorSpec *fallback = NULL; + gboolean debug = g_getenv ("MUTTER_DISABLE_FALLBACK_COLOR") != NULL; I don't like doing a g_getenv() (linear search through the environment) every time we parse a color; static variable would be fine.
Created attachment 193481 [details] [review] theme: Allow disabling fallback colors in gtk:custom() (In reply to comment #2) > I don't like doing a g_getenv() (linear search through the environment) every > time we parse a color; static variable would be fine. Sure.
Review of attachment 193481 [details] [review]: Looks good
Attachment 193481 [details] pushed as a485685 - theme: Allow disabling fallback colors in gtk:custom()