Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
fix #28: overlap b/w tabs and macos window buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonwocky committed Mar 10, 2022
1 parent 81213ca commit 9c4b476
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tabs/rendererIndex.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = async function (api, db, __exports, __eval) {
const url = require('url'),
electron = require('electron'),
electronWindow = electron.remote.getCurrentWindow(),
{ components, web } = api;
{ components, web, env } = api;

window['__start'] = async () => {
// display:none; to prevent content flash while css loads
Expand All @@ -28,6 +28,9 @@ module.exports = async function (api, db, __exports, __eval) {
$windowActions = web.html`<div id="window-actions"></div>`;
document.body.prepend(web.render($header, $tabs, $newTab, $windowActions));

// make space for native window buttons on mac
if (env.name === 'darwin') $tabs.style.paddingLeft = '72px';

$newTab.addEventListener('click', () => new Tab($tabs, $root));
electron.ipcRenderer.on('notion-enhancer:close-tab', (event, id) => {
const tab = tabCache.get(id);
Expand Down

0 comments on commit 9c4b476

Please sign in to comment.