Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Frameless window #393

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ function createWindow() {
width: width > 2000 ? Math.floor(width * 0.5) : width - 250,
height: height > 1000 ? Math.floor(height * 0.7) : height - 150,
center: true,
frame: false,
titleBarStyle: 'hidden',
webPreferences: {
// Avoid app throttling when Electron is in background
backgroundThrottling: false,
Expand All @@ -24,6 +26,10 @@ function createWindow() {
win.on('blur', () => win.webContents.send('blur'));
win.on('focus', () => win.webContents.send('focus'));

if (process.platform === 'darwin') {
win.setSheetOffset(40);
}

const template = [
{
label: 'Edit',
Expand Down
1 change: 1 addition & 0 deletions src/components/header/header.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.header {
margin-top: 5px;
-webkit-user-select: none;

h2 {
margin: 5px 0
Expand Down
2 changes: 1 addition & 1 deletion src/components/loadingBar/loadingBar.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
loading-bar {
position: fixed;
width: 100%;
top: 0;
top: -2px;
left: 0;
}

6 changes: 6 additions & 0 deletions src/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

body {
min-width: 320px;
-webkit-app-region: drag;
padding-top: 22px;
& > main, & > main > md-content {
height: 100%;
}
Expand All @@ -24,6 +26,10 @@ login, login md-card {
height: auto;
}

button {
-webkit-app-region: no-drag;
}

body {
.logout {
margin-right: 0;
Expand Down