Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Fixed issue #45 . Code refactoring and version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
yozoon committed Jun 2, 2020
1 parent d958f95 commit eae09f9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions blyr@yozoon.dev.gmail.com/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class Blyr {

// listens to changed signal on bg manager (useful if the url of a
// wallpaper doesn't change, but the wallpaper itself changed)
Connections.connectSmart(Main.layoutManager._bgManagers[Main.layoutManager.primaryIndex],
'changed', this, '_regenerateBlurredActors');
Connections.connectSmart(Main.layoutManager._bgManagers[Main.layoutManager.primaryIndex],
'changed', this, '_regenerateBlurredActors');

// session mode listener
//Connections.connectSmart(Main.sessionMode, 'updated', this, '_onSessionModeChange');
Expand Down Expand Up @@ -190,8 +190,8 @@ class Blyr {
/***************************************************************
* Blur Effect and Animation Utilities *
***************************************************************/
_applyTwoPassBlur(actor, intensity, brightness=1.0) {
if(supportsNativeBlur) {
_applyTwoPassBlur(actor, intensity, brightness = 1.0) {
if (supportsNativeBlur) {
if (!actor.get_effect('blur')) {
actor.add_effect_with_name('blur', new Shell.BlurEffect({
mode: SHELL_BLUR_MODE_ACTOR,
Expand Down Expand Up @@ -359,7 +359,7 @@ class Blyr {

// Apply blur effect
this._applyTwoPassBlur(blurred_bg, intensity, activities_brightness);

// Add child to our modified BG actor
Main.overview._backgroundGroup.add_child(blurred_bg);
Main.overview._backgroundGroup.set_child_below_sibling(blurred_bg, bg);
Expand All @@ -374,12 +374,12 @@ class Blyr {
let intensity = Settings.get_double('intensity');
// Remove and reapply blur effect for each actor
Main.overview._backgroundGroup.get_children().forEach(
(bg) => {
if (bg['name'] == OVERVIEW_BACKGROUND_NAME) {
bg.clear_effects();
this._applyTwoPassBlur(bg, intensity, activities_brightness);
}
(bg) => {
if (bg['name'] == OVERVIEW_BACKGROUND_NAME) {
bg.clear_effects();
this._applyTwoPassBlur(bg, intensity, activities_brightness);
}
}
);
}

Expand Down Expand Up @@ -417,7 +417,7 @@ class Blyr {
// Clutter Actor with height 0 which will contain the actual blurred background
this.panelContainer = new Clutter.Actor({
name: PANEL_CONTAINER_NAME,
width: this.primaryBackground.width,
width: 0,
height: 0
});

Expand Down Expand Up @@ -472,7 +472,7 @@ class Blyr {
log('removing blurred actors with the name: ' + name);
parent.get_children().forEach(
(child) => {
if(child.name == name) {
if (child.name == name) {
parent.remove_child(child);
child.destroy();
}
Expand Down
2 changes: 1 addition & 1 deletion blyr@yozoon.dev.gmail.com/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"3.36"
],
"url": "https://github.com/yozoon/gnome-shell-extension-blyr",
"version": 7
"version": 8
}

0 comments on commit eae09f9

Please sign in to comment.