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 747163 - Give top bar translucency
Give top bar translucency
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-04-01 09:55 UTC by Moo
Modified: 2017-05-23 00:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
panel: Add solid class depending on context (3.89 KB, patch)
2016-10-10 14:52 UTC, Alessandro Bono
none Details | Review
gnome-shell: Apply new theme style (1.45 KB, patch)
2016-10-10 14:52 UTC, Alessandro Bono
none Details | Review
Screenshot : shadows applied to panel's cotent example (335.14 KB, image/png)
2016-11-06 09:56 UTC, Martin Blanchard
  Details
gnome-shell: Improve transparent style (2.41 KB, patch)
2017-01-25 10:25 UTC, Michael Kuhn
none Details | Review
panel: Do not change solid class during workspace switching (798 bytes, patch)
2017-01-25 14:02 UTC, Michael Kuhn
none Details | Review
gnome-shell: Improve transparent style (3.71 KB, patch)
2017-02-05 10:02 UTC, Michael Kuhn
none Details | Review
_common: Apply new theme style (2.36 KB, patch)
2017-04-25 16:16 UTC, Alessandro Bono
reviewed Details | Review
panel: Add solid class depending on context (9.20 KB, patch)
2017-04-25 16:17 UTC, Alessandro Bono
reviewed Details | Review
_common: Add transparency when free-floating (2.75 KB, patch)
2017-05-11 11:47 UTC, Alessandro Bono
none Details | Review
panel: Add transparency when free-floating (9.55 KB, patch)
2017-05-11 12:03 UTC, Alessandro Bono
none Details | Review
_common: Add transparency when free-floating (2.82 KB, patch)
2017-05-12 12:15 UTC, Alessandro Bono
committed Details | Review
panel: Add transparency when free-floating (9.55 KB, patch)
2017-05-12 12:20 UTC, Alessandro Bono
committed Details | Review

Description Moo 2015-04-01 09:55:46 UTC
Reduces the harsh contrast, makes screen appear bigger, makes wallpaper blend in better.
Translucency is also used in the menus of of KDE, Unity, OS X and Windows.

#panel {
- background-color: black;
+ background-color: rgba(0, 0, 0, 0.5);
Comment 1 Allan Day 2015-04-01 19:14:02 UTC
The pure black background we use is designed to make the top bar blend into the screen bezel and give focus to application windows (particularly when maximized). It's a key part of the shell's visual design, so I doubt we want permanent transparency here.

It could be interesting to make the top bar transparent when there are no maximised windows (in the current workspace), though.
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-04-01 19:26:52 UTC
Yeah, Endless does something similar where we set the top bar to be partially translucent, which becomes full black upon maximization.
Comment 3 Moo 2015-04-01 21:46:41 UTC
Allan Day,
This assumes the screen bezel is black, doesn't it?

Even Android has a transparent topbar.
https://upload.wikimedia.org/wikipedia/commons/a/a7/Android_L_Develpment_Preview.png

As does iOS:
https://upload.wikimedia.org/wikipedia/en/3/3e/IOS_8_Homescreen.png

As does OS X, KDE, Unity and Windows.

So the pure black top bar seems to be a rather odd descision.


Jasper,
What is "Endless"?
Comment 4 Jasper St. Pierre (not reading bugmail) 2015-04-01 21:55:13 UTC
Endless is an operating system that's based on GNOME, built by my employer.
Comment 5 Allan Day 2015-04-02 09:41:54 UTC
(In reply to Moo from comment #3)
> Allan Day,
> This assumes the screen bezel is black, doesn't it?

Yes - which is true the vast majority of the time.

> Even Android has a transparent topbar.
> https://upload.wikimedia.org/wikipedia/commons/a/a7/
> Android_L_Develpment_Preview.png
> 
> As does iOS:
> https://upload.wikimedia.org/wikipedia/en/3/3e/IOS_8_Homescreen.png

Both iOS and Android dynamically change the appearance of the top bar - the transparency isn't permanent.

> As does OS X, KDE, Unity and Windows.

OS X doesn't use straight transparency (it's more the trademark frosted glass). Also, maximised windows aren't such a thing on OS X. The latest Unity release doesn't use transparency by default.

