seo-rii / electron-acrylic-window

Add acrylic effect to your electron application
MIT License
279 stars 22 forks source link

theme not working #54

Open rendomnet opened 3 years ago

rendomnet commented 3 years ago
  mainWindow = new BrowserWindow({
    show: true,
    frame: false,
    titleBarStyle: 'hidden',
    transparent: true,
    backgroundColor: 'rgba(0,0,0,0)',
    webPreferences: {
      enableRemoteModule: true,
      nodeIntegration: true,
      webSecurity: true,
    },
  });

  setVibrancy(mainWindow, {
    theme: '#22222288', <---------
    effect: 'acrylic',
    useCustomWindowRefreshMethod: true,
    disableOnBlur: false,
    // maximumRefreshRate: 10,
    debug: false,
  });

changing theme option does not affect anything. How to make acrylic darker?

seo-rii commented 3 years ago

Use mainWindow.setVibrancy instead.

Nihilop commented 3 years ago

Hey,

same problem, work only if i do: setVibrancy(win, options). and with this methods i cant edit the theme color option :) * Otherwise it just returns a transparent window

Nihilop commented 3 years ago

Update n°1 (Typescript*) import : const acrylicWindow = require('electron-acrylic-window').BrowserWindow

var :

let theme
let win

options :

theme = {
        theme: '#202425E6',
        effect: 'acrylic',
        useCustomWindowRefreshMethod: true,
        disableOnBlur: true,
        debug: false
      }

window :

win = new acrylicWindow({
    frame: false,
    transparent:  true,
    vibrancy: theme,
    ...
  })

tel me if work