From 4ebb8aea3aad7c0e5bc0b70ec96e547b3c7c7bc9 Mon Sep 17 00:00:00 2001 From: Tom Beckmann Date: Sun, 14 Jul 2013 14:13:31 +0200 Subject: [PATCH 1/2] windowswitcher: add option to configure fade opacity --- data/org.pantheon.desktop.gala.gschema.xml | 4 ++++ src/Settings.vala | 1 + src/Widgets/WindowSwitcher.vala | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/data/org.pantheon.desktop.gala.gschema.xml b/data/org.pantheon.desktop.gala.gschema.xml index 6b3f9901..d3572276 100644 --- a/data/org.pantheon.desktop.gala.gschema.xml +++ b/data/org.pantheon.desktop.gala.gschema.xml @@ -143,6 +143,10 @@ false Make parent windows that spawn a modal attached dialog being dimmed + + 0.0 + The opacity of the windows located in the background in the alt-tab-switcher. + diff --git a/src/Settings.vala b/src/Settings.vala index 44a17711..62888e86 100644 --- a/src/Settings.vala +++ b/src/Settings.vala @@ -73,6 +73,7 @@ namespace Gala public string button_layout { get; set; } public bool attach_modal_dialogs { get; set; } public bool dim_parents { get; set; } + public double alt_tab_window_opacity { get; set; } static AppearanceSettings? instance = null; diff --git a/src/Widgets/WindowSwitcher.vala b/src/Widgets/WindowSwitcher.vala index fdf6f3fd..d06824bc 100644 --- a/src/Widgets/WindowSwitcher.vala +++ b/src/Widgets/WindowSwitcher.vala @@ -269,6 +269,7 @@ namespace Gala { var current_actor = current_window.get_compositor_private () as Actor; var i = 0; + var window_opacity = (int)Math.floor (AppearanceSettings.get_default ().alt_tab_window_opacity * 255); foreach (var clone in window_clones) { if (current_actor == clone.source) { set_child_below_sibling (clone, dock_background); @@ -276,7 +277,7 @@ namespace Gala dock.get_child_at_index (i).animate (AnimationMode.LINEAR, 100, opacity : 255); } else { - clone.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 250, depth : -200.0f, opacity : 0); + clone.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 250, depth : -200.0f, opacity : window_opacity); dock.get_child_at_index (i).animate (AnimationMode.LINEAR, 100, opacity : 100); } From 2bce60c74cfc797080868aa66bbe50bc81a0b462 Mon Sep 17 00:00:00 2001 From: Tom Beckmann Date: Sun, 14 Jul 2013 14:19:20 +0200 Subject: [PATCH 2/2] limit range of opacity --- data/org.pantheon.desktop.gala.gschema.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/org.pantheon.desktop.gala.gschema.xml b/data/org.pantheon.desktop.gala.gschema.xml index d3572276..e5859e26 100644 --- a/data/org.pantheon.desktop.gala.gschema.xml +++ b/data/org.pantheon.desktop.gala.gschema.xml @@ -143,7 +143,8 @@ false Make parent windows that spawn a modal attached dialog being dimmed - + + 0.0 The opacity of the windows located in the background in the alt-tab-switcher.