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

Desktop: Made toolbar buttons bigger and swap order of bullet and number lists

This commit is contained in:
Laurent Cozic 2020-10-21 10:39:53 +01:00
parent 4ba9e60194
commit 1ca44b8f44
4 changed files with 13 additions and 6 deletions

View File

@ -46,8 +46,8 @@ const mapStateToProps = (state: AppState) => {
'textCode',
'attachFile',
'-',
'textNumberedList',
'textBulletedList',
'textNumberedList',
'textCheckbox',
'textHeading',
'textHorizontalRule',

View File

@ -537,6 +537,13 @@ const TinyMCE = (props:NoteBodyEditorProps, ref:any) => {
const toolbarPluginButtons = pluginCommandNames.length ? ` | ${pluginCommandNames.join(' ')}` : '';
const toolbar = [
'bold', 'italic', '|',
'link', 'joplinInlineCode', 'joplinCodeBlock', 'joplinAttach', '|',
'bullist', 'numlist', 'joplinChecklist', '|',
'h1', 'h2', 'h3', 'hr', 'blockquote', 'table', `joplinInsertDateTime${toolbarPluginButtons}`,
];
const editors = await (window as any).tinymce.init({
selector: `#${rootIdRef.current}`,
width: '100%',
@ -555,7 +562,7 @@ const TinyMCE = (props:NoteBodyEditorProps, ref:any) => {
target_list: false,
table_resize_bars: false,
language: ['en_US', 'en_GB'].includes(language) ? undefined : language,
toolbar: `bold italic | link joplinInlineCode joplinCodeBlock joplinAttach | numlist bullist joplinChecklist | h1 h2 h3 hr blockquote table joplinInsertDateTime${toolbarPluginButtons}`,
toolbar: toolbar.join(' '),
localization_function: _,
contextmenu: contextMenuItemNames.join(' '),
setup: (editor:any) => {

View File

@ -1,9 +1,9 @@
import ToolbarButton from './ToolbarButton/ToolbarButton';
import ToggleEditorsButton, { Value } from './ToggleEditorsButton/ToggleEditorsButton';
const React = require('react');
const { connect } = require('react-redux');
const { themeStyle } = require('lib/theme');
const ToolbarButton = require('./ToolbarButton/ToolbarButton.js').default;
const ToolbarSpace = require('./ToolbarSpace.min.js');
const ToggleEditorsButton = require('./ToggleEditorsButton/ToggleEditorsButton.js').default;
interface Props {
themeId: number,
@ -55,7 +55,7 @@ class ToolbarBaseComponent extends React.Component<Props, any> {
if (o.name === 'toggleEditors') {
rightItemComps.push(<ToggleEditorsButton
key={o.name}
value={'markdown'}
value={Value.Markdown}
themeId={this.props.themeId}
toolbarButtonInfo={o}
/>);

View File

@ -378,7 +378,7 @@ function themeStyle(themeId:number) {
// without the need to restart
const fontSizes:any = {
fontSize: Math.round(12 * zoomRatio),
toolbarIconSize: 16,
toolbarIconSize: 18,
editorFontSize: editorFontSize,
textAreaLineHeight: Math.round(globalStyle.textAreaLineHeight * editorFontSize / 12),
};