You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Desktop: Better handling of bold text to simplify customisation (#5732)
This commit is contained in:
@ -502,10 +502,6 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
|||||||
padding-left: .2em;
|
padding-left: .2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.CodeMirror span.cm-strong {
|
|
||||||
color: ${theme.colorBright};
|
|
||||||
}
|
|
||||||
|
|
||||||
div.CodeMirror span.cm-hr {
|
div.CodeMirror span.cm-hr {
|
||||||
color: ${theme.dividerColor};
|
color: ${theme.dividerColor};
|
||||||
}
|
}
|
||||||
|
@ -496,10 +496,10 @@ class Dialog extends React.PureComponent<Props, State> {
|
|||||||
const isSelected = item.id === this.state.selectedItemId;
|
const isSelected = item.id === this.state.selectedItemId;
|
||||||
const rowStyle = isSelected ? style.rowSelected : style.row;
|
const rowStyle = isSelected ? style.rowSelected : style.row;
|
||||||
const titleHtml = item.fragments
|
const titleHtml = item.fragments
|
||||||
? `<span style="font-weight: bold; color: ${theme.colorBright};">${item.title}</span>`
|
? `<span style="font-weight: bold; color: ${theme.color};">${item.title}</span>`
|
||||||
: surroundKeywords(this.state.keywords, item.title, `<span style="font-weight: bold; color: ${theme.colorBright};">`, '</span>', { escapeHtml: true });
|
: surroundKeywords(this.state.keywords, item.title, `<span style="font-weight: bold; color: ${theme.searchMarkerColor}; background-color: ${theme.searchMarkerBackgroundColor}">`, '</span>', { escapeHtml: true });
|
||||||
|
|
||||||
const fragmentsHtml = !item.fragments ? null : surroundKeywords(this.state.keywords, item.fragments, `<span style="font-weight: bold; color: ${theme.colorBright};">`, '</span>', { escapeHtml: true });
|
const fragmentsHtml = !item.fragments ? null : surroundKeywords(this.state.keywords, item.fragments, `<span style="color: ${theme.searchMarkerColor}; background-color: ${theme.searchMarkerBackgroundColor}">`, '</span>', { escapeHtml: true });
|
||||||
|
|
||||||
const folderIcon = <i style={{ fontSize: theme.fontSize, marginRight: 2 }} className="fa fa-book" />;
|
const folderIcon = <i style={{ fontSize: theme.fontSize, marginRight: 2 }} className="fa fa-book" />;
|
||||||
const pathComp = !item.path ? null : <div style={style.rowPath}>{folderIcon} {item.path}</div>;
|
const pathComp = !item.path ? null : <div style={style.rowPath}>{folderIcon} {item.path}</div>;
|
||||||
|
@ -15,7 +15,6 @@ const input: Theme = {
|
|||||||
colorWarn: 'rgb(228,86,0)',
|
colorWarn: 'rgb(228,86,0)',
|
||||||
colorWarnUrl: '#155BDA',
|
colorWarnUrl: '#155BDA',
|
||||||
colorFaded: '#7C8B9E', // For less important text
|
colorFaded: '#7C8B9E', // For less important text
|
||||||
colorBright: '#000000', // For important text
|
|
||||||
dividerColor: '#dddddd',
|
dividerColor: '#dddddd',
|
||||||
selectedColor: '#e5e5e5',
|
selectedColor: '#e5e5e5',
|
||||||
urlColor: '#155BDA',
|
urlColor: '#155BDA',
|
||||||
@ -69,7 +68,6 @@ const expected = `
|
|||||||
--joplin-color-warn: rgb(228,86,0);
|
--joplin-color-warn: rgb(228,86,0);
|
||||||
--joplin-color-warn-url: #155BDA;
|
--joplin-color-warn-url: #155BDA;
|
||||||
--joplin-color-faded: #7C8B9E;
|
--joplin-color-faded: #7C8B9E;
|
||||||
--joplin-color-bright: #000000;
|
|
||||||
--joplin-divider-color: #dddddd;
|
--joplin-divider-color: #dddddd;
|
||||||
--joplin-selected-color: #e5e5e5;
|
--joplin-selected-color: #e5e5e5;
|
||||||
--joplin-url-color: #155BDA;
|
--joplin-url-color: #155BDA;
|
||||||
|
@ -11,7 +11,6 @@ const theme: Theme = {
|
|||||||
colorError: '#9a2f2f',
|
colorError: '#9a2f2f',
|
||||||
colorWarn: '#d66500',
|
colorWarn: '#d66500',
|
||||||
colorFaded: '#666a73', // For less important text (e.g. not selected menu in settings)
|
colorFaded: '#666a73', // For less important text (e.g. not selected menu in settings)
|
||||||
colorBright: '#d3dae3', // For important text; (e.g. bold)
|
|
||||||
dividerColor: '#141a21', // Borders, I wish I could remove them
|
dividerColor: '#141a21', // Borders, I wish I could remove them
|
||||||
selectedColor: '#2b5278', // Selected note
|
selectedColor: '#2b5278', // Selected note
|
||||||
urlColor: '#356693', // Links to external sites (e.g. in settings)
|
urlColor: '#356693', // Links to external sites (e.g. in settings)
|
||||||
|
@ -18,7 +18,6 @@ const theme: Theme = {
|
|||||||
colorWarn: '#9A5B00',
|
colorWarn: '#9A5B00',
|
||||||
colorWarnUrl: '#ffff82',
|
colorWarnUrl: '#ffff82',
|
||||||
colorFaded: '#999999', // For less important text
|
colorFaded: '#999999', // For less important text
|
||||||
colorBright: '#ffffff', // For important text
|
|
||||||
dividerColor: '#555555',
|
dividerColor: '#555555',
|
||||||
selectedColor: '#616161',
|
selectedColor: '#616161',
|
||||||
urlColor: 'rgb(166,166,255)',
|
urlColor: 'rgb(166,166,255)',
|
||||||
|
@ -11,7 +11,6 @@ const theme: Theme = {
|
|||||||
colorError: '#ff5555',
|
colorError: '#ff5555',
|
||||||
colorWarn: '#ffb86c',
|
colorWarn: '#ffb86c',
|
||||||
colorFaded: '#6272a4', // For less important text;
|
colorFaded: '#6272a4', // For less important text;
|
||||||
colorBright: '#50fa7b', // For important text;
|
|
||||||
dividerColor: '#bd93f9',
|
dividerColor: '#bd93f9',
|
||||||
selectedColor: '#44475a',
|
selectedColor: '#44475a',
|
||||||
urlColor: '#8be9fd',
|
urlColor: '#8be9fd',
|
||||||
|
@ -15,7 +15,6 @@ const theme: Theme = {
|
|||||||
colorWarn: 'rgb(228,86,0)',
|
colorWarn: 'rgb(228,86,0)',
|
||||||
colorWarnUrl: '#155BDA',
|
colorWarnUrl: '#155BDA',
|
||||||
colorFaded: '#7C8B9E', // For less important text
|
colorFaded: '#7C8B9E', // For less important text
|
||||||
colorBright: '#000000', // For important text
|
|
||||||
dividerColor: '#dddddd',
|
dividerColor: '#dddddd',
|
||||||
selectedColor: '#e5e5e5',
|
selectedColor: '#e5e5e5',
|
||||||
urlColor: '#155BDA',
|
urlColor: '#155BDA',
|
||||||
|
@ -57,7 +57,6 @@ const theme: Theme = {
|
|||||||
colorError: nord[11],
|
colorError: nord[11],
|
||||||
colorWarn: nord[12],
|
colorWarn: nord[12],
|
||||||
colorFaded: nord[4], // For less important text;
|
colorFaded: nord[4], // For less important text;
|
||||||
colorBright: nord[6], // For important text;
|
|
||||||
dividerColor: nord[10],
|
dividerColor: nord[10],
|
||||||
selectedColor: nord[9],
|
selectedColor: nord[9],
|
||||||
urlColor: nord[8],
|
urlColor: nord[8],
|
||||||
|
@ -16,7 +16,6 @@ const theme: Theme = {
|
|||||||
codeBackgroundColor: 'rgb(47, 48, 49)',
|
codeBackgroundColor: 'rgb(47, 48, 49)',
|
||||||
codeBorderColor: 'rgb(70, 70, 70)',
|
codeBorderColor: 'rgb(70, 70, 70)',
|
||||||
codeThemeCss: 'atom-one-dark-reasonable.css',
|
codeThemeCss: 'atom-one-dark-reasonable.css',
|
||||||
colorBright: 'rgb(220,220,220)',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default theme;
|
export default theme;
|
||||||
|
@ -11,7 +11,6 @@ const theme: Theme = {
|
|||||||
colorError: '#dc322f',
|
colorError: '#dc322f',
|
||||||
colorWarn: '#cb4b16',
|
colorWarn: '#cb4b16',
|
||||||
colorFaded: '#657b83', // For less important text;
|
colorFaded: '#657b83', // For less important text;
|
||||||
colorBright: '#eee8d5', // For important text;
|
|
||||||
dividerColor: '#586e75',
|
dividerColor: '#586e75',
|
||||||
selectedColor: '#073642',
|
selectedColor: '#073642',
|
||||||
urlColor: '#268bd2',
|
urlColor: '#268bd2',
|
||||||
|
@ -11,7 +11,6 @@ const theme: Theme = {
|
|||||||
colorError: '#dc322f',
|
colorError: '#dc322f',
|
||||||
colorWarn: '#cb4b16',
|
colorWarn: '#cb4b16',
|
||||||
colorFaded: '#839496', // For less important text;
|
colorFaded: '#839496', // For less important text;
|
||||||
colorBright: '#073642', // For important text;
|
|
||||||
dividerColor: '#eee8d5',
|
dividerColor: '#eee8d5',
|
||||||
selectedColor: '#eee8d5',
|
selectedColor: '#eee8d5',
|
||||||
urlColor: '#268bd2',
|
urlColor: '#268bd2',
|
||||||
|
@ -17,7 +17,6 @@ export interface Theme {
|
|||||||
colorWarn: string;
|
colorWarn: string;
|
||||||
colorWarnUrl: string; // For URL displayed over a warningBackgroundColor
|
colorWarnUrl: string; // For URL displayed over a warningBackgroundColor
|
||||||
colorFaded: string; // For less important text
|
colorFaded: string; // For less important text
|
||||||
colorBright: string; // For important text
|
|
||||||
dividerColor: string;
|
dividerColor: string;
|
||||||
selectedColor: string;
|
selectedColor: string;
|
||||||
urlColor: string;
|
urlColor: string;
|
||||||
|
@ -4,7 +4,6 @@ module.exports = {
|
|||||||
lineHeight: '1.6em',
|
lineHeight: '1.6em',
|
||||||
backgroundColor: 'white',
|
backgroundColor: 'white',
|
||||||
paddingBottom: 3,
|
paddingBottom: 3,
|
||||||
colorBright: '#000000', // For important text
|
|
||||||
codeBorderColor: 'rgb(220, 220, 220)',
|
codeBorderColor: 'rgb(220, 220, 220)',
|
||||||
codeBackgroundColor: 'rgb(243, 243, 243)',
|
codeBackgroundColor: 'rgb(243, 243, 243)',
|
||||||
dividerColor: 'rgb(230,230,230)',
|
dividerColor: 'rgb(230,230,230)',
|
||||||
|
@ -49,9 +49,6 @@ export default function(theme: any, options: Options = null) {
|
|||||||
padding-bottom: ${formatCssSize(theme.bodyPaddingBottom)};
|
padding-bottom: ${formatCssSize(theme.bodyPaddingBottom)};
|
||||||
padding-top: ${formatCssSize(theme.bodyPaddingTop)};
|
padding-top: ${formatCssSize(theme.bodyPaddingTop)};
|
||||||
}
|
}
|
||||||
strong {
|
|
||||||
color: ${theme.colorBright};
|
|
||||||
}
|
|
||||||
kbd {
|
kbd {
|
||||||
border: 1px solid ${theme.codeBorderColor};
|
border: 1px solid ${theme.codeBorderColor};
|
||||||
box-shadow: inset 0 -1px 0 ${theme.codeBorderColor};
|
box-shadow: inset 0 -1px 0 ${theme.codeBorderColor};
|
||||||
|
Reference in New Issue
Block a user