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

Desktop: Resolves (#1863): Added Dracula theme (#1924)

* Added dracula theme

* Removed package-lock
This commit is contained in:
Dom Goodwin 2019-10-01 12:23:32 +01:00 committed by Laurent Cozic
parent edc4dc5801
commit 84ab395fae
4 changed files with 43 additions and 7158 deletions

View File

@ -48,6 +48,7 @@ require('brace/theme/chrome');
require('brace/theme/solarized_light');
require('brace/theme/solarized_dark');
require('brace/theme/twilight');
require('brace/theme/dracula');
const NOTE_TAG_BAR_FEATURE_ENABLED = false;

File diff suppressed because it is too large Load Diff

View File

@ -223,6 +223,43 @@ const solarizedDarkStyle = {
codeThemeCss: 'atom-one-dark-reasonable.css',
};
const draculaStyle = {
backgroundColor: '#282a36',
backgroundColorTransparent: 'rgba(40, 42, 54, 0.9)',
oddBackgroundColor: '#282a36',
color: '#f8f8f2', // For regular text
colorError: '#ff5555',
colorWarn: '#ffb86c',
colorFaded: '#6272a4', // For less important text;
colorBright: '#50fa7b', // For important text;
dividerColor: '#bd93f9',
selectedColor: '#44475a',
urlColor: '#8be9fd',
backgroundColor2: '#21222C',
depthColor: 'rgb(200, 200, 200, OPACITY)',
color2: '#bd93f9',
selectedColor2: '#44475a',
colorError2: '#ff5555',
raisedBackgroundColor: '#44475a',
raisedColor: '#bd93f9',
warningBackgroundColor: '#ffb86c',
htmlColor: '#f8f8f2',
htmlBackgroundColor: '#282a36',
htmlDividerColor: '#f8f8f2',
htmlLinkColor: '#8be9fd',
htmlTableBackgroundColor: '#6272a4',
htmlCodeBackgroundColor: '#44475a',
htmlCodeBorderColor: '#f8f8f2',
htmlCodeColor: '#50fa7b',
editorTheme: 'dracula',
codeThemeCss: 'atom-one-dark-reasonable.css',
};
function addExtraStyles(style) {
style.tagStyle = {
fontSize: style.fontSize,
@ -369,6 +406,9 @@ function themeStyle(theme) {
} else if (theme == Setting.THEME_SOLARIZED_DARK) {
output = Object.assign({}, output, solarizedDarkStyle);
}
else if (theme == Setting.THEME_DRACULA) {
output = Object.assign({}, output, draculaStyle);
}
// Note: All the theme specific things should go in addExtraStyles
// so that their definition is not split between here and the

View File

@ -218,6 +218,7 @@ class Setting extends BaseModel {
let output = {};
output[Setting.THEME_LIGHT] = _('Light');
output[Setting.THEME_DARK] = _('Dark');
output[Setting.THEME_DRACULA] = _('Dracula');
if (platform !== 'mobile') {
output[Setting.THEME_SOLARIZED_LIGHT] = _('Solarised Light');
output[Setting.THEME_SOLARIZED_DARK] = _('Solarised Dark');
@ -884,6 +885,7 @@ Setting.THEME_LIGHT = 1;
Setting.THEME_DARK = 2;
Setting.THEME_SOLARIZED_LIGHT = 3;
Setting.THEME_SOLARIZED_DARK = 4;
Setting.THEME_DRACULA = 5;
Setting.FONT_DEFAULT = 0;
Setting.FONT_MENLO = 1;