Skip to content

Commit a23ca82

Browse files
authored
[BlurCinnamon@klangman] V1.4.1 minor fixes and improvements (#864)
* Fix for the main menu's favourite box fading from a solid color into it's blurred state on open (Mint-Y theme) * Take into account the popup-menu box margins when applying blurring so that blurring can be properly sized for the popup-menu (Orchis-Dark theme) * Fix a typo in the setting window * Properly free popup-menu blur elements * Improve the transition of panels when disabling/enabling (i.e entering/exiting Overview) so that the panel does change in brightness suddenly * Prevent errors under wayland (but the blur effects are still not working under wayland) * Closes #856
1 parent 66cc795 commit a23ca82

File tree

11 files changed

+140
-121
lines changed

11 files changed

+140
-121
lines changed

BlurCinnamon@klangman/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 1.4.1
4+
5+
* Fix for the main menu's favourite box fading from a solid color into it's blurred state on open (Mint-Y theme)
6+
* Take into account the popup-menu box margins when applying blurring so that blurring can be properly sized for the popup-menu (Orchis-Dark theme)
7+
* Fix a typo in the setting window
8+
* Properly free popup-menu blur elements
9+
* Improve the transition of panels when disabling/enabling (i.e entering/exiting Overview) so that the panel does change in brightness suddenly
10+
* Prevent errors under wayland (but the blur effects are still not working under wayland)
11+
312
## 1.4.0
413

514
* Added the ability to apply effects to the Desktop background image (you can Dim, Blur and Desaturate, but currently you can't colorize the background image)

BlurCinnamon@klangman/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Using any of the above with Blur Cinnamon may have some odd side effects that wo
3535

3636
## Limitations
3737

38-
1. The Applet popup menu effects are intended to be used with the Cinnamon (6.4) theme or the Mint-Y dark desktop themes. The effects might work will with some other themes but I have not tested them so the effects might not work out just right. You can try the Mint-Y light themes but it might be hard to read the menu items without some playing around with the settings and the background image. To make sure that the blurred background does not spill over any rounded corners, the Main Menu rounded corners will be disabled when Main Menu effects are enabled. Menu Menu effects are disabled by default.
39-
2. The Applet popup menu effects works for all the applets that I have tested except "Cinnamenu", which uses a bit of an odd way to activate the popup menu, making it more difficult to intercept the menu open process so that I can change the menu's transparency setting.
38+
1. The Applet popup menu effects are intended to be used with the Cinnamon (6.4) theme or the Mint-Y dark desktop themes. The effects might work will with some other themes but I have not tested them so the effects might not work out just right. You can try the Mint-Y light themes but it might be hard to read the menu items without some playing around with the settings and the background image. To make sure that the blurred background does not spill over any rounded corners, the popup-menu rounded corners will be disabled when popup-menu effects are enabled. Popup-menu effects are disabled by default in this extension.
39+
2. The Applet popup-menu effects works for all the applets that I have tested except "Cinnamenu", which uses a bit of an odd way to activate the popup menu, making it more difficult to intercept the menu open process so that I can change the menu's transparency setting.
4040
3. Currently, any windows that are moved such that they overlap with a panel or the Applet popup menus will not be visible beneath the panel/menus as you might expect with a transparent panel/menu. This is because the blur effect is applied to a user interface element that floats above all windows just like the panel floats above the windows. At some point I hope to look into allowing the blur element to appear below all windows rather than above and make the a optional behavior setting.
4141
4. If you disable effects for any Cinnamon component under the General tab of the setting dialog while any "Use unique effect settings" options are enabled under the other tabs, the components "effect setting" options under the other tabs will still be visible, but changing those setting will have no effect until you re-enable the component under the General tab. Ideally those effect setting would only be visible when the component is enabled under the general tab but Cinnamon setting support is a bit limited in this way.
4242

BlurCinnamon@klangman/files/BlurCinnamon@klangman/6.0/extension.js

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,12 @@ class BlurPanels {
306306
// windows beneath the panels from being visible.
307307
//if (blurType > BlurType.None || saturation<100) {
308308
let fx;
309-
let background = Meta.X11BackgroundActor.new_for_display(global.display);
309+
let background;
310+
if (!Meta.is_wayland_compositor()) {
311+
background = Meta.X11BackgroundActor.new_for_display(global.display);
312+
} else {
313+
background = new Clutter.Actor();
314+
}
310315
global.overlay_group.add_actor(background);
311316
blurredPanel.background = background;
312317
background.set_clip( panel.actor.x, panel.actor.y, panel.actor.width, panel.actor.height );
@@ -521,9 +526,8 @@ class BlurPanels {
521526
blurEnable(...params) {
522527
try {
523528
if (this.__blurredPanel && this.__blurredPanel.background && !global.display.get_monitor_in_fullscreen(this.monitorIndex) && !this._hidden) {
524-
this.__blurredPanel.background.show();
525-
this.__blurredPanel.background.ease(
526-
{opacity: 255, duration: AUTOHIDE_ANIMATION_TIME * 1000, mode: Clutter.AnimationMode.EASE_OUT_QUAD } );
529+
// Only show the blurred background after the panel animation is almost done
530+
Mainloop.timeout_add((AUTOHIDE_ANIMATION_TIME * 1000)*.9, () => this.__blurredPanel.background.show() );
527531
}
528532
} catch (e) {}
529533
blurPanelsThis._originalPanelEnable.apply(this, params);
@@ -532,9 +536,8 @@ class BlurPanels {
532536
blurDisable(...params) {
533537
try {
534538
if (this.__blurredPanel && this. __blurredPanel.background && !this._hidden) {
535-
this.__blurredPanel.background.ease(
536-
{opacity: 0, duration: AUTOHIDE_ANIMATION_TIME * 1000, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
537-
onComplete: () => { this.__blurredPanel.background.hide(); } });
539+
// Delay 50ms before hiding the blurred background to avoid a sudden unblurring of the panel before other animations even get started
540+
Mainloop.timeout_add(50, () => this.__blurredPanel.background.hide() );
538541
}
539542
} catch (e) {}
540543
blurPanelsThis._originalPanelDisable.apply(this, params);
@@ -551,7 +554,11 @@ class BlurPopupMenus {
551554

552555
this._blurEffect = new GaussianBlur.GaussianBlurEffect( {radius: 0, brightness: 1 , width: 0, height: 0} );
553556
this._desatEffect = new Clutter.DesaturateEffect({factor: 1});
554-
this._background = Meta.X11BackgroundActor.new_for_display(global.display);
557+
if (!Meta.is_wayland_compositor()) {
558+
this._background = Meta.X11BackgroundActor.new_for_display(global.display);
559+
} else {
560+
this._background = new Clutter.Actor();
561+
}
555562
this._background.add_effect_with_name( BLUR_EFFECT_NAME, this._blurEffect );
556563
this._background.add_effect_with_name( DESAT_EFFECT_NAME, this._desatEffect );
557564
global.overlay_group.add_actor(this._background);
@@ -576,7 +583,8 @@ class BlurPopupMenus {
576583
if (menu && this._currentMenu && menu === this._currentMenu) {
577584
let actor = menu.actor;
578585
if (actor.visible) {
579-
this._background.set_clip( actor.x, actor.y, actor.width, actor.height );
586+
let bm = menu.box.get_margin();
587+
this._background.set_clip( actor.x+bm.left, actor.y+bm.top, actor.width-(bm.left+bm.right), actor.height-(bm.top+bm.bottom) );
580588
} else {
581589
this._background.set_clip( 0, 0, 0, 0 );
582590
}
@@ -650,7 +658,10 @@ class BlurPopupMenus {
650658
} else {
651659
let actor = menu.actor;
652660
let margin = actor.get_margin();
653-
this._background.set_clip( actor.x+margin.left, actor.y+margin.top, actor.width-(margin.left+margin.right), actor.height-(margin.top+margin.bottom) );
661+
let bm = menu.box.get_margin();
662+
this._background.set_clip( actor.x+margin.left+bm.left, actor.y+margin.top+bm.top,
663+
actor.width-(margin.left+margin.right)-(bm.left+bm.right),
664+
actor.height-(margin.top+margin.bottom)-(bm.top+bm.bottom) );
654665
}
655666
this._background.show();
656667
// Now that the menu is open we need to know if new actors are added so we can check for accent elements
@@ -685,7 +696,7 @@ class BlurPopupMenus {
685696
menu.blurCinnamonData.push( {entry: child, original_entry_color: child.get_background_color(), original_entry_style: child.get_style(),
686697
original_entry_class: child.get_style_class_name(), original_entry_pseudo_class: child.get_style_pseudo_class()} );
687698
}
688-
child.set_style( "border-radius: 0px; " + //"border-image: none; border-color: transparent; box-shadow: 0 0 transparent; " +
699+
child.set_style( "border-radius: 0px; transition-duration: 0;" + //"border-image: none; border-color: transparent; box-shadow: 0 0 transparent; " +
689700
"background-gradient-direction: vertical; background-gradient-start: transparent; " +
690701
"background-gradient-end: transparent; background: transparent;" );
691702
child.set_background_color(this._accentColor);
@@ -750,6 +761,8 @@ class BlurPopupMenus {
750761
destroy() {
751762
// Restore monkey patched PopupMenu open & close functions
752763
PopupMenu.PopupMenu.prototype.open = this.original_popupmenu_open;
764+
global.overlay_group.remove_actor(this._background);
765+
this._background.destroy();
753766
//PopupMenu.PopupMenu.prototype.close = this.original_popupmenu_close;
754767
}
755768
}

BlurCinnamon@klangman/files/BlurCinnamon@klangman/6.0/settings-schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@
394394

395395
"panels-blendColor": {
396396
"type": "colorchooser",
397-
"description" : "Dimming ovrerlay color",
397+
"description" : "Dimming overlay color",
398398
"default": "rgb(0,0,0)",
399399
"dependency" : "!enable-panel-unique-settings",
400400
"tooltip": "Defines the color that is blended into the background based on the dimming control above. Use black for a normal dimming effect or some other color for a color blend effect"
@@ -459,7 +459,7 @@
459459

460460
"popup-blendColor": {
461461
"type": "colorchooser",
462-
"description" : "Dimming ovrerlay color",
462+
"description" : "Dimming overlay color",
463463
"default": "rgb(0,0,0)",
464464
"dependency" : "enable-popup-override=1",
465465
"tooltip": "Defines the color that is blended into the background based on the dimming control above. Use black for a normal dimming effect or some other color for a color blend effect"
@@ -527,7 +527,7 @@
527527

528528
"desktop-blendColor": {
529529
"type": "colorchooser",
530-
"description" : "Dimming ovrerlay color",
530+
"description" : "Dimming overlay color",
531531
"default": "rgb(0,0,0)",
532532
"dependency" : "enable-desktop-override=1",
533533
"tooltip": "Defines the color that is blended into the background based on the dimming control above. Use black for a normal dimming effect or some other color for a color blend effect"

BlurCinnamon@klangman/files/BlurCinnamon@klangman/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"uuid": "BlurCinnamon@klangman",
33
"name": "Blur Cinnamon",
4-
"version": "1.4.0",
5-
"description": "Allows you to blur, colorize, desaturate and adjust the dimming of some Cinnamon Desktop components (i.e. Panels, Applet popup menus, Overview, Expo)",
4+
"version": "1.4.1",
5+
"description": "Allows you to blur, colorize, desaturate and adjust the dimming of some Cinnamon Desktop components (i.e. Panels, Applet popup menus, Overview, Expo, Desktop image)",
66
"url": "https://github.com/klangman/BlurCinnamon",
77
"cinnamon-version": [
88
"6.0"

BlurCinnamon@klangman/files/BlurCinnamon@klangman/po/BlurCinnamon@klangman.pot

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#, fuzzy
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: BlurCinnamon@klangman 1.4.0\n"
8+
"Project-Id-Version: BlurCinnamon@klangman 1.4.1\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
1010
"extensions/issues\n"
11-
"POT-Creation-Date: 2025-03-02 19:42-0500\n"
11+
"POT-Creation-Date: 2025-04-11 23:57-0400\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: \n"
1414
"Language-Team: \n"
@@ -24,7 +24,8 @@ msgstr ""
2424
#. metadata.json->description
2525
msgid ""
2626
"Allows you to blur, colorize, desaturate and adjust the dimming of some "
27-
"Cinnamon Desktop components (i.e. Panels, Applet popup menus, Overview, Expo)"
27+
"Cinnamon Desktop components (i.e. Panels, Applet popup menus, Overview, "
28+
"Expo, Desktop image)"
2829
msgstr ""
2930

3031
#. 6.0->settings-schema.json->general-page->title
@@ -278,6 +279,9 @@ msgstr ""
278279
#. 6.0->settings-schema.json->blendColor->description
279280
#. 6.0->settings-schema.json->overview-blendColor->description
280281
#. 6.0->settings-schema.json->expo-blendColor->description
282+
#. 6.0->settings-schema.json->panels-blendColor->description
283+
#. 6.0->settings-schema.json->popup-blendColor->description
284+
#. 6.0->settings-schema.json->desktop-blendColor->description
281285
msgid "Dimming overlay color"
282286
msgstr ""
283287

@@ -369,12 +373,6 @@ msgstr ""
369373
msgid "Adjusts the color saturation of the background image."
370374
msgstr ""
371375

372-
#. 6.0->settings-schema.json->panels-blendColor->description
373-
#. 6.0->settings-schema.json->popup-blendColor->description
374-
#. 6.0->settings-schema.json->desktop-blendColor->description
375-
msgid "Dimming ovrerlay color"
376-
msgstr ""
377-
378376
#. 6.0->settings-schema.json->panels-radius->description
379377
#. 6.0->settings-schema.json->popup-radius->description
380378
#. 6.0->settings-schema.json->desktop-radius->description

BlurCinnamon@klangman/files/BlurCinnamon@klangman/po/ca.po

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: BlurCinnamon@klangman 1.2.0\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
1010
"extensions/issues\n"
11-
"POT-Creation-Date: 2025-03-02 19:42-0500\n"
11+
"POT-Creation-Date: 2025-04-11 23:57-0400\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: Odyssey <odysseyhyd@gmail.com>\n"
1414
"Language-Team: \n"
@@ -23,9 +23,11 @@ msgid "Blur Cinnamon"
2323
msgstr "Difumina Cinnamon"
2424

2525
#. metadata.json->description
26+
#, fuzzy
2627
msgid ""
2728
"Allows you to blur, colorize, desaturate and adjust the dimming of some "
28-
"Cinnamon Desktop components (i.e. Panels, Applet popup menus, Overview, Expo)"
29+
"Cinnamon Desktop components (i.e. Panels, Applet popup menus, Overview, "
30+
"Expo, Desktop image)"
2931
msgstr ""
3032
"Us permet difuminar, tintar i ajustar l'atenuació d'alguns dels components "
3133
"de l'escriptori Cinnamon (com ara Taulers, Menús emergents de "
@@ -325,6 +327,9 @@ msgstr "Atenuació/Tint del fons (percentatge)"
325327
#. 6.0->settings-schema.json->blendColor->description
326328
#. 6.0->settings-schema.json->overview-blendColor->description
327329
#. 6.0->settings-schema.json->expo-blendColor->description
330+
#. 6.0->settings-schema.json->panels-blendColor->description
331+
#. 6.0->settings-schema.json->popup-blendColor->description
332+
#. 6.0->settings-schema.json->desktop-blendColor->description
328333
msgid "Dimming overlay color"
329334
msgstr "Color de l'atenuació superposada"
330335

@@ -421,12 +426,6 @@ msgstr "Saturació del color de fons"
421426
msgid "Adjusts the color saturation of the background image."
422427
msgstr "Ajusta la saturació de color de la imatge de fons."
423428

424-
#. 6.0->settings-schema.json->panels-blendColor->description
425-
#. 6.0->settings-schema.json->popup-blendColor->description
426-
#. 6.0->settings-schema.json->desktop-blendColor->description
427-
msgid "Dimming ovrerlay color"
428-
msgstr "Color de l'atenuació superposada"
429-
430429
#. 6.0->settings-schema.json->panels-radius->description
431430
#. 6.0->settings-schema.json->popup-radius->description
432431
#. 6.0->settings-schema.json->desktop-radius->description

BlurCinnamon@klangman/files/BlurCinnamon@klangman/po/es.po

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgstr ""
77
"Project-Id-Version: BlurCinnamon@klangman 1.0.0\n"
88
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
99
"extensions/issues\n"
10-
"POT-Creation-Date: 2025-03-02 19:42-0500\n"
10+
"POT-Creation-Date: 2025-04-11 23:57-0400\n"
1111
"PO-Revision-Date: \n"
1212
"Last-Translator: \n"
1313
"Language-Team: \n"
@@ -22,9 +22,11 @@ msgid "Blur Cinnamon"
2222
msgstr "Desenfoque de Cinnamon"
2323

2424
#. metadata.json->description
25+
#, fuzzy
2526
msgid ""
2627
"Allows you to blur, colorize, desaturate and adjust the dimming of some "
27-
"Cinnamon Desktop components (i.e. Panels, Applet popup menus, Overview, Expo)"
28+
"Cinnamon Desktop components (i.e. Panels, Applet popup menus, Overview, "
29+
"Expo, Desktop image)"
2830
msgstr ""
2931
"Permite desenfocar, colorear, desaturar y ajustar la atenuación de algunos "
3032
"componentes del escritorio Cinnamon (por ejemplo, paneles, menús emergentes "
@@ -331,6 +333,9 @@ msgstr "Atenuar/colorear fondo (porcentaje)"
331333
#. 6.0->settings-schema.json->blendColor->description
332334
#. 6.0->settings-schema.json->overview-blendColor->description
333335
#. 6.0->settings-schema.json->expo-blendColor->description
336+
#. 6.0->settings-schema.json->panels-blendColor->description
337+
#. 6.0->settings-schema.json->popup-blendColor->description
338+
#. 6.0->settings-schema.json->desktop-blendColor->description
334339
msgid "Dimming overlay color"
335340
msgstr "Atenuación del color de superposición"
336341

@@ -428,12 +433,6 @@ msgstr "Saturación del color de fondo"
428433
msgid "Adjusts the color saturation of the background image."
429434
msgstr "Ajusta la saturación de color de la imagen de fondo."
430435

431-
#. 6.0->settings-schema.json->panels-blendColor->description
432-
#. 6.0->settings-schema.json->popup-blendColor->description
433-
#. 6.0->settings-schema.json->desktop-blendColor->description
434-
msgid "Dimming ovrerlay color"
435-
msgstr "Atenuación del color de superposición"
436-
437436
#. 6.0->settings-schema.json->panels-radius->description
438437
#. 6.0->settings-schema.json->popup-radius->description
439438
#. 6.0->settings-schema.json->desktop-radius->description

0 commit comments

Comments
 (0)