Comparing version 0.0.6 to 0.0.7
{ | ||
"name": "glasstron", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "The go-to solution to Electron composition effects", | ||
@@ -5,0 +5,0 @@ "funding": { |
@@ -13,8 +13,2 @@ # Glasstron | ||
## Note for macOS users | ||
Recent changes in Glasstron's core seemingly broke macOS vibrancy. | ||
I still don't own a macOS system to test this out for myself, so contributions are always welcone. | ||
## Quickstart | ||
@@ -21,0 +15,0 @@ ```bash |
@@ -43,4 +43,4 @@ /* | ||
// Wrap the original setVibrancy | ||
const originalFunction = win.setVibrancy; | ||
const originalFunction = win.setVibrancy.bind(win); | ||
// Set an array of two values | ||
@@ -84,7 +84,4 @@ // [ | ||
// Bind the new wrapped setVibrancy function and apply it | ||
const boundFunction = ((vibrancy) => {this.vibrancy = vibrancy;}).bind(win); | ||
Object.defineProperty(win, "setVibrancy", { | ||
get: () => boundFunction | ||
}); | ||
win.setVibrancy = vibrancy => { win.vibrancy = vibrancy; }; | ||
// Now we need an exposed method to get the correct blur status | ||
@@ -98,5 +95,4 @@ Object.defineProperty(win, "getBlur", { | ||
get: () => (bool) => { | ||
if(bool) | ||
_vibrancy[1] = _vibrancy[0]; // maybe there's a better way to do this | ||
win.setVibrancy(bool ? win.vibrancy : null); | ||
_vibrancy[1] = bool ? _vibrancy[0] : null; | ||
originalFunction(_vibrancy[1]); | ||
} | ||
@@ -103,0 +99,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2320018
1245
107