Skip to content

Commit

Permalink
chore: Windows menubar not showing after update (#2245)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanfbrito authored Dec 3, 2021
1 parent 82042a1 commit 8920d85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/ui/components/hooks/useServers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useSelector } from 'react-redux';
import { createSelector } from 'reselect';

import { Server } from '../../../servers/common';
import { RootState } from '../../../store/rootReducer';
// TODO: change currentView.url string to URL type
export const useServers = () =>
export const useServers = (): (Server & { selected: boolean })[] =>
useSelector(
createSelector(
({ currentView }: RootState) => currentView,
Expand Down
1 change: 1 addition & 0 deletions src/ui/main/menuBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ const createHelpMenu = createSelector(
{
id: 'toggleDevTools',
label: t('menus.toggleDevTools'),
accelerator: 'CommandOrControl+Shift+D',
click: async () => {
const browserWindow = await getRootWindow();

Expand Down
5 changes: 4 additions & 1 deletion src/ui/main/rootWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ export const getRootWindow = (): Promise<BrowserWindow> =>
});
});

const platformTitleBarStyle =
process.platform === 'darwin' ? 'hidden' : 'default';

export const createRootWindow = (): void => {
_rootWindow = new BrowserWindow({
width: 1000,
height: 600,
minWidth: 400,
minHeight: 400,
titleBarStyle: 'hidden',
titleBarStyle: platformTitleBarStyle,
backgroundColor: '#2f343d',
show: false,
webPreferences,
Expand Down

0 comments on commit 8920d85

Please sign in to comment.