[gnome-shell/gbsneto/folders-as-dialogs: 6/6] appDisplay: Blur overview when showing folders
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/folders-as-dialogs: 6/6] appDisplay: Blur overview when showing folders
- Date: Thu, 12 Dec 2019 21:01:09 +0000 (UTC)
commit 6b4ab74e6833c35f6b3a3051d9994c1d56bd1866
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Dec 12 17:50:20 2019 -0300
appDisplay: Blur overview when showing folders
Just to show off how amazing GNOME Shell is.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
js/ui/appDisplay.js | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 8f67fd9eae..020b92a587 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1561,6 +1561,8 @@ var AppFolderDialog = GObject.registerClass({
primary: true,
}));
+ this._blurEffect = null;
+
this._source = source;
this._view = source.view;
@@ -1594,6 +1596,19 @@ var AppFolderDialog = GObject.registerClass({
let [dialogX, dialogY] =
this.get_transformed_position();
+ this._blurEffect = new Shell.BlurEffect({
+ name: 'blur',
+ blur_radius: 0,
+ brightness: 1,
+ });
+ Main.layoutManager.overviewGroup.add_effect(this._blurEffect);
+
+ Main.layoutManager.overviewGroup.ease_property(
+ '@effects.blur.blur_radius', 19, {
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ duration: 250,
+ });
+
this.set({
translation_x: sourceX - dialogX,
translation_y: sourceY - dialogY,
@@ -1615,6 +1630,13 @@ var AppFolderDialog = GObject.registerClass({
this._needsZoomAndFade = false;
}
+ _removeBlur() {
+ if (this._blurEffect) {
+ Main.layoutManager.overviewGroup.remove_effect(this._blurEffect);
+ this._blurEffect = null;
+ }
+ }
+
_onDestroy() {
if (this._isOpen) {
this._isOpen = false;
@@ -1708,6 +1730,7 @@ var AppFolderDialog = GObject.registerClass({
return;
this._needsZoomAndFade = false;
+ this._removeBlur();
this.hide();
this._grabHelper.ungrab({ actor: this });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]