mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-24 01:36:29 -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();
|
||||
|
||||
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({
|
||||
...menuFile,
|
||||
submenu: [
|
||||
|
@ -264,8 +264,8 @@ function launchPgAdminWindow() {
|
||||
'frame': true,
|
||||
'position': 'center',
|
||||
'resizable': true,
|
||||
'min_width': 640,
|
||||
'min_height': 480,
|
||||
'minWidth': 640,
|
||||
'minHeight': 480,
|
||||
'width': 1024,
|
||||
'height': 768,
|
||||
'focus': true,
|
||||
@ -323,8 +323,8 @@ function launchPgAdminWindow() {
|
||||
action: 'allow',
|
||||
overrideBrowserWindowOptions: {
|
||||
'position': 'center',
|
||||
'min_width': 640,
|
||||
'min_height': 480,
|
||||
'minWidth': 640,
|
||||
'minHeight': 480,
|
||||
icon: '../../assets/pgAdmin4.png',
|
||||
...pgAdminMainScreen.getBounds(),
|
||||
webPreferences: {
|
||||
|
Loading…
Reference in New Issue
Block a user