mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
Add font size adjustment menu and fix theme styling
Features: • Added Font Size menu in View with increase/decrease/reset options • Keyboard shortcuts: Ctrl+Shift+Plus/Minus/0 for font adjustment • Font size persists between sessions using localStorage • Font sizes adjustable from 10px to 24px Theme Fixes: • Fixed missing Monokai theme styles for tabs and editor • Added complete tab styling for Solarized theme • Added complete tab styling for GitHub theme • All themes now have consistent tab bar appearance Other Changes: • Updated CLAUDE.md with v1.3.x features documentation • Version bumped to 1.3.4 🤖 Generated with [Claude Code](https://claude.ai/code)
This commit is contained in:
@@ -537,4 +537,36 @@ ipcRenderer.on('toggle-find', () => {
|
||||
|
||||
ipcRenderer.on('theme-changed', (event, theme) => {
|
||||
document.body.className = `theme-${theme}`;
|
||||
});
|
||||
|
||||
// Font size adjustment
|
||||
let currentFontSize = parseInt(localStorage.getItem('fontSize')) || 15;
|
||||
|
||||
function updateFontSizes(size) {
|
||||
const editors = document.querySelectorAll('#editor, .editor-textarea');
|
||||
const previews = document.querySelectorAll('#preview, .preview-content');
|
||||
|
||||
editors.forEach(editor => {
|
||||
editor.style.fontSize = `${size}px`;
|
||||
});
|
||||
|
||||
previews.forEach(preview => {
|
||||
preview.style.fontSize = `${size}px`;
|
||||
});
|
||||
|
||||
localStorage.setItem('fontSize', size);
|
||||
}
|
||||
|
||||
// Apply saved font size on load
|
||||
updateFontSizes(currentFontSize);
|
||||
|
||||
ipcRenderer.on('adjust-font-size', (event, action) => {
|
||||
if (action === 'increase' && currentFontSize < 24) {
|
||||
currentFontSize++;
|
||||
} else if (action === 'decrease' && currentFontSize > 10) {
|
||||
currentFontSize--;
|
||||
} else if (action === 'reset') {
|
||||
currentFontSize = 15;
|
||||
}
|
||||
updateFontSizes(currentFontSize);
|
||||
});
|
||||
Reference in New Issue
Block a user