After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656112 - theme: Allow disabling fallback colors in gtk:custom()
theme: Allow disabling fallback colors in gtk:custom()
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-07 17:09 UTC by Florian Müllner
Modified: 2011-08-10 16:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
theme: Allow disabling fallback colors in gtk:custom() (2.01 KB, patch)
2011-08-07 17:09 UTC, Florian Müllner
needs-work Details | Review
theme: Allow disabling fallback colors in gtk:custom() (2.14 KB, patch)
2011-08-09 11:11 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2011-08-07 17:09:02 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 ...)
Comment 1 Florian Müllner 2011-08-07 17:09:06 UTC
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.
Comment 2 Owen Taylor 2011-08-09 08:42:18 UTC
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.
Comment 3 Florian Müllner 2011-08-09 11:11:24 UTC
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.
Comment 4 Owen Taylor 2011-08-10 14:16:50 UTC
Review of attachment 193481 [details] [review]:

Looks good
Comment 5 Florian Müllner 2011-08-10 16:06:48 UTC
Attachment 193481 [details] pushed as a485685 - theme: Allow disabling fallback colors in gtk:custom()