mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Desktop: Improve how font size is applied (#1601)
This commit is contained in:
parent
89ec0629e6
commit
d012c689e1
@ -247,10 +247,13 @@ function themeStyle(theme) {
|
||||
const cacheKey = [theme, zoomRatio, editorFontSize].join('-');
|
||||
if (themeCache_[cacheKey]) return themeCache_[cacheKey];
|
||||
|
||||
// Font size are not theme specific, but they must be referenced
|
||||
// and computed here to allow them to respond to settings changes
|
||||
// without the need to restart
|
||||
let fontSizes = {
|
||||
fontSize: Math.round(12 * zoomRatio),
|
||||
fontSize: Math.round(globalStyle.fontSize * zoomRatio),
|
||||
editorFontSize: editorFontSize,
|
||||
textAreaLineHeight: Math.round(17 * editorFontSize / 12),
|
||||
textAreaLineHeight: Math.round(globalStyle.textAreaLineHeight * editorFontSize / 12),
|
||||
|
||||
// For WebView - must correspond to the properties above
|
||||
htmlFontSize: Math.round(15 * zoomRatio) + 'px',
|
||||
|
Loading…
Reference in New Issue
Block a user