platform-specific option overrides for features not required on macOS

This commit is contained in:
dragonwocky 2020-10-28 12:19:39 +11:00
parent bf800a0889
commit dc60b3d9ae
3 changed files with 16 additions and 0 deletions

View File

@ -587,6 +587,13 @@ window['__start'] = async () => {
const $options = mod.elem.querySelector('.options');
if ($options)
for (const opt of mod.options) {
if (
Object.keys(opt.platformOverwrite || {}).some(
(platform) => process.platform === platform
)
) {
continue;
}
const $opt = createOption(opt, mod.id);
if (opt.type === 'color') {
const $preview = $opt.querySelector('input');

View File

@ -46,6 +46,9 @@ module.exports = {
it can be re-shown by clicking the tray icon or using the hotkey.`,
type: 'toggle',
value: true,
platformOverwrite: {
darwin: true,
},
},
{
key: 'frameless',
@ -53,6 +56,9 @@ module.exports = {
description: `replace the native titlebar with buttons inset into the app.`,
type: 'toggle',
value: true,
platformOverwrite: {
darwin: false,
},
},
{
key: 'tiling_mode',

View File

@ -22,6 +22,9 @@ module.exports = {
used to drag/move the window.`,
type: 'input',
value: 15,
platformOverwrite: {
darwin: 0,
},
},
{
key: 'responsive_breakpoint',