Merge lp:~gala-dev/gala/windowswitcher-fade-opacity into lp:gala

Proposed by Tom Beckmann
Status: Merged
Approved by: Rico Tzschichholz
Approved revision: 377
Merged at revision: 377
Proposed branch: lp:~gala-dev/gala/windowswitcher-fade-opacity
Merge into: lp:gala
Diff against target: 47 lines (+8/-1)
3 files modified
data/org.pantheon.desktop.gala.gschema.xml.in.in (+5/-0)
src/Settings.vala (+1/-0)
src/Widgets/WindowSwitcher.vala (+2/-1)
To merge this branch: bzr merge lp:~gala-dev/gala/windowswitcher-fade-opacity
Reviewer Review Type Date Requested Status
Rico Tzschichholz Approve
David Gomes (community) Approve
Review via email: mp+174608@code.launchpad.net

Commit message

windowswitcher: add option to configure fade opacity

Description of the change

This adds a key to configure the fade opacity of windows in the alt tab switcher as requested in bug https://bugs.launchpad.net/gala/+bug/1139953 It defaults to 0, so unless configured there will be no visible change.

To post a comment you must log in.
Revision history for this message
David Gomes (davidgomes) :
review: Approve
Revision history for this message
RabbitBot (rabbitbot-a) wrote :

Attempt to merge into lp:gala failed due to conflicts:

text conflict in src/Settings.vala

Revision history for this message
Rico Tzschichholz (ricotz) :
review: Needs Fixing
Revision history for this message
David Gomes (davidgomes) wrote :

Tested, it works.

review: Approve
377. By Tom Beckmann

add alt-tab-window-opacity key to configure opacity of faded-out windows

Revision history for this message
Rico Tzschichholz (ricotz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/org.pantheon.desktop.gala.gschema.xml.in.in'
2--- data/org.pantheon.desktop.gala.gschema.xml.in.in 2014-03-08 20:13:48 +0000
3+++ data/org.pantheon.desktop.gala.gschema.xml.in.in 2014-04-19 12:57:39 +0000
4@@ -148,6 +148,11 @@
5 <default>false</default>
6 <summary>Make parent windows that spawn a modal attached dialog being dimmed</summary>
7 </key>
8+ <key type="d" name="alt-tab-window-opacity">
9+ <range min="0.0" max="1.0"/>
10+ <default>0.0</default>
11+ <summary>The opacity of the windows located in the background in the alt-tab-switcher.</summary>
12+ </key>
13 </schema>
14
15 <schema path="/org/pantheon/desktop/gala/animations/" id="org.pantheon.desktop.gala.animations" gettext-domain="gala">
16
17=== modified file 'src/Settings.vala'
18--- src/Settings.vala 2014-04-08 12:51:06 +0000
19+++ src/Settings.vala 2014-04-19 12:57:39 +0000
20@@ -73,6 +73,7 @@
21 public string button_layout { get; set; }
22 public bool attach_modal_dialogs { get; set; }
23 public bool dim_parents { get; set; }
24+ public double alt_tab_window_opacity { get; set; }
25
26 static AppearanceSettings? instance = null;
27
28
29=== modified file 'src/Widgets/WindowSwitcher.vala'
30--- src/Widgets/WindowSwitcher.vala 2014-04-08 12:51:06 +0000
31+++ src/Widgets/WindowSwitcher.vala 2014-04-19 12:57:39 +0000
32@@ -272,6 +272,7 @@
33 void dim_windows ()
34 {
35 var current_actor = current_window.get_compositor_private () as Actor;
36+ var window_opacity = (int)Math.floor (AppearanceSettings.get_default ().alt_tab_window_opacity * 255);
37 var i = 0;
38 foreach (var clone in window_clones) {
39 if (current_actor == clone.source) {
40@@ -280,7 +281,7 @@
41
42 dock.get_child_at_index (i).animate (AnimationMode.LINEAR, 100, opacity : 255);
43 } else {
44- clone.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 250, depth : -200.0f, opacity : 0);
45+ clone.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 250, depth : -200.0f, opacity : window_opacity);
46 dock.get_child_at_index (i).animate (AnimationMode.LINEAR, 100, opacity : 100);
47 }
48

Subscribers

People subscribed via source and target branches