Skip to content

Commit

Permalink
Merge pull request #32 from Proryanator-Forks/fix/splash-icon-update
Browse files Browse the repository at this point in the history
Updated icons, fixed splash screen aspect ratio and gif playback
  • Loading branch information
rodrigopavezi authored Sep 5, 2023
2 parents d70cf83 + 52a23e5 commit 31bdd41
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.jpg binary
*.jpeg binary
*.ico binary
*.gif binary
*.icns binary
*.eot binary
*.otf binary
Expand Down
Binary file modified assets/icon.icns
Binary file not shown.
Binary file modified assets/icon.ico
Binary file not shown.
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified splash/splash.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions splash/splash.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</head>

<body>
<img width="600" height="420" src="./splash.gif" />
<img width="600" height="338" src="./splash.gif" />
</body>


</html>
</html>
17 changes: 15 additions & 2 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,21 @@ import fs from 'fs';
import MenuBuilder from './menu';
import { resolveHtmlPath } from './util';
import { execPath } from './binaries';
import { platform } from 'os';

const pinata = new Pinata(
'9db9fffc88c7e281b5b2',
'5c761fe42f8267832f70a1f00430d9f3d9006fc9624e5bce43a44b7edd79f624'
);

function getIcon() {
if (process.platform === 'darwin') {
return 'icon.icns';
}

return 'icon.png';
}

class AppUpdater {
constructor() {
log.transports.file.level = 'info';
Expand Down Expand Up @@ -161,11 +170,12 @@ const createWindow = async () => {
show: false,
width: 1920,
height: 1080,
icon: getAssetPath('icon.png'),
icon: getAssetPath(getIcon()),
webPreferences: {
preload: app.isPackaged
? path.join(__dirname, 'preload.js')
: path.join(__dirname, '../../.erb/dll/preload.js'),
devTools: false,
},
});

Expand All @@ -176,9 +186,12 @@ const createWindow = async () => {
height: 420,
movable: true,
center: true,
icon: getAssetPath('icon.png'),
icon: getAssetPath(getIcon()),
transparent: true,
frame: false,
webPreferences: {
devTools: false,
},
});

const splashScreenSrc = app.isPackaged
Expand Down

0 comments on commit 31bdd41

Please sign in to comment.