menu will now respect integrated titlebar setting

This commit is contained in:
dragonwocky 2020-10-08 09:58:35 +11:00
parent c0d7d5170b
commit 51acd63748
3 changed files with 3 additions and 14 deletions

View File

@ -19,7 +19,7 @@ window['__start'] = async () => {
.enabled, .enabled,
}, },
tiling_mode: store('0f0bf8b6-eae6-4273-b307-8fc43f2ee082').tiling_mode, tiling_mode: store('0f0bf8b6-eae6-4273-b307-8fc43f2ee082').tiling_mode,
frameless: true, frameless: store('0f0bf8b6-eae6-4273-b307-8fc43f2ee082').frameless,
})); }));
document.querySelector('#titlebar').appendChild(buttons.element); document.querySelector('#titlebar').appendChild(buttons.element);

View File

@ -6,8 +6,6 @@
'use strict'; 'use strict';
const { dirname } = require('path');
const url = require('url'), const url = require('url'),
path = require('path'), path = require('path'),
electron = require('electron'), electron = require('electron'),
@ -80,16 +78,7 @@ module.exports = (store, __exports) => {
}; };
} }
componentDidMount() { componentDidMount() {
const buttons = require('./buttons.js')(() => ({ const buttons = require('./buttons.js')(store);
'72886371-dada-49a7-9afc-9f275ecf29d3': {
enabled: (
store('mods')['72886371-dada-49a7-9afc-9f275ecf29d3'] || {}
).enabled,
},
tiling_mode: store('0f0bf8b6-eae6-4273-b307-8fc43f2ee082')
.tiling_mode,
frameless: true,
}));
this.$titlebar.appendChild(buttons.element); this.$titlebar.appendChild(buttons.element);
this.loadListeners(); this.loadListeners();
} }

View File

@ -88,7 +88,7 @@ module.exports = (store, __exports) => {
electron.shell.openExternal(JSON.stringify(window_state)); electron.shell.openExternal(JSON.stringify(window_state));
enhancer_menu = new electron.BrowserWindow({ enhancer_menu = new electron.BrowserWindow({
show: true, show: true,
frame: false, frame: !store().frameless,
titleBarStyle: 'hiddenInset', titleBarStyle: 'hiddenInset',
x: x:
window_state.x || window_state.x ||