Skip to content

Commit

Permalink
Add default title bar space for Mac Electron (#2896)
Browse files Browse the repository at this point in the history
Previously we had been adding specific styles to different components for only Mac Electron app to prevent things from overlapping the window buttons.

This removes those and instead enables the default title bar.
  • Loading branch information
sandymcfadden authored May 5, 2021
1 parent b4b2455 commit 3330c5b
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 47 deletions.
1 change: 0 additions & 1 deletion desktop/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ module.exports = function main() {
height: mainWindowState.height,
minWidth: 370,
minHeight: 520,
titleBarStyle: 'hidden',
show: false,
webPreferences: {
contextIsolation: true,
Expand Down
1 change: 0 additions & 1 deletion lib/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ class AppComponent extends Component<Props> {
const mainClasses = classNames('simplenote-app', {
'navigation-open': showNavigation,
'is-electron': isElectron,
'is-macos': isElectron && isMac,
});

return (
Expand Down
4 changes: 0 additions & 4 deletions lib/navigation-bar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
transition: transform 200ms ease-in-out;
}

.is-macos .navigation-bar {
padding-top: $toolbar-height + 26px;
}

.navigation-bar__folders {
display: flex;
flex: none;
Expand Down
4 changes: 0 additions & 4 deletions lib/note-actions/style.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.is-macos .note-actions {
top: $toolbar-height + 16px + 26px;
}

.note-actions {
width: 200px;
position: absolute;
Expand Down
4 changes: 0 additions & 4 deletions lib/note-toolbar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
width: 64px;
}

.is-electron.is-macos .note-toolbar-wrapper .offline-badge {
margin-top: -11px;
}

body[data-theme='dark'] .note-toolbar-wrapper .offline-badge {
border: solid 1px $studio-gray-80;
box-shadow: 0 2px 4px 0 rgba(255, 255, 255, 0.02);
Expand Down
33 changes: 0 additions & 33 deletions scss/_general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,39 +62,6 @@ optgroup {
height: 100%;
}

.is-macos {
.note-toolbar-wrapper {
box-sizing: border-box;
-webkit-app-region: drag;
padding: 40px 0 30px;
}

.new-note-toolbar__button-sidebar {
border-right: 0;
padding-right: 0;
}

.menu-bar {
padding: 40px 15px 30px;
box-sizing: border-box;
-webkit-app-region: drag;
}

.note-toolbar-placeholder {
height: 71px;
-webkit-app-region: drag;
}

.note-info {
padding-top: 10px;
}

.button,
.search-field {
-webkit-app-region: no-drag;
}
}

.login__draggable-area {
height: 100px;
position: absolute;
Expand Down

0 comments on commit 3330c5b

Please sign in to comment.