diff options
| author | Nippy <nippy@rp1.hu> | 2026-06-01 18:57:29 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-06-01 18:57:29 +0200 |
| commit | 2e5a7d93476c0819b5a23f5740e4c843eaedc73a (patch) | |
| tree | 84279c63b84126eb8f6d9d94a42c44aabbe22336 /raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js | |
| parent | e1f0fac166056bb106284be4a3fec0c558525927 (diff) | |
| download | RaveOS-PKGBUILD-2e5a7d93476c0819b5a23f5740e4c843eaedc73a.tar.gz RaveOS-PKGBUILD-2e5a7d93476c0819b5a23f5740e4c843eaedc73a.zip | |
Raveos gnome update
Diffstat (limited to 'raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js')
| -rw-r--r-- | raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js index 556ffa4..3df621b 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js @@ -2,10 +2,17 @@ import GObject from 'gi://GObject'; import * as utils from '../conveniences/utils.js'; const St = await utils.import_in_shell_only('gi://St'); -const Shell = await utils.import_in_shell_only('gi://Shell'); + +let BlurOrShell = await utils.import_in_shell_only('gi://Blur'); +let IS_BLUR_MODULE = true; +if (BlurOrShell === null) { + BlurOrShell = await utils.import_in_shell_only('gi://Shell'); + IS_BLUR_MODULE = false; +} + const DEFAULT_PARAMS = { - unscaled_radius: 30, brightness: 0.6 + unscaled_radius: 30, brightness: 0.6, corner_radius: 14 }; @@ -13,15 +20,21 @@ export const NativeDynamicBlurEffect = utils.IS_IN_PREFERENCES ? { default_params: DEFAULT_PARAMS } : new GObject.registerClass({ GTypeName: "NativeDynamicBlurEffect" - }, class NativeDynamicBlurEffect extends Shell.BlurEffect { + }, class NativeDynamicBlurEffect extends BlurOrShell.BlurEffect { constructor(params) { - const { unscaled_radius, brightness, ...parent_params } = params; - super({ ...parent_params, mode: Shell.BlurMode.BACKGROUND }); + const { unscaled_radius, brightness, corner_radius, ...parent_params } = params; + if (IS_BLUR_MODULE) + super({ ...parent_params, mode: BlurOrShell.BlurMode.BACKGROUND, ...{ 'corner_radius': corner_radius } }); + else + super({ ...parent_params, mode: BlurOrShell.BlurMode.BACKGROUND }); this._theme_context = St.ThemeContext.get_for_stage(global.stage); this._theme_context.connectObject( 'notify::scale-factor', - _ => this.radius = this.unscaled_radius * this._theme_context.scale_factor, + _ => { + this.radius = this.unscaled_radius * this._theme_context.scale_factor; + this.corner_radius = this.unscaled_corner_radius * this._theme_context.scale_factor; + }, this ); @@ -40,4 +53,13 @@ export const NativeDynamicBlurEffect = utils.IS_IN_PREFERENCES ? this._unscaled_radius = value; this.radius = value * this._theme_context.scale_factor; } - });
\ No newline at end of file + + get unscaled_corner_radius() { + return this._unscaled_corner_radius; + } + + set unscaled_corner_radius(value) { + this._unscaled_corner_radius = value; + this.corner_radius = value * this._theme_context.scale_factor; + } + }); |