Skip to content

Commit d012c68

Browse files
CalebJohnlaurent22
authored andcommitted
Desktop: Improve how font size is applied (#1601)
1 parent 89ec062 commit d012c68

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ElectronClient/app/theme.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,13 @@ function themeStyle(theme) {
247247
const cacheKey = [theme, zoomRatio, editorFontSize].join('-');
248248
if (themeCache_[cacheKey]) return themeCache_[cacheKey];
249249

250+
// Font size are not theme specific, but they must be referenced
251+
// and computed here to allow them to respond to settings changes
252+
// without the need to restart
250253
let fontSizes = {
251-
fontSize: Math.round(12 * zoomRatio),
254+
fontSize: Math.round(globalStyle.fontSize * zoomRatio),
252255
editorFontSize: editorFontSize,
253-
textAreaLineHeight: Math.round(17 * editorFontSize / 12),
256+
textAreaLineHeight: Math.round(globalStyle.textAreaLineHeight * editorFontSize / 12),
254257

255258
// For WebView - must correspond to the properties above
256259
htmlFontSize: Math.round(15 * zoomRatio) + 'px',

0 commit comments

Comments
 (0)