Skip to content

Commit

Permalink
Merge pull request #336 from edipox/mac-os-sexy
Browse files Browse the repository at this point in the history
Make it sexier in macOS
  • Loading branch information
engelgabriel authored Mar 29, 2017
2 parents 8aac5ce + b1985c5 commit 58568e1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ app.on('ready', function () {

var mainWindow = createWindow('main', {
width: 1000,
titleBarStyle: 'hidden',
height: 600
});

Expand Down
8 changes: 8 additions & 0 deletions src/scripts/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,20 @@ class SideBar extends EventEmitter {
document.body.classList.add('hide-server-list');
localStorage.setItem('sidebar-closed', 'true');
this.emit('hide');
if (process.platform === 'darwin') {
document.querySelectorAll('webview').forEach(
(webviewObj) => { if (webviewObj.insertCSS) { webviewObj.insertCSS('aside.side-nav{margin-top:15px;overflow:hidden; transition: margin .5s ease-in-out; }'); } });
}
}

show () {
document.body.classList.remove('hide-server-list');
localStorage.setItem('sidebar-closed', 'false');
this.emit('show');
if (process.platform === 'darwin') {
document.querySelectorAll('webview').forEach(
(webviewObj) => { if (webviewObj.insertCSS) { webviewObj.insertCSS('aside.side-nav{margin-top:0; overflow:hidden; transition: margin .5s ease-in-out; }'); } });
}
}

toggle () {
Expand Down
1 change: 1 addition & 0 deletions src/stylesheets/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ input[type='password'] {
padding: 45px 0 35px;
z-index: 10;
position: relative;
-webkit-app-region: no-drag;
}
.share {
border-radius: 50%;
Expand Down
10 changes: 9 additions & 1 deletion src/stylesheets/start-page.less
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ div.server-list {
bottom: 0;
height: 100%;
width: 80px;
padding-top: 5px;
padding-top: 22px;
background-color: #0F354C;
z-index: 100000;
-webkit-app-region: drag;
}

div.server-list ul {
Expand Down Expand Up @@ -175,6 +176,7 @@ div.server-list li:before {

.hide-server-list webview {
left: 0;
transition: left 0.5s ease-in-out;
}

@-webkit-keyframes wrong {
Expand Down Expand Up @@ -238,4 +240,10 @@ webview.active {

.landing-page {
z-index: 1;
-webkit-app-region: drag;
}

body,
html {
-webkit-app-region: drag;
}

0 comments on commit 58568e1

Please sign in to comment.