Either way, what other operating systems do isn't the primary factor here. I've already said that transparency without maximised windows makes sense (it makes the screen feel bigger and more expansive). However, it looks a mess when you have a maximised window, and doesn't help you to focus on window content.
Comment 6 Moo 2015-04-02 12:52:11 UTC
You are right. It does look a mess when (In reply to Allan Day from comment #5)
> Either way, what other operating systems do isn't the primary factor here.
> I've already said that transparency without maximised windows makes sense
> (it makes the screen feel bigger and more expansive). However, it looks a
> mess when you have a maximised window, and doesn't help you to focus on
> window content.

I agree.

I propose that the top bar get translucency when non-maximized.
Comment 7 Emmanuele Bassi (:ebassi) 2015-04-02 14:41:03 UTC
Adding the gnome-love keyword; I think this is a good 'first bug' candidate for newcomers.

There's also an extension that can be used as a starting point — without the complexity of configurability: https://extensions.gnome.org/extension/885/dynamic-top-bar/
Comment 8 Allan Day 2015-04-02 14:47:52 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #7)
...
> There's also an extension that can be used as a starting point — without the
> complexity of configurability:
> https://extensions.gnome.org/extension/885/dynamic-top-bar/

Testing the extension, 0.1 transparency and button shadow off looks good to me.

Note that the overview should use the transparent version of the top bar.
Comment 9 Allan Day 2015-04-02 14:48:27 UTC
(In reply to Allan Day from comment #8)
...
> Testing the extension, 0.1 transparency and button shadow off looks good to
> me.

That should be 0.2, not 0.1.
Comment 10 l300lvl 2015-04-12 20:20:43 UTC
would love to see this myself, and also if i can ever understand jhbuild and gnome git i would be happy to start contributing...this would be a perfect starting place for someone like me
Comment 11 AMDG2 2016-04-21 14:43:21 UTC
Hello,

DynamicTopBar extension developper here. Perhaps the easiest way to integrate this into the shell is to include the extension by default ?
Comment 12 Florian Müllner 2016-04-21 14:59:10 UTC
(In reply to AMDG2 from comment #11)
> Perhaps the easiest way to integrate this into the shell is to include 
> the extension by default ?

No, unless we want to restrict it to classic mode, a feature/behavior shouldn't be an extension.
Comment 13 Emmanuele Bassi (:ebassi) 2016-04-21 15:13:43 UTC
Let's try to be more explicit and give some actionable suggestion — this is likely my fault, I was being overly cryptic in comment 8.

Since we'd like this feature, one way to make it happen would be to take the DynamicTopBar extension, which already exists, and turn it into a patch for GNOME Shell, against the current master branch.

The behaviour should be automatic, and not configurable; the opacity of the top bar should be 0.2 during normal operations, and turned to 1.0 as soon as window on the current workspace is maximized.

If the user changes workspace to one that does not have a maximized window, the top bar should go back to 0.2 opacity; switching to a workspace that has a maximized window should also bring the opacity of the top bar to 1.0.
Comment 14 zagortenay333 2016-04-22 12:01:36 UTC
For the love of everything, make it fully customizable by themes if you do this. Something like a different selector of pseudo-class.
Comment 15 Alessandro Bono 2016-09-29 11:14:40 UTC
How should the top bar look like while we have only one half-tiled window?
Comment 16 Allan Day 2016-09-29 11:24:32 UTC
(In reply to Alessandro Bono from comment #15)
> How should the top bar look like while we have only one half-tiled window?

Opaque and black, I'd say - a half-tiled window would be equivalent to a fully maximized one.
Comment 17 Florian Müllner 2016-09-29 16:39:53 UTC
(In reply to Allan Day from comment #16)
> (In reply to Alessandro Bono from comment #15)
> > How should the top bar look like while we have only one half-tiled window?
> 
> Opaque and black, I'd say - a half-tiled window would be equivalent to a
> fully maximized one.

Not sure. If we disable translucency when only half the background is visible, what about a normal window that touches the top bar? It sounds confusing to me that a window that can take up 50% (tiled), 80% (unconstrained) or 100% (maximized) of the available area results in an opaque top bar for its smallest and biggest size, but a translucent one in between ...
Comment 18 Emmanuele Bassi (:ebassi) 2016-09-29 16:45:00 UTC
What if the bar became fully opaque only if a window edge is adjacent to it, within a fuzzy area of (5 * scaling_factor) pixels?
Comment 19 Allan Day 2016-09-29 16:55:56 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #18)
> What if the bar became fully opaque only if a window edge is adjacent to it,
> within a fuzzy area of (5 * scaling_factor) pixels?

Makes sense to me.

I can also imagine the top bar turning opaque as you push against the top edge of the display while dragging a window (and maybe the sides for half-tiling).
Comment 20 Alessandro Bono 2016-10-10 14:52:01 UTC
Created attachment 337326 [details] [review]
panel: Add solid class depending on context

Add solid style class when there is at least one
window near enough to the panel

based on https://github.com/endlessm/eos-desktop commits:
9dbce87613a2787db5570faf7973cfbbe6997876
be79058bd773bbec849789a769ac6bf20ce47ea4
Comment 21 Alessandro Bono 2016-10-10 14:52:38 UTC
Created attachment 337327 [details] [review]
gnome-shell: Apply new theme style

Set transparency by default and use full black as
a special case
Comment 22 Juraj Fiala 2016-10-10 18:55:20 UTC
Do you plan to animate transitions? This would probably want some pondering over too, as e.g. when maximizing windows (that doesn't have an animation yet afaik) or when going from the overview to an maximized window it would be weird, but it would be also very pleasant when unmaximizing.
Comment 23 Juraj Fiala 2016-10-10 19:03:20 UTC
Also on a light background I'm having quite some problem with readability and considerable eye strain under 0.4. A solution for this would be to include some logic like pantheon and using black text when needed, but this would require much more work.
Comment 24 Allan Day 2016-10-20 13:51:05 UTC
This is looking good, Alessandro! Having tried the patches I have a few suggestions, based on discussion with other designers (and in line with Juraj's comments above):

 * There's a legibility issue when the panel is semi-transparent. It also looks a bit like it is disabled. Our suggestion to fix this is to make the text and icons lighter (possibly white).
 * The transition when the panel background colour changes is a bit abrupt. It would help to animate it.
Comment 25 Martin Blanchard 2016-11-06 09:56:18 UTC
Created attachment 339187 [details]
Screenshot : shadows applied to panel's cotent example

The Dynamic Panel Transparency extension [1] solves the panel's readability issue by making its content lighter (as Allan proposed) but also by adding shadows to it (see attached example). Think that's what elementary OS does either.

[1] https://extensions.gnome.org/extension/1011/dynamic-panel-transparency/
Comment 26 Oliver Propst 2017-01-22 21:31:28 UTC
Do not think its overstatement to state that it would be good if someone reviewed the patch.
Comment 27 Michael Kuhn 2017-01-25 10:25:16 UTC
Created attachment 344205 [details] [review]
gnome-shell: Improve transparent style

I took a stab at improving the transparent style. This patch makes the text and icons white and also gives them a 50% black shadow. On hover etc. the shadow is increased to 100% black.

I also tried using transitions but for some reason they do not work for me (on GNOME 3.22). Actually, it seems that even the existing transitions do not work. Any advice regarding this?
Comment 28 Michael Kuhn 2017-01-25 11:05:22 UTC
I also noticed one minor glitch: when changing workspaces, the panel flickers between solid and transparent while the windows are sliding up/down (most likely because their top gets too close to the panel). Is there a way to "block" _updateSolidStyle during workspace switching?
Comment 29 Michael Kuhn 2017-01-25 14:02:27 UTC
Created attachment 344217 [details] [review]
panel: Do not change solid class during workspace switching

I managed to fix the flickering. Probably not the cleanest approach because it accesses the internal _switchData variable but it works for now.
Comment 30 Florian Müllner 2017-02-03 15:16:38 UTC
(In reply to Michael Kuhn from comment #27)
> I also tried using transitions but for some reason they do not work for me

Indeed, transitions broke at some point. I filed a fix in bug 778145.
Comment 31 Michael Kuhn 2017-02-05 10:02:10 UTC
Created attachment 344969 [details] [review]
gnome-shell: Improve transparent style

After applying the patch from bug 778145, transitions now (almost) work. There is one remaining problem: The panel corner does not support transitions and the animation therefore looks a bit glitchy if you look closer.
Comment 32 Alessandro Bono 2017-04-25 16:16:59 UTC
Created attachment 350412 [details] [review]
_common: Apply new theme style

Set transparency by default and use full black as
a special case
Comment 33 Alessandro Bono 2017-04-25 16:17:35 UTC
Created attachment 350413 [details] [review]
panel: Add solid class depending on context

Add solid style class when there is at least one
window near enough to the panel. Update the css
style accordingly

based on https://github.com/endlessm/eos-desktop commits:
9dbce87613a2787db5570faf7973cfbbe6997876
be79058bd773bbec849789a769ac6bf20ce47ea4
Comment 34 Alessandro Bono 2017-04-25 16:30:13 UTC
(In reply to Michael Kuhn from comment #28)
> I also noticed one minor glitch: when changing workspaces, the panel
> flickers between solid and transparent while the windows are sliding up/down
> (most likely because their top gets too close to the panel). Is there a way
> to "block" _updateSolidStyle during workspace switching?

The flickering should be fixed. It is avoided by using the the actual (meta)windows coordinates instead of the ones of the actors. The coordinates of the actual windows don't change size/position during animations.

Let me know if you still see it.
Comment 35 Florian Müllner 2017-05-11 00:20:41 UTC
Review of attachment 350412 [details] [review]:

The commit message isn't great, but meh - for what it's worth, I usually don't bother with coming up with a separate one for the gnome-shell-sass module, and just reuse the message from the corresponding gnome-shell commit ...

::: _common.scss
@@ +758,3 @@
+  background-color: rgba(0, 0, 0, 0.2);
+  /* transition from solid to transparent */
+  transition-duration: 500ms;

Any reason it's different than the reverse transition?
(Not saying it's wrong, just curious)

@@ +812,3 @@
     &:hover {
       color: lighten($fg_color, 10%);
+      text-shadow: 0px 0px 8px rgba(0, 0, 0, 1);

I expect the designers to tweak the styling, so I'll just state that this effect looks overly strong to me (using a light background; the default lock screen one is a good test case)
Comment 36 Florian Müllner 2017-05-11 00:20:59 UTC
Review of attachment 350413 [details] [review]:

As mentioned on IRC: We probably want to give the window-list extension the same treatment, so it would be good to generalize the proximity tracking and move it to a separate class to avoid duplicating the code in the extension (and forgetting to update it). However (as also mentioned on IRC) I'm fine with landing the patch first and refactor it later for the extension, if you prefer.

In addition to the comments below, the commit message could also be better - it mentions obvious things like "update the CSS style", but omits any explanation of the change reasons.

(I usually borrow from designer comments in cases like this one, for example something like:

panel: Add transparency when free-floating

The solid black top bar we currently use works well for maximized
or tiled windows, as it puts focus on the application content by
blending into the monitor bezel. However it also visually reduces
the screen space, which is particularly noticeable when no window
is located nearby. Having the top bar blend with the background is
a better option in that case, so track window positions and add
some transparency when the top bar is free-floating.

::: js/ui/panel.js
@@ +815,3 @@
         Main.sessionMode.connect('updated', Lang.bind(this, this._updatePanel));
+
+        this._trackedWindows = {};

Nowadays we have support for Map(), so we don't need to (ab)use objects as hash replacement.

@@ +824,3 @@
 
+    _onWindowActorAdded: function(container, metaWindowActor) {
+        let signalId = metaWindowActor.connect('allocation-changed', Lang.bind(this, this._updateSolidStyle));

It's a bit ugly to track window actors and then base the actual checks on windows, but I can see how tracking windows and using ::position-changed is a bit painful, so OK.

@@ +1032,3 @@
 
+    _updateSolidStyle: function() {
+        if (this.actor.has_style_pseudo_class('overview') || !Main.sessionMode.hasWindows) {

The canonical way to test whether we're in the overview is Main.overview.visible, which should be slightly safer - should we decide at one point that we don't need different overview styling and remove the style class, then this check is easy to overlook (although the effect should be visible enough to catch the bug quickly, so it doesn't match too much I guess)

@@ +1038,3 @@
+
+        /* Get all the visible windows that are in the primary monitor */
+        let windows = global.get_window_actors().filter(function(metaWindowActor) {

Maybe throw in a map(a => a.meta_window)? Otherwise windowActors would be a more appropriate name ...

@@ +1040,3 @@
+        let windows = global.get_window_actors().filter(function(metaWindowActor) {
+            let metaWindow = metaWindowActor.meta_window;
+            return metaWindowActor.visible &&

Maybe
  metaWindow.showing_on_its_workspace() &&
  metaWindow.located_on_workspace(activeWorkspace) &&
  ...?

Using the actor visibility means that the panel style transition starts at the end of the workspace switch animation, with the above both animations happen in parallel.

@@ +1045,3 @@
+        });
+
+        /* Check if at least a window is near enough to the panel */

IMHO "let isNearEnough = windows.some(...)" is a good example for how clean code and good variable naming make comments unnecessary. If you want to keep it anyway: "at least one window"

@@ +1046,3 @@
+
+        /* Check if at least a window is near enough to the panel */
+        let panelTop = this.actor.get_transformed_position()[1];

I prefer

    let [, panelTop] = this.actor.get_transformed_position();

over array indexes

@@ +1051,3 @@
+        let isNearEnough = windows.some(Lang.bind(this, function(metaWindowActor) {
+            let verticalPosition = metaWindowActor.meta_window.get_frame_rect().y;
+            return panelTop < verticalPosition &&

I'm not sure I agree with this bit - a particular ugly case:
 1) have a non-maximized window (so the panel is translucent)
 2) press <super>, click anywhere in the window and move the
    pointer to the top edge
 => the panel briefly becomes solid when the window top touches it,
    then gets translucent again as the window moves underneath it;
    when the pointer reaches the monitor edge, we get a tile preview
    with a translucent panel

@@ +1052,3 @@
+            let verticalPosition = metaWindowActor.meta_window.get_frame_rect().y;
+            return panelTop < verticalPosition &&
+                   verticalPosition < panelBottom + 5*scale;

Style nit: spaces around operators

@@ +1055,3 @@
+        }));
+
+        if (isNearEnough) {

Style nit: Omit braces where all blocks are single lines
Comment 37 Alessandro Bono 2017-05-11 11:01:50 UTC
(In reply to Florian Müllner from comment #35)
> Review of attachment 350412 [details] [review] [review]:
> ::: _common.scss
> @@ +758,3 @@
> +  background-color: rgba(0, 0, 0, 0.2);
> +  /* transition from solid to transparent */
> +  transition-duration: 500ms;
> 
> Any reason it's different than the reverse transition?
> (Not saying it's wrong, just curious)

Because when we have just maximized a window it looks ugly to see the maximized window with the topbar still transparent, thus we want to make the topbar solid quickly. On the other hand, there is no hurry when a window is unmaximized, therefore we can take more time for the transition (since it is nice).

This is the reasoning behind it, feel free to drop it if the designers don't approve it.
Comment 38 Alessandro Bono 2017-05-11 11:28:23 UTC
(In reply to Florian Müllner from comment #36)
> Review of attachment 350413 [details] [review] [review]:
> @@ +1032,3 @@
>  
> +    _updateSolidStyle: function() {
> +        if (this.actor.has_style_pseudo_class('overview') ||
> !Main.sessionMode.hasWindows) {
> 
> The canonical way to test whether we're in the overview is
> Main.overview.visible, which should be slightly safer - should we decide at
> one point that we don't need different overview styling and remove the style
> class, then this check is easy to overlook (although the effect should be
> visible enough to catch the bug quickly, so it doesn't match too much I
> guess)

I opted to use this.actor.has_style_pseudo_class('overview') because when Main.overview::hiding is emitted Main.overview.visible is still true. This causes the function _updateSolidStyle() to return at the first check. Thus, the 'solid' class is never added. On the other hand, in js/ui/panel.js when Main.overview::hiding is emitted, we remove the 'overview' class just before calling _updateSolidStyle().
Comment 39 Alessandro Bono 2017-05-11 11:47:56 UTC
Created attachment 351618 [details] [review]
_common: Add transparency when free-floating

The solid black top bar we currently use works well for maximized
or tiled windows, as it puts focus on the application content by
blending into the monitor bezel. However it also visually reduces
the screen space, which is particularly noticeable when no window
is located nearby. Having the top bar blend with the background is
a better option in that case, so track window positions and add
some transparency when the top bar is free-floating.
Comment 40 Alessandro Bono 2017-05-11 12:03:16 UTC
Created attachment 351620 [details] [review]
panel: Add transparency when free-floating

The solid black top bar we currently use works well for maximized
or tiled windows, as it puts focus on the application content by
blending into the monitor bezel. However it also visually reduces
the screen space, which is particularly noticeable when no window
is located nearby. Having the top bar blend with the background is
a better option in that case, so track window positions and add
some transparency when the top bar is free-floating.

based on https://github.com/endlessm/eos-desktop commits:
9dbce87613a2787db5570faf7973cfbbe6997876
be79058bd773bbec849789a769ac6bf20ce47ea4
Comment 41 Florian Müllner 2017-05-11 15:12:25 UTC
Review of attachment 351618 [details] [review]:

(In reply to Alessandro Bono from comment #37)
> This is the reasoning behind it, feel free to drop it if the designers don't
> approve it.

I expect the designers to tweak stuff before or after landing the patches, from my point of view it's fine
Comment 42 Florian Müllner 2017-05-11 15:13:38 UTC
(In reply to Alessandro Bono from comment #38)
> I opted to use this.actor.has_style_pseudo_class('overview') because when
> Main.overview::hiding is emitted Main.overview.visible is still true. This
> causes the function _updateSolidStyle() to return at the first check. Thus,
> the 'solid' class is never added. On the other hand, in js/ui/panel.js when
> Main.overview::hiding is emitted, we remove the 'overview' class just before
> calling _updateSolidStyle().

OK, makes sense.
Comment 43 Florian Müllner 2017-05-11 15:13:46 UTC
Review of attachment 351620 [details] [review]:

Nice work! We'll still have to figure out what to do about the window-list and panel corners, but neither is something we should block on IMHO.

So apart from the window type question below, this is ready to go IMHO (although the designers may also want to chime in on the style). One nit on the commit message: If you want to keep the attribution (let's face it, the last iteration has very little to do with the referenced commits), "based on" should be capitalized.

::: js/ui/panel.js
@@ +1040,3 @@
+        /* Get all the windows in the active workspace that are in the primary monitor and visible */
+        let activeWorkspace = global.screen.get_active_workspace();
+        let windows = activeWorkspace.list_windows().filter(function(metaWindow) {

Oh, this is much nicer than map()+located_on_workspace()

@@ +1043,3 @@
+            return metaWindow.is_on_primary_monitor() &&
+                   metaWindow.showing_on_its_workspace() &&
+                   metaWindow.get_window_type() == Meta.WindowType.NORMAL;

Mmh, looks like we want to include at least DIALOG and MODAL_DIALOG here as well? Or maybe != Meta.WindowType.DESKTOP?

(list_windows() doesn't include override-redirect windows, so all menu types are already handled correctly)
Comment 44 Juraj Fiala 2017-05-11 16:19:28 UTC
(In reply to Alessandro Bono from comment #37)
> Because when we have just maximized a window it looks ugly to see the
> maximized window with the topbar still transparent, thus we want to make the
> topbar solid quickly. On the other hand, there is no hurry when a window is
> unmaximized, therefore we can take more time for the transition (since it is
> nice).

Should there be an animation at all if there’s is no animation for maximising the window? It’s going to look weird.
Comment 45 Alessandro Bono 2017-05-12 10:23:22 UTC
(In reply to Juraj Fiala from comment #44)
> (In reply to Alessandro Bono from comment #37)
> > Because when we have just maximized a window it looks ugly to see the
> > maximized window with the topbar still transparent, thus we want to make the
> > topbar solid quickly. On the other hand, there is no hurry when a window is
> > unmaximized, therefore we can take more time for the transition (since it is
> > nice).
> 
> Should there be an animation at all if there’s is no animation for
> maximising the window? It’s going to look weird.

I don't think that it looks that weird, and in the long run maybe we will have an animation for the (un)maximize action. Furthermore, currently (in the patch) there is no way to distinguish how the window approaches the topbar (by a drag operation or by a maximize action) and I doubt that it worth to try to separate the cases.
Comment 46 Florian Müllner 2017-05-12 11:21:34 UTC
(In reply to Alessandro Bono from comment #45)
> I don't think that it looks that weird, and in the long run maybe we will
> have an animation for the (un)maximize action. Furthermore, [...] I doubt that > it is worth to try to separate the cases.

I agree.
Comment 47 Alessandro Bono 2017-05-12 12:15:50 UTC
Created attachment 351711 [details] [review]
_common: Add transparency when free-floating

The solid black top bar we currently use works well for maximized
or tiled windows, as it puts focus on the application content by
blending into the monitor bezel. However it also visually reduces
the screen space, which is particularly noticeable when no window
is located nearby. Having the top bar blend with the background is
a better option in that case, so track window positions and add
some transparency when the top bar is free-floating.

Fix missing hovering effect when the topbar is black
Comment 48 Alessandro Bono 2017-05-12 12:20:50 UTC
Created attachment 351712 [details] [review]
panel: Add transparency when free-floating

The solid black top bar we currently use works well for maximized
or tiled windows, as it puts focus on the application content by
blending into the monitor bezel. However it also visually reduces
the screen space, which is particularly noticeable when no window
is located nearby. Having the top bar blend with the background is
a better option in that case, so track window positions and add
some transparency when the top bar is free-floating.
Comment 49 Alessandro Bono 2017-05-19 16:53:36 UTC
Comment on attachment 351711 [details] [review]
_common: Add transparency when free-floating

Attachment 351711 [details] pushed as 4c36117 - _common: Add transparency when free-floating
Comment 50 Alessandro Bono 2017-05-19 17:01:17 UTC
Attachment 351712 [details] pushed as 447bf55 - panel: Add transparency when free-floating
Comment 51 Hussam Al-Tayeb 2017-05-19 18:57:41 UTC
(In reply to Alessandro Bono from comment #45)
> I don't think that it looks that weird, and in the long run maybe we will
> have an animation for the (un)maximize action.
It would be great to have maximize and unmaximize animations like full screening :) There is a bug 766685 about that idea.
Comment 52 Stephen 2017-05-20 12:21:16 UTC
What happens with a busy background? I have seen what (I believe is) a screenshot of the current state of this, and it seems to be simple opacity. With a busy background (e.g. as many photos are), plain opacity will make top bar text difficult to read in many cases.

Apple and Microsoft have both addressed this at various points in their respective OSes with blur because they recognised this issue.
Comment 53 Bastien Nocera 2017-05-23 00:18:15 UTC
(In reply to Stephen from comment #52)
> What happens with a busy background? I have seen what (I believe is) a
> screenshot of the current state of this, and it seems to be simple opacity.
> With a busy background (e.g. as many photos are), plain opacity will make
> top bar text difficult to read in many cases.
> 
> Apple and Microsoft have both addressed this at various points in their
> respective OSes with blur because they recognised this issue.

Can you please file a new bug against gnome-shell if it is actually a problem after testing?
Comment 54 Stephen 2017-05-23 00:54:01 UTC
At the level of transparency it has in the screencasts I have seen, it will be a problem - when Compiz was a new thing back in the day, there were one or more plugins that allowed setting transparency without blur, and they were not useable with anything but abstract/blurry backgrounds for the same reason.

If the issue has already been considered/tested and/or there's a reason this implementation is materially different, my apologies, but if not, it's a bit worrying that what is essentially bling is being introduced without testing a range of backgrounds first.

If there's a fairly easy-to-set-up way of testing the current implementation (e.g. live ISO snapshot) somewhere, I'm happy to do that to confirm the issue specifically with Shell's top bar.