enable setting blur overlay window

This commit is contained in:
Dany LE 2021-10-24 18:34:08 +02:00
parent 52709d5da4
commit 99e0d02581
3 changed files with 31 additions and 1 deletions

12
d.ts/antos.d.ts vendored
View File

@ -8237,6 +8237,18 @@ declare namespace OS {
* @memberof WindowTag * @memberof WindowTag
*/ */
constructor(); constructor();
/**
* blur overlay: If active the window overlay will be shown
* on inactive (blur event)
*
* Setter: Enable the switch
*
* Getter: Check whether the switch is enabled
*
* @memberof WindowTag
*/
set blur_overlay(v: boolean);
get blur_overlay(): boolean;
/** /**
* Init window tag * Init window tag
* - `shown`: false * - `shown`: false

Binary file not shown.

View File

@ -80,6 +80,23 @@ namespace OS {
super(); super();
} }
/**
* blur overlay: If active the window overlay will be shown
* on inactive (blur event)
*
* Setter: Enable the switch
*
* Getter: Check whether the switch is enabled
*
* @memberof WindowTag
*/
set blur_overlay(v: boolean) {
this.attsw(v, "blur-overlay");
}
get blur_overlay(): boolean {
return this.hasattr("blur-overlay");
}
/** /**
* Init window tag * Init window tag
* - `shown`: false * - `shown`: false
@ -296,6 +313,7 @@ namespace OS {
this.observable.on("blur", () => { this.observable.on("blur", () => {
this._shown = false; this._shown = false;
$(this).addClass("unactive"); $(this).addClass("unactive");
if(this.blur_overlay)
$(this.refs.win_overlay).show(); $(this.refs.win_overlay).show();
}); });
this.observable.on("hide", () => { this.observable.on("hide", () => {