mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-24 09:40:21 -06:00
- Move 'About pgAdmin 4' to app menu on macOS. #7289
- Add appropriate minimum width and height setting for desktop apps to avoid app accidentally going below visibility levels. #7988
This commit is contained in:
parent
a1f8e010b7
commit
33c88ceb68
@ -41,6 +41,20 @@ function buildMenu(pgadminMenus, pgAdminMainScreen, callbacks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let menuFile = pgadminMenus.shift();
|
let menuFile = pgadminMenus.shift();
|
||||||
|
|
||||||
|
if (isMac) {
|
||||||
|
// Remove About pgAdmin 4 from help menu and add it to the top of menuFile submenu.
|
||||||
|
const helpMenu = pgadminMenus.find((menu) => menu.name == 'help');
|
||||||
|
if (helpMenu) {
|
||||||
|
const aboutItem = helpMenu.submenu.find((item) => item.name === 'mnu_about');
|
||||||
|
if (aboutItem) {
|
||||||
|
helpMenu.submenu = helpMenu.submenu.filter((item) => item.name !== 'mnu_about');
|
||||||
|
menuFile.submenu.unshift(aboutItem);
|
||||||
|
menuFile.submenu.splice(1, 0, { type: 'separator' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template.push({
|
template.push({
|
||||||
...menuFile,
|
...menuFile,
|
||||||
submenu: [
|
submenu: [
|
||||||
|
@ -264,8 +264,8 @@ function launchPgAdminWindow() {
|
|||||||
'frame': true,
|
'frame': true,
|
||||||
'position': 'center',
|
'position': 'center',
|
||||||
'resizable': true,
|
'resizable': true,
|
||||||
'min_width': 640,
|
'minWidth': 640,
|
||||||
'min_height': 480,
|
'minHeight': 480,
|
||||||
'width': 1024,
|
'width': 1024,
|
||||||
'height': 768,
|
'height': 768,
|
||||||
'focus': true,
|
'focus': true,
|
||||||
@ -323,8 +323,8 @@ function launchPgAdminWindow() {
|
|||||||
action: 'allow',
|
action: 'allow',
|
||||||
overrideBrowserWindowOptions: {
|
overrideBrowserWindowOptions: {
|
||||||
'position': 'center',
|
'position': 'center',
|
||||||
'min_width': 640,
|
'minWidth': 640,
|
||||||
'min_height': 480,
|
'minHeight': 480,
|
||||||
icon: '../../assets/pgAdmin4.png',
|
icon: '../../assets/pgAdmin4.png',
|
||||||
...pgAdminMainScreen.getBounds(),
|
...pgAdminMainScreen.getBounds(),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
Loading…
Reference in New Issue
Block a user