[all] fix support for new theme in editors

This commit is contained in:
Maxim Kadushkin 2022-07-13 13:02:39 +03:00
parent 18a49b3479
commit 024adfe49c
14 changed files with 24 additions and 10 deletions

View file

@ -36,6 +36,11 @@ define([
type: 'dark',
source: 'static',
},
'theme-contrast-dark': {
text: locale.txtThemeContrastDark || 'Dark Contrast',
type: 'dark',
source: 'static',
},
}
if ( !!window.currentLoaderTheme ) {
@ -118,6 +123,7 @@ define([
"canvas-page-border",
"canvas-ruler-background",
"canvas-ruler-border",
"canvas-ruler-margins-background",
"canvas-ruler-mark",
"canvas-ruler-handle-border",

View file

@ -93,10 +93,12 @@ if ( !!ui_theme_name ) {
}
if ( checkLocalStorage ) {
var content_theme = localStorage.getItem("content-theme");
if ( content_theme == 'dark' ) {
var current_theme = localStorage.getItem("ui-theme");
if ( !!current_theme && /type":\s*"dark/.test(current_theme) ) {
let current_theme = localStorage.getItem("ui-theme");
if ( !!current_theme && /type":\s*"dark/.test(current_theme) ) {
document.body.classList.add("theme-type-dark");
let content_theme = localStorage.getItem("content-theme");
if ( content_theme == 'dark' ) {
document.body.classList.add("content-theme-dark");
}
}

View file

@ -1,6 +1,6 @@
:root {
.theme-dark-contrast {
.theme-contrast-dark {
--toolbar-header-document: #1e1e1e;
--toolbar-header-spreadsheet: #1e1e1e;
--toolbar-header-presentation: #1e1e1e;

View file

@ -10,7 +10,7 @@
<!-- splash -->
<style type="text/css">
.theme-dark {
.theme-dark, .theme-type-dark {
--toolbar-header-document: #2a2a2a;
--background-toolbar: #404040;
--border-toolbar: #2a2a2a;

View file

@ -197,6 +197,7 @@
"Common.UI.ThemeColorPalette.textThemeColors": "Theme Colors",
"Common.UI.Themes.txtThemeClassicLight": "Classic Light",
"Common.UI.Themes.txtThemeDark": "Dark",
"Common.UI.Themes.txtThemeContrastDark": "Dark Contrast",
"Common.UI.Themes.txtThemeLight": "Light",
"Common.UI.Themes.txtThemeSystem": "Same as system",
"Common.UI.Window.cancelButtonText": "Cancel",

View file

@ -12,6 +12,7 @@
@import "../../../../common/main/resources/less/colors-table.less";
@import "../../../../common/main/resources/less/colors-table-classic.less";
@import "../../../../common/main/resources/less/colors-table-dark.less";
@import "../../../../common/main/resources/less/colors-table-dark-contrast.less";
//
// Bootstrap

View file

@ -9,7 +9,7 @@
<!-- splash -->
<style type="text/css">
.theme-dark {
.theme-dark, .theme-type-dark {
--toolbar-header-presentation: #2a2a2a;
--background-toolbar: #404040;
--border-toolbar: #2a2a2a;

View file

@ -11,7 +11,7 @@
<!-- splash -->
<style>
.theme-dark {
.theme-dark, .theme-type-dark {
--toolbar-header-presentation: #2a2a2a;
--canvas-background: #666666;
/*--canvas-content-background: #fff;*/

View file

@ -9,7 +9,7 @@
<!-- splash -->
<style type="text/css">
.theme-dark {
.theme-dark, .theme-type-dark {
--romb-start-color: #555;
}
.loadmask {

View file

@ -284,6 +284,7 @@
"Common.UI.ThemeColorPalette.textThemeColors": "Theme Colors",
"Common.UI.Themes.txtThemeClassicLight": "Classic Light",
"Common.UI.Themes.txtThemeDark": "Dark",
"Common.UI.Themes.txtThemeContrastDark": "Dark Contrast",
"Common.UI.Themes.txtThemeLight": "Light",
"Common.UI.Themes.txtThemeSystem": "Same as system",
"Common.UI.Window.cancelButtonText": "Cancel",

View file

@ -12,6 +12,7 @@
@import "../../../../common/main/resources/less/colors-table.less";
@import "../../../../common/main/resources/less/colors-table-classic.less";
@import "../../../../common/main/resources/less/colors-table-dark.less";
@import "../../../../common/main/resources/less/colors-table-dark-contrast.less";
//
// Bootstrap

View file

@ -8,7 +8,7 @@
<!-- splash -->
<style type="text/css">
.theme-dark {
.theme-dark, .theme-type-dark {
--toolbar-header-spreadsheet: #2a2a2a;
--background-toolbar: #404040;
--background-normal: #333;

View file

@ -138,6 +138,7 @@
"Common.UI.ThemeColorPalette.textThemeColors": "Theme Colors",
"Common.UI.Themes.txtThemeClassicLight": "Classic Light",
"Common.UI.Themes.txtThemeDark": "Dark",
"Common.UI.Themes.txtThemeContrastDark": "Dark Contrast",
"Common.UI.Themes.txtThemeLight": "Light",
"Common.UI.Themes.txtThemeSystem": "Same as system",
"Common.UI.Window.cancelButtonText": "Cancel",

View file

@ -12,6 +12,7 @@
@import "../../../../common/main/resources/less/colors-table.less";
@import "../../../../common/main/resources/less/colors-table-classic.less";
@import "../../../../common/main/resources/less/colors-table-dark.less";
@import "../../../../common/main/resources/less/colors-table-dark-contrast.less";
//
// Bootstrap