Skip to content

Commit

Permalink
chore: address feedback from review
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jan 26, 2022
1 parent d998d47 commit 73b0451
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions spec-main/fixtures/apps/background-color-transparent/main.js
Expand Up @@ -30,16 +30,16 @@ async function createWindow () {

// Get initial green background color.
const window = await getWindow();
const buf = window.thumbnail.toJPEG(100);
const result = await getColors(buf, { count: 1, type: 'image/jpg' });
const buf = window.thumbnail.toPNG();
const result = await getColors(buf, { count: 1, type: 'image/png' });
colors.green = result[0].hex();
}

ipcMain.on('set-transparent', async () => {
// Get updated background color.
const window = await getWindow();
const buf = window.thumbnail.toJPEG(100);
const result = await getColors(buf, { count: 1, type: 'image/jpg' });
const buf = window.thumbnail.toPNG();
const result = await getColors(buf, { count: 1, type: 'image/png' });
colors.transparent = result[0].hex();

const { green, transparent } = colors;
Expand Down
Expand Up @@ -2,8 +2,8 @@ const { ipcRenderer } = require('electron');

window.setTimeout(async (_) => {
document.body.style.background = 'transparent';
}, 3000);

window.setTimeout(async (_) => {
ipcRenderer.send('set-transparent');
}, 5000);
window.setTimeout(async (_) => {
ipcRenderer.send('set-transparent');
}, 2000);
}, 3000);

0 comments on commit 73b0451

Please sign in to comment.