mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-24 07:20:16 +05:30
feat(settings): expose monospace font toggle in Settings UI
Add a View > Monospace Font menu (font family radio + ligatures
checkbox) — the app's existing reachable UI surface for this class of
preference (mirrors Theme/Font Size/Spell Check). The menu sends the
change to the renderer, which persists it via the already-working
ipcMain.handle('set-monospace-settings', ...) and applies it live via
the same applyMonospaceClasses() used on initial load.
Amit Haridas
This commit is contained in:
+38
@@ -1218,6 +1218,44 @@ function createMenu() {
|
||||
{
|
||||
type: 'separator',
|
||||
},
|
||||
{
|
||||
label: 'Monospace Font',
|
||||
submenu: [
|
||||
{
|
||||
label: 'JetBrains Mono',
|
||||
type: 'radio',
|
||||
checked: readSettingsJsonCached().monospaceFont !== 'fira-code',
|
||||
click: () =>
|
||||
mainWindow.webContents.send('monospace-setting-change', {
|
||||
monospaceFont: 'jetbrains-mono',
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: 'Fira Code',
|
||||
type: 'radio',
|
||||
checked: readSettingsJsonCached().monospaceFont === 'fira-code',
|
||||
click: () =>
|
||||
mainWindow.webContents.send('monospace-setting-change', {
|
||||
monospaceFont: 'fira-code',
|
||||
}),
|
||||
},
|
||||
{
|
||||
type: 'separator',
|
||||
},
|
||||
{
|
||||
label: 'Ligatures',
|
||||
type: 'checkbox',
|
||||
checked: readSettingsJsonCached().monospaceLigatures === true,
|
||||
click: (menuItem) =>
|
||||
mainWindow.webContents.send('monospace-setting-change', {
|
||||
monospaceLigatures: menuItem.checked,
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'separator',
|
||||
},
|
||||
{
|
||||
label: 'Spell Check',
|
||||
type: 'checkbox',
|
||||
|
||||
Reference in New Issue
Block a user