Skip to content

Commit

Permalink
Fixed transparency on Linux
Browse files Browse the repository at this point in the history
The app now doesn't just have a black background on Linux.
  • Loading branch information
oscartbeaumont committed Apr 9, 2019
1 parent 7b0c88d commit 156075b
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 101 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ElectronPlayer",
"name": "electronplayer",
"version": "2.0.0",
"description": "An Electron Based Web Video Services Player. Supporting Netflix, Youtube, Twitch, Floatplane And More",
"main": "src/main.js",
Expand Down
12 changes: 12 additions & 0 deletions src/client-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ document.body.innerHTML = `
</div>
<style>
body:before {
content: "";
position: fixed;
left: 0;
right: 0;
background-color: rgba(52, 52, 52, 0.95);
width: 100%;
height: 100%;
transform: scale(1.1);
filter: blur(1px);
}
.electronplayer_spinner {
display: inline-block;
position: absolute;
Expand Down
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ function createWindow() {

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on("ready", createWindow);
// The timeout fixes the trasparent background on Linux ???? why
app.on("ready", () => setTimeout(createWindow, 500));

// Chnage the windows url when told to by the ui
ipcMain.on("open-url", (e, url) => {
Expand Down
12 changes: 12 additions & 0 deletions src/ui/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ body {
-webkit-app-region: drag; /* TODO: This Window Drag Is Not Working */
}

body:before {
content: "";
position: fixed;
left: 0;
right: 0;
background-color: rgba(52, 52, 52, 0.95);
width: 100%;
height: 100%;
transform: scale(1.1);
filter: blur(1px);
}

h3 {
font-family: "Source Sans Pro", sans-serif;
}
Expand Down

0 comments on commit 156075b

Please sign in to comment.