Ask Your Question
2

Background colour/tint of overview in GNOME 3

asked 2014-08-05 02:20:55 -0500

iceequal gravatar image

updated 2014-10-05 05:17:30 -0500

mether gravatar image

When I'm looking at the overview (Dash + open windows) the background 'wash' or 'tint' that covers the desktop wallpaper is a very dark black colour that, to my eyes, grates against the very bright white thumbnails of the applications you have open. Or sometimes the black overlay just doesn't look great with your wallpaper or application/dash icons.

Is there any way to make the wallpaper say, blurred instead of having a black tint over it? Or tint it with another colour?

I've tried elegance-colors and gnome-tweak-tool, but neither of them seem to have this option. The former has extensive 'chameleon colour' options for GNOME except (I think) for the overview background tint. The gnome-tweak-tool doesn't have it as far as I can see either.

Thanks!

edit retag flag offensive close merge delete

Comments

Maybe post this question at the GNOME forums? I think it'll get answered more quickly there.

abadrinath gravatar imageabadrinath ( 2014-08-05 19:01:46 -0500 )edit

I don't think there are GNOME forums, just an IRC channel I couldn't figure out how to sign in to. So I'll stick around here for now...

iceequal gravatar imageiceequal ( 2014-08-05 23:33:17 -0500 )edit

Sorry, I thought it existed :)

abadrinath gravatar imageabadrinath ( 2014-08-06 00:22:49 -0500 )edit

I'm not sure, but probably the only option is to use some of gnome shell themes, or change the default theme manually.

hedayat gravatar imagehedayat ( 2014-08-06 13:44:09 -0500 )edit

I've tried lots of shell themes and they seemed to change everything but the black/dark wash of the overview. Any idea how I might go about manually editing it?

iceequal gravatar imageiceequal ( 2014-08-06 20:27:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-08-09 07:24:06 -0500

spot gravatar image

I happened to be in the same place as several of the core GNOME developers today, so I asked one of them about this, and he said that this specific behavior (the lightbox effect in the overview) was handled differently depending on which gnome-shell release you're running. I happened to be running 3.12 (from this copr repo, so he explained how it works in 3.12 and 3.14.

The lightbox effect in those releases is handled by the mutter library, specifically in src/compositor/meta-background.c. This is the code that does the magic:

 #define VIGNETTE_CODE                                                          \
 "vec2 position = cogl_tex_coord_in[0].xy * texture_scale - offset;\n"          \`
 "float t = length(2.0 * (position / actor_size));\n"                           \
 "t = clamp(t, 0.0, 1.0);\n"                                                    \
 "float pixel_brightness = mix(1.0, 1.0 - vignette_sharpness, t);\n"            \
 "cogl_color_out.rgb = cogl_color_out.rgb * pixel_brightness * brightness;\n"

Specifically, it is darkening the background colors through multiplying the brightness values to achieve the lightbox effect. This results in the "black wash", but it's not calculated on a specific color. The quick hack is to change the code to mix in a specific color as part of the process, the diff looks like this:

diff -up mutter-3.12.2/src/compositor/meta-background.c.colorchange mutter-3.12.2/src/compositor/meta-background.c
--- mutter-3.12.2/src/compositor/meta-background.c.colorchange  2014-08-09 13:49:27.603141789 +0200
+++ mutter-3.12.2/src/compositor/meta-background.c  2014-08-09 13:55:46.205277383 +0200
@@ -45,12 +45,15 @@
 "uniform float brightness;\n"                                                  \
 "uniform float vignette_sharpness;\n"                                          \

+/* 1.0, 1.0, 0.0 is yellow */
+
 #define VIGNETTE_CODE                                                          \
 "vec2 position = cogl_tex_coord_in[0].xy * texture_scale - offset;\n"          \
 "float t = length(2.0 * (position / actor_size));\n"                           \
 "t = clamp(t, 0.0, 1.0);\n"                                                    \
 "float pixel_brightness = mix(1.0, 1.0 - vignette_sharpness, t);\n"            \
-"cogl_color_out.rgb = cogl_color_out.rgb * pixel_brightness * brightness;\n"
+"vec3 constant_color = vec3(1.0, 1.0, 0.0);\n"                                 \
+"cogl_color_out.rgb = mix(cogl_color_out.rgb, constant_color, pixel_brightness * brightness);\n"

 /* We allow creating multiple MetaBackgrounds for the same monitor to
  * allow different rendering options to be set for different copies.

This results in this effect:

yellow wash

I asked about the reprocussions of changing this behavior in mutter, and he was reasonably confident that nothing else besides the shell overview mode was using this code in mutter. He also said that there were plans in the near term to rewrite how this code works entirely, but that he thought a patch to add a CSS option to enable the color choice for the overview lightbox would be accepted.

The same fix may apply to 3.10 mutter, but I do not have an instance of Fedora running 3.10 handy at the moment, and he seemed to think it might not work exactly the same there.

Here are some files that will help if you want to use my hack:

(more)
edit flag offensive delete link more

Comments

That is a great answer actually! +1

abadrinath gravatar imageabadrinath ( 2014-08-09 20:49:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-05 02:20:55 -0500

Seen: 949 times

Last updated: Aug 09 '14