Skip to content

Commit

Permalink
Merge pull request #170 from tom-james-watson/electron-19
Browse files Browse the repository at this point in the history
upgrade to electron 19
  • Loading branch information
tom-james-watson authored Jun 16, 2022
2 parents 1b4e08e + 404dc3e commit e60adfc
Show file tree
Hide file tree
Showing 4 changed files with 3,268 additions and 1,798 deletions.
9 changes: 7 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Development
===========
# Development

## Requirements

Expand Down Expand Up @@ -120,6 +119,12 @@ And should also install the `review-tools` snap for enhanced checks before uploa
sudo snap install review-tools
```

Finally, install deps for building rpms:

```bash
sudo apt install rpm
```

Then run:

```bash
Expand Down
12 changes: 1 addition & 11 deletions app/main/lib/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export function createSettingsWindow(): void {
: path.join(process.resourcesPath, "app/resources/tray/icon.png"),
webPreferences: {
preload: path.join(__dirname, "../../renderer/preload.js"),
nativeWindowOpen: true,
},
});

Expand All @@ -72,7 +71,6 @@ export function createSoundsWindow(): void {
webPreferences: {
devTools: false,
preload: path.join(__dirname, "../../renderer/preload.js"),
nativeWindowOpen: true,
},
});

Expand All @@ -83,14 +81,7 @@ export function createBreakWindows(): void {
const settings = getSettings();

const displays = screen.getAllDisplays();
let created = 0;
for (const display of displays) {
// BrowserWindows on a second monitor seem to be created with the wrong
// size and colour space on windows for some reason. For now, just create
// the break popup on the first screen.
if (process.platform === "win32" && created === 1) {
break;
}
const size = 400;
const breakWindow = new BrowserWindow({
show: false,
Expand All @@ -100,12 +91,12 @@ export function createBreakWindows(): void {
y: display.bounds.y + display.bounds.height / 2 - size / 2,
width: size,
height: size,
resizable: false,
focusable: false,
transparent: true,
hasShadow: false,
webPreferences: {
preload: path.join(__dirname, "../../renderer/preload.js"),
nativeWindowOpen: true,
},
});

Expand Down Expand Up @@ -157,6 +148,5 @@ export function createBreakWindows(): void {
});

breakWindows.push(breakWindow);
created++;
}
}
Loading

0 comments on commit e60adfc

Please sign in to comment.