mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
Desktop: Fixes #3503: Editor window was no longer being resized with the main window
This commit is contained in:
parent
9dfb0642da
commit
7f1f5a8c3d
@ -3,7 +3,7 @@ import { NoteEditorProps } from '../utils/types';
|
||||
const { buildStyle } = require('lib/theme');
|
||||
|
||||
export default function styles(props: NoteEditorProps) {
|
||||
return buildStyle('NoteEditor', props.theme, (theme: any) => {
|
||||
return buildStyle(['NoteEditor', props.style.width, props.style.height], props.theme, (theme: any) => {
|
||||
return {
|
||||
root: {
|
||||
...props.style,
|
||||
|
@ -345,6 +345,8 @@ const cachedStyles_ = {
|
||||
// the dependencies of the style change. If the style depends only
|
||||
// on the theme, a static string can be provided as a cache key.
|
||||
function buildStyle(cacheKey, themeId, callback) {
|
||||
cacheKey = Array.isArray(cacheKey) ? cacheKey.join('_') : cacheKey;
|
||||
|
||||
// We clear the cache whenever switching themes
|
||||
if (cachedStyles_.themeId !== themeId) {
|
||||
cachedStyles_.themeId = themeId;
|
||||
|
Loading…
Reference in New Issue
Block a user