From 3330c5bf1ca9be66b4f29babe0f541551319d49b Mon Sep 17 00:00:00 2001 From: sandymcfadden Date: Wed, 5 May 2021 14:30:13 -0300 Subject: [PATCH] Add default title bar space for Mac Electron (#2896) 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. --- desktop/app.js | 1 - lib/app.tsx | 1 - lib/navigation-bar/style.scss | 4 ---- lib/note-actions/style.scss | 4 ---- lib/note-toolbar/style.scss | 4 ---- scss/_general.scss | 33 --------------------------------- 6 files changed, 47 deletions(-) diff --git a/desktop/app.js b/desktop/app.js index 068c739cd..8c8add313 100644 --- a/desktop/app.js +++ b/desktop/app.js @@ -66,7 +66,6 @@ module.exports = function main() { height: mainWindowState.height, minWidth: 370, minHeight: 520, - titleBarStyle: 'hidden', show: false, webPreferences: { contextIsolation: true, diff --git a/lib/app.tsx b/lib/app.tsx index 00d6b79f2..96e28daf5 100644 --- a/lib/app.tsx +++ b/lib/app.tsx @@ -204,7 +204,6 @@ class AppComponent extends Component { const mainClasses = classNames('simplenote-app', { 'navigation-open': showNavigation, 'is-electron': isElectron, - 'is-macos': isElectron && isMac, }); return ( diff --git a/lib/navigation-bar/style.scss b/lib/navigation-bar/style.scss index c0f6ede71..e08864706 100644 --- a/lib/navigation-bar/style.scss +++ b/lib/navigation-bar/style.scss @@ -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; diff --git a/lib/note-actions/style.scss b/lib/note-actions/style.scss index 6d19f93b6..e69d37e37 100644 --- a/lib/note-actions/style.scss +++ b/lib/note-actions/style.scss @@ -1,7 +1,3 @@ -.is-macos .note-actions { - top: $toolbar-height + 16px + 26px; -} - .note-actions { width: 200px; position: absolute; diff --git a/lib/note-toolbar/style.scss b/lib/note-toolbar/style.scss index 6fb281bc5..9c1a422f6 100644 --- a/lib/note-toolbar/style.scss +++ b/lib/note-toolbar/style.scss @@ -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); diff --git a/scss/_general.scss b/scss/_general.scss index 6994c1f48..ce73da8dc 100644 --- a/scss/_general.scss +++ b/scss/_general.scss @@ -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;