diff --git a/app/src/mainMenuDefinition.js b/app/src/mainMenuDefinition.js
index 702bd0083..3224c30ea 100644
--- a/app/src/mainMenuDefinition.js
+++ b/app/src/mainMenuDefinition.js
@@ -2,29 +2,28 @@ module.exports = [
{
label: 'File',
submenu: [
- { command: 'new.connection' },
- { command: 'new.sqliteDatabase' },
+ { command: 'new.connection', hideDisabled: true },
+ { command: 'new.sqliteDatabase', hideDisabled: true },
{ divider: true },
- { command: 'file.open' },
- { command: 'file.openArchive' },
+ { command: 'file.open', hideDisabled: true },
+ { command: 'file.openArchive', hideDisabled: true },
{ divider: true },
- { command: 'group.save' },
- { command: 'group.saveAs' },
- { command: 'database.search' },
+ { command: 'group.save', hideDisabled: true },
+ { command: 'group.saveAs', hideDisabled: true },
+ { command: 'database.search', hideDisabled: true },
{ divider: true },
-
- { command: 'file.exit' },
+ { command: 'file.exit', hideDisabled: true },
],
},
{
label: 'Window',
submenu: [
- { command: 'new.query' },
- { command: 'new.modelCompare' },
- { command: 'new.freetable' },
+ { command: 'new.query', hideDisabled: true },
+ { command: 'new.modelCompare', hideDisabled: true },
+ { command: 'new.freetable', hideDisabled: true },
{ divider: true },
- { command: 'tabs.closeTab' },
- { command: 'tabs.closeAll' },
+ { command: 'tabs.closeTab', hideDisabled: true },
+ { command: 'tabs.closeAll', hideDisabled: true },
],
},
@@ -42,23 +41,23 @@ module.exports = [
{
label: 'View',
submenu: [
- { command: 'app.reload' },
- { command: 'app.toggleDevTools' },
- { command: 'app.toggleFullScreen' },
- { command: 'app.minimize' },
- { command: 'theme.changeTheme' },
+ { command: 'app.reload', hideDisabled: true },
+ { command: 'app.toggleDevTools', hideDisabled: true },
+ { command: 'app.toggleFullScreen', hideDisabled: true },
+ { command: 'app.minimize', hideDisabled: true },
+ { command: 'theme.changeTheme', hideDisabled: true },
],
},
{
- label: 'help',
+ label: 'Help',
submenu: [
- { command: 'app.openDocs' },
- { command: 'app.openWeb' },
- { command: 'app.openIssue' },
- { command: 'app.openSponsoring' },
+ { command: 'app.openDocs', hideDisabled: true },
+ { command: 'app.openWeb', hideDisabled: true },
+ { command: 'app.openIssue', hideDisabled: true },
+ { command: 'app.openSponsoring', hideDisabled: true },
{ divider: true },
- { command: 'tabs.changelog' },
- { command: 'about.show' },
+ { command: 'tabs.changelog', hideDisabled: true },
+ { command: 'about.show', hideDisabled: true },
],
},
];
diff --git a/packages/web/public/dimensions.css b/packages/web/public/dimensions.css
index d4d746321..48069830f 100644
--- a/packages/web/public/dimensions.css
+++ b/packages/web/public/dimensions.css
@@ -12,7 +12,7 @@
(var(--dim-left-panel-width) + var(--dim-splitter-thickness))
);
- --dim-visible-toolbar: 1; /* set from JS */
+ --dim-visible-toolbar: 0; /* set from JS */
--dim-visible-titlebar: 0; /* set from JS */
--dim-toolbar-height: 30px;
diff --git a/packages/web/src/Screen.svelte b/packages/web/src/Screen.svelte
index 41176c5ef..dbc898385 100644
--- a/packages/web/src/Screen.svelte
+++ b/packages/web/src/Screen.svelte
@@ -24,22 +24,16 @@
import dragDropFileTarget from './utility/dragDropFileTarget';
import TitleBar from './widgets/TitleBar.svelte';
import { onMount } from 'svelte';
- import getElectron from './utility/getElectron';
-
+ import { shouldDrawTitleBar } from './utility/common';
+
$: currentThemeType = $currentThemeDefinition?.themeType == 'dark' ? 'theme-type-dark' : 'theme-type-light';
let domTabs;
let drawTitleBar = false;
onMount(async () => {
- let draw = true;
- const electron = getElectron();
- if (electron && (await electron.isNativeMenu())) {
- draw = false;
- }
- drawTitleBar = draw;
+ drawTitleBar = await shouldDrawTitleBar();
document.documentElement.style.setProperty('--dim-visible-titlebar', drawTitleBar ? 1 : 0);
- console.log('drawTitleBar', drawTitleBar);
});
function handleTabsWheel(e) {
@@ -48,11 +42,13 @@
domTabs.scrollBy({ top: 0, left: e.deltaY < 0 ? -150 : 150, behavior: 'smooth' });
}
}
+
+ $: themeStyle = ``;