Skip to content

Commit

Permalink
switch over to titlebar-less design on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Kilian committed Jun 18, 2016
1 parent a503888 commit c5e9945
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
11 changes: 11 additions & 0 deletions app/assets/style/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ body {
}
}

[data-platform=darwin] .titlebar {
z-index:10;
position:absolute;
left:0;
top:0;
width:100%;
height:1.3rem;
-webkit-app-region:drag;
}

.updater {
z-index:5;
display:block;
Expand Down Expand Up @@ -137,6 +147,7 @@ body {
vertical-align:middle;
}
}
[data-platform=darwin] .updater {padding-top:2rem;}

@import "../../../node_modules/react-codemirror/node_modules/codemirror/lib/codemirror.css";
@import "../../../node_modules/react-codemirror/node_modules/codemirror/addon/scroll/simplescrollbars.css";
Expand Down
3 changes: 2 additions & 1 deletion app/containers/FromScratch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default class FromScratch extends React.Component {
}
};
return (
<div style={style}>
<div style={style} data-platform={process.platform}>
<Codemirror value={this.state.content} ref="editor" onChange={this.handleChange.bind(this)} options={options} />
<div className={this.state.mock}>Already saved! ;)</div>
<div onClick={this.openDownloadPage.bind(this)} className={this.state.update}>
Expand All @@ -183,6 +183,7 @@ export default class FromScratch extends React.Component {
x
</span>
</div>
<div className="titlebar"></div>
</div>
);
}
Expand Down
4 changes: 1 addition & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ app.on('ready', () => {
height: windowState.bounds && windowState.bounds.height || 450,
darkTheme: true,
backgroundColor: '#002b36',
webPreferences: {
overlayScrollbars: true,
}
titleBarStyle: 'hidden'
};

mainWindow = new BrowserWindow(windowSettings);
Expand Down

0 comments on commit c5e9945

Please sign in to comment.