trodi / electron-splashscreen

Simple splashscreen for electron applications.
MIT License
170 stars 29 forks source link

Transparant Splash Screen #24

Closed neil-benn closed 3 years ago

neil-benn commented 3 years ago

Description

Transparant splash screen does not work on linux (does on win 10). Command line options are passed as follows:

[
  '/home/benn/datapaq5/target/release-builds/dp5-linux-x64/dp5',
  '--enable-transparent-visuals',
  '--disable-gpu'
]

Environment

Steps to Reproduce

Create a dynamic splash screen with trasparant: true as shown below:

  const splash: Splashscreen.DynamicSplashScreen = Splashscreen.initDynamicSplashScreen({
        windowOpts: windowOptions,
        templateUrl: path.join(__dirname, '/../dynamic-splashscreen.html'),
        delay: 0, // force show immediately to better illustrate example
        splashScreenOpts: {
            height: 900,
            icon: __dirname + path.sep + '..' + path.sep + '..' + 
                              path.sep + 'src' + path.sep + 'assets' + 
                              path.sep + 'images' + path.sep + 'dp5-256.ico',
            width: 700,
            transparent: true,
            webPreferences: {
                nodeIntegration: true,
                backgroundThrottling: false
            },
        },
    });
  win = splash.main;

  return splash;
}

Expected behaviour

A transparant splashscreen

Actual behaviour

A splashscreen with a white background

neil-benn commented 3 years ago

Update the same thing happens with the plain command 'npm run electron --enable-transparent-visuals --disable-gpu'

neil-benn commented 3 years ago

This is not the electron splash screen but instead Elctron. I fyou want to fix it then put a wait of 500ms on the app ready call.