All Projects → Seo-Rii → electron-acrylic-window

Seo-Rii / electron-acrylic-window

Licence: MIT license
Add acrylic effect to your electron application

Programming Languages

typescript
32286 projects
C++
36643 projects - #6 most used programming language
javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to electron-acrylic-window

Translucenttb
A lightweight utility that makes the Windows taskbar translucent/transparent.
Stars: ✭ 8,816 (+4467.88%)
Mutual labels:  fluent-design
BilibiliLiveRecordDownLoader
Bilibili 直播录制与回放下载
Stars: ✭ 422 (+118.65%)
Mutual labels:  fluent-design
Rise-Media-Player
One media player for everything you own or stream; whether it's music or videos, online or offline Rise Media Player does it all. And it's beautiful and native with the latest version of WinUI.
Stars: ✭ 600 (+210.88%)
Mutual labels:  fluent-design
Modernwpf
Modern styles and controls for your WPF applications
Stars: ✭ 2,610 (+1252.33%)
Mutual labels:  fluent-design
mongood
A MongoDB GUI with Fluent Design
Stars: ✭ 674 (+249.22%)
Mutual labels:  fluent-design
IKFB
Involution King Fun Book (IKFB, Chinese: 快卷, 卷王快乐本) is an integrated management system for papers and literature. Powered by Electron.
Stars: ✭ 29 (-84.97%)
Mutual labels:  fluent-design
DevToys
A Swiss Army knife for developers.
Stars: ✭ 4,986 (+2483.42%)
Mutual labels:  fluent-design
react-windows-ui
Build Windows fluent UI apps using ReactJS. Provides a set of accessible, reusable, and composable React components that make it super easy to create websites and apps.
Stars: ✭ 383 (+98.45%)
Mutual labels:  fluent-design
website
Fully responsive website built with NextJS, React and Fluent UI, with the aim of providing services and access to all groups of didactic courses and general purposes to students of the University of Milan.
Stars: ✭ 29 (-84.97%)
Mutual labels:  fluent-design
fluent-windows
🌈 React components that inspired by Microsoft's Fluent Design System.
Stars: ✭ 122 (-36.79%)
Mutual labels:  fluent-design
Glasstron
The go-to solution to Electron composition effects, such as blurry windows.
Stars: ✭ 243 (+25.91%)
Mutual labels:  vibrancy
ClearWriter
A silent notepad.
Stars: ✭ 25 (-87.05%)
Mutual labels:  fluent-design
htwoo
hTWOo - a better Fluent UI framework.
Stars: ✭ 67 (-65.28%)
Mutual labels:  fluent-design
Files
A modern file manager that pushes the boundaries of the platform.
Stars: ✭ 15,198 (+7774.61%)
Mutual labels:  fluent-design
Win32-Acrylic-Effect
Demonstrates implementation of the Windows 10 Acrylic Effect on C++ Win32 Apps using DWM Private APIs and Direct Composition
Stars: ✭ 104 (-46.11%)
Mutual labels:  fluent-design
Microsoft Ui Xaml
Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
Stars: ✭ 4,428 (+2194.3%)
Mutual labels:  fluent-design
VFluent
Vue Components inspired by Microsoft's Fluent Design System
Stars: ✭ 75 (-61.14%)
Mutual labels:  fluent-design
fullcontrols
Reworked version of the wpf controls, plus new controls and features.
Stars: ✭ 28 (-85.49%)
Mutual labels:  fluent-design
hyper-sierra-vibrancy
Theme for Hyper with vibrancy 🌄
Stars: ✭ 30 (-84.46%)
Mutual labels:  vibrancy
zestyWin
📂 MacForge plugin to add Vibrancy to application windows on macOS
Stars: ✭ 19 (-90.16%)
Mutual labels:  vibrancy

logo

electron-acrylic-window

Build Status Libraries.io dependency status for latest release npm version

Makes it simple to add the Windows 10 Acrylic effect to Electron applications, by acting as a wrapper for the standard Electron vibrancy feature.

Only affects Windows 10. If the OS is not Windows 10, it will fall back on the original vibrancy function.

Inspired by electron-vibrancy.

screenshotscreenshot

Contributors

Huge thanks to all contributors!

Installation

You will need Visual Studio or Visual C++ build tools to install this. An easy way to install them can be found here.

yarn add electron-acrylic-window

Usage

BrowserWindow - Wrapper class for electron.BrowserWindow

Enables Vibrancy on the Electron window.

const {BrowserWindow} = require("electron-acrylic-window");

win = new BrowserWindow({
    ...,
    frame: false,
    vibrancy: [options] // See below
});

If OS is Windows 10, it overrides the constructor option and BrowserWindow.setVibrancy method to work properly on Windows 10. If OS is not Windows 10, it will work normally.

setVibrancy - Wrapper function for electron.BrowserWindow.setVibrancy

Enables Vibrancy on the Electron window.

const { setVibrancy } = require('electron-acrylic-window')

setVibrancy(win, [options])

// OR

win.setVibrancy([options])

win should be frameless.

Will call original win.setVibrancy(op) Electron function if OS is not Windows 10.

There is no return value. If it fails to set vibrancy, it throws an error.

Errors

  • WINDOW_NOT_GIVEN - Error that occurs when win parameter is not passed.
  • NOT_VALID_WINDOW - Error that occurs when win parameter is not valid Electron window.
  • FAIL_LOAD_DLL - Error that occurs when fails to load SetWindowCompositionAttribute from user32.dll
  • UNKNOWN - Other error.

Options

If OS is not Windows 10, [options] will be passed on to the original vibrancy function/option, so keep that in mind.

On Windows 10, [options] should be a String or an Object.

  • String

    Should be 'light', 'dark', 'appearance-based' or a hex color code with alpha ('#222222aa'). Default is 'appearance-based'.

  • Object

    op = {
       theme: String ( = 'appearance-based'),
       effect: String ( = 'acrylic'),
       useCustomWindowRefreshMethod: Boolean ( = true),
       maximumRefreshRate: Number ( = 60),
       disableOnBlur: Boolean ( = true)
    }
    • theme - String (optional)

      Sets color of acrylic effect. Can be 'light', 'dark', 'appearance-based' or a hex color code with alpha ('#222222aa'). Default is 'appearance-based'

    • effect - String (optional)

      Sets the type of Windows transparency effect, either 'acrylic' or 'blur'. Default is 'acrylic'.

      Setting this option to acrylic may cause performance degradation. Acrylic only works on Windows 10 RS3 or above, otherwise 'blur' is forced.

    • useCustomWindowRefreshMethod - Boolean (optional)

      Use custom window resize/move handler for performance. Default is true.

      Special thanks to @djsweet and @xanderfrangos.

      This is an experimental feature. May cause errors.

    • maximumRefreshRate - Number (optional)

      Maximum refresh rate of the application, in hertz. Default is 60.

    • disableOnBlur - Boolean (optional)

      If true, acrylic effect will be disabled when the window loses focus, to mimic the behaviour of normal UWP apps. Default is true.

    • debug - Boolean (optional)

      If true, log will be printed to console.

Demo

To run the demo Electron application, clone this repository, install the dependencies and run the test script:

git clone https://github.com/Seo-Rii/electron-acrylic-window.git
cd electron-acrylic-window
yarn install
yarn run test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].