1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

add separate editor font size option (#1027)

This commit is contained in:
Caleb John 2018-12-07 14:26:03 -07:00 committed by Laurent Cozic
parent 61a0e43092
commit 3b14cfcc54
3 changed files with 5 additions and 2 deletions

View File

@ -1442,7 +1442,7 @@ class NoteTextComponent extends React.Component {
verticalAlign: 'top',
paddingTop: paddingTop + 'px',
lineHeight: theme.textAreaLineHeight + 'px',
fontSize: theme.fontSize + 'px',
fontSize: theme.editorFontSize + 'px',
color: theme.color,
backgroundColor: theme.backgroundColor,
editorTheme: theme.editorTheme,

View File

@ -1,6 +1,7 @@
const Setting = require('lib/models/Setting.js');
const zoomRatio = Setting.value('style.zoom') / 100;
const editorFontSize = Setting.value('style.editor.fontSize');
// globalStyle should be used for properties that do not change across themes
// i.e. should not be used for colors
@ -14,7 +15,8 @@ const globalStyle = {
disabledOpacity: 0.3,
buttonMinWidth: 50,
buttonMinHeight: 30,
textAreaLineHeight: 17,
editorFontSize: editorFontSize,
textAreaLineHeight: Math.round(17 * editorFontSize / 12),
headerHeight: 35,
headerButtonHPadding: 6,

View File

@ -101,6 +101,7 @@ class Setting extends BaseModel {
'encryption.activeMasterKeyId': { value: '', type: Setting.TYPE_STRING, public: false },
'encryption.passwordCache': { value: {}, type: Setting.TYPE_OBJECT, public: false, secure: true },
'style.zoom': {value: 100, type: Setting.TYPE_INT, public: true, appTypes: ['desktop'], label: () => _('Global zoom percentage'), minimum: 50, maximum: 500, step: 10},
'style.editor.fontSize': {value: 12, type: Setting.TYPE_INT, public: true, appTypes: ['desktop'], label: () => _('Editor font size'), minimum: 4, maximum: 50, step: 1},
'style.editor.fontFamily': {value: "", type: Setting.TYPE_STRING, public: true, appTypes: ['desktop'], label: () => _('Editor font family'), description: () => _('This must be *monospace* font or it will not work properly. If the font is incorrect or empty, it will default to a generic monospace font.')},
'autoUpdateEnabled': { value: true, type: Setting.TYPE_BOOL, public: true, appTypes: ['desktop'], label: () => _('Automatically update the application') },
'clipperServer.autoStart': { value: false, type: Setting.TYPE_BOOL, public: false },