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 686793 - Text not clear in chat bubbles
Text not clear in chat bubbles
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-24 13:47 UTC by Carlos Soriano
Modified: 2012-12-15 16:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
see "hola" text (20.83 KB, image/png)
2012-10-24 13:48 UTC, Carlos Soriano
  Details
comparison between 80% and 90% opacity (85.84 KB, image/png)
2012-11-04 11:10 UTC, Carlos Soriano
  Details
MessageTray: change notification and boxpointer background opacity to make the text in it more clear. (1.15 KB, patch)
2012-11-04 20:58 UTC, Carlos Soriano
accepted-commit_now Details | Review

Description Carlos Soriano 2012-10-24 13:47:12 UTC
The text in chat bubbles can be indistinguishable with the text below (window text) due to the transparency of the dialog. See attached image.

One solution for me is blur the background of dialogs. Can we do that?

And this last solution is good for me doing it also in the panel dialogs, instead of no transparency as current design. In this manner we can have the same design in the panel dialogs and message-tray dialogs
Comment 1 Carlos Soriano 2012-10-24 13:48:02 UTC
Created attachment 227150 [details]
see "hola" text
Comment 2 Travis Reitter 2012-10-30 23:55:45 UTC
Or we could just make the dialog solid black (or very dark). It looks like transparency was set for 3.7.x, since it's solid black on my 3.6.x system because I don't have this problem.
Comment 3 Allan Day 2012-11-01 12:24:01 UTC
I agree with the bug, but I would like to keep some transparency here if possible.

I don't suppose it would be possible to blur and/or desaturate what you see through the bubble, would it?
Comment 4 Carlos Soriano 2012-11-01 12:41:05 UTC
Hi Allan,

I agree with you, I want transparency too. And I really like blurring in transparencies, so:

I'm looking into it in two ways.
CSS blurring or clutter blurring.

I don't know about the CSS part in gnome, but I guess it will be hard to add this feature to the CSS engine.

And the clutter part, the problem is that we can blur actors, but the background is not an actor, it's CSS.
I was thinking about create a virtual shape below all the actors of the notification and blur this shape. But I don't know too much about clutter etc. to know if my idea is crazy.

So, if some developer can give some light, I will we glad to make a patch.
Comment 5 Allan Day 2012-11-01 13:26:51 UTC
Giovanni / Jasper - know what the options are here?
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-11-01 13:31:12 UTC
(In reply to comment #4)
> Hi Allan,
> 
> I agree with you, I want transparency too. And I really like blurring in
> transparencies, so:
> 
> I'm looking into it in two ways.
> CSS blurring or clutter blurring.
> 
> I don't know about the CSS part in gnome, but I guess it will be hard to add
> this feature to the CSS engine.

The CSS specification does not have a way to blur the area below elements, so I'm hesitant to add it. It's possible it could be done with Adobe's Filter Effects, but this is not finalized, and would only give the power to blur individual elements.

http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html

> And the clutter part, the problem is that we can blur actors, but the
> background is not an actor, it's CSS.
> I was thinking about create a virtual shape below all the actors of the
> notification and blur this shape. But I don't know too much about clutter etc.
> to know if my idea is crazy.

The "Bolt" extension does this with its Blur widget, but it cheats.

https://github.com/zacbarton/gnome-shell-extension-bolt/blob/master/bolt%40zacbarton.com/widgets/Blur.js

If we're fine with cheating like this (are there any other shell UIs that can go under the bubble?), I'd like to fix the bug, ask Zac for permission to use his code, and include it as a new widget in the shell.
Comment 7 Jean-François Fortin Tam 2012-11-01 14:08:53 UTC
Just to give a bit of perspective though, solid (or 90% opaque) black is always going to beat transparent-but-blurred backgrounds for legibility, especially considering that this is a text-intensive widget.

It would also be much less work to do than all the myriad of possibilities you're considering right now, notwithstanding potential driver issues (?). My 2¢.
Comment 8 Giovanni Campagna 2012-11-01 16:21:16 UTC
Ahem, just one thing to consider: CSS or Clutter blurring (or anything like that) applies to the content of the element/actor, not the background. And if you blur a constant rgba color, you get no effect.
What you want here is to blur the background, but that means rendering the screen to a texture and applying the shader to it (twice if using a separable Gaussian blur). That's going to kill performance even with the best GPUs, and IMHO is not an option.
Comment 9 Carlos Soriano 2012-11-01 16:40:44 UTC
Giovanni,

Maybe I sound stupid but...how windows 7 achieve this with normal GPU's (intel graphics) and normal performance then? Why we can't achieve something similar?
Do you think something like Jasper commented will kill performance?
Comment 10 Jasper St. Pierre (not reading bugmail) 2012-11-01 17:31:22 UTC
(In reply to comment #9)
> Giovanni,
> 
> Maybe I sound stupid but...how windows 7 achieve this with normal GPU's (intel
> graphics) and normal performance then? Why we can't achieve something similar?
> Do you think something like Jasper commented will kill performance?

They keep two copies of the screen: one blurred, one not, and they mask it. We can't do this efficiently with X in the way.
Comment 11 Giovanni Campagna 2012-11-01 21:27:06 UTC
That's a good question, and sorry if I was short on details.
Yes, it is indeed tecnhically possible to do in a performance efficient way, if you just redirect and blur the part of the screen that's behind the message tray.
The problem is how to do that with gnome-shell's technology, and in particular clutter.

The specific problem is that you're only allowed (easily) to redirect to FBO an entire actor, so you need to clone, clip and blur the screen, and then hope that the texture is not too big.
Also, Clutter does not allow you to draw only part of the actor when cloning, so you're still duplicating VBOs (one per each window, as cogl_rectangles() are not coalesced).
Additionally, there are weird interaction bugs with ClutterClone and ClutterEffect, so in the end you'll have to replicate clones by reimplementing stacking at the JS level (like the linked Blur.js does by using WorkspaceThumbnails).

In other words, there are two ways do it:
- easy coded, slow performance
- hard to write, decent (not fast!) performance

And IMHO, neither is worth for this bug, which is easily solved by making the notifications more opaque.
Comment 12 Giovanni Campagna 2012-11-01 21:29:17 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Giovanni,
> > 
> > Maybe I sound stupid but...how windows 7 achieve this with normal GPU's (intel
> > graphics) and normal performance then? Why we can't achieve something similar?
> > Do you think something like Jasper commented will kill performance?
> 
> They keep two copies of the screen: one blurred, one not, and they mask it. We
> can't do this efficiently with X in the way.

Uh. That's interesting. Does that mean they're redirecting the contents of the screen to a temporary buffer all the time, and live with that?

(Btw, my "kill performance" metrics for whole screen FBOs come from my unsuccessful attempts to keep 60fps in bug 682536)
Comment 13 Carlos Soriano 2012-11-04 11:09:53 UTC
Thanks Giovanni and Jasper for explanation.  Very good to know.

As no good solution to blur, I make a patch to make opacity 90%
Comment 14 Carlos Soriano 2012-11-04 11:10:34 UTC
Created attachment 228016 [details]
comparison between 80% and 90% opacity
Comment 15 Carlos Soriano 2012-11-04 20:58:41 UTC
Created attachment 228053 [details] [review]
MessageTray: change notification and boxpointer background opacity to make the text in it more clear.
Comment 16 Giovanni Campagna 2012-12-10 23:19:47 UTC
Review of attachment 228053 [details] [review]:

Let's go with this one.
Comment 17 Jakub Steiner 2012-12-11 13:09:49 UTC
0.9 sounds good to me.
Comment 18 Carlos Soriano 2012-12-15 16:42:14 UTC
ups, I've push the patch(my first...so I was lost) to master branch but I forgot to put in the commit message the bug link. So it not appears here. Is it serious? Can I do anything to fix it?

The commit:
http://git.gnome.org/browse/gnome-shell/commit/?id=57d3bec95c3c63aa9b237a4d85e75de7c0115c98