From 5c6447bac6029cc580b578d79fe3a3de898bb42b Mon Sep 17 00:00:00 2001 From: Alexey Koshelev Date: Fri, 29 Mar 2024 15:39:21 +0300 Subject: [PATCH 1/2] [PE] Fix change color theme in shape shadow color --- apps/presentationeditor/main/app/view/ShapeSettings.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/presentationeditor/main/app/view/ShapeSettings.js b/apps/presentationeditor/main/app/view/ShapeSettings.js index f5f5aa7f9f..769e9ee537 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettings.js +++ b/apps/presentationeditor/main/app/view/ShapeSettings.js @@ -157,6 +157,7 @@ define([ if (this.api) { this.api.asc_setInterfaceDrawImagePlaceShape('shape-texture-img'); this.api.asc_registerCallback('asc_onInitStandartTextures', _.bind(this.onInitStandartTextures, this)); + this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this)); } Common.NotificationCenter.on('storage:image-insert', _.bind(this.insertImageFromStorage, this)); return this; @@ -1938,6 +1939,13 @@ define([ } }, + onSendThemeColors: function() { + if (this.mnuShadowShapeColorPicker) { + var effectcolors = Common.Utils.ThemeColor.getEffectColors(); + this.mnuShadowShapeColorPicker.updateColors(effectcolors, Common.Utils.ThemeColor.getStandartColors()); + } + }, + onSelectTexture: function(picker, view, record){ this._fromTextureCmb = true; this.cmbFillType.setValue(this._arrFillType[1].value); From 6f7a6d0244ebd8c0ab4bf261a42b9c982e29a6e3 Mon Sep 17 00:00:00 2001 From: Alexey Koshelev Date: Fri, 29 Mar 2024 15:53:06 +0300 Subject: [PATCH 2/2] [SSE PE DE] Bug 67041 --- apps/documenteditor/main/app/view/ShapeSettings.js | 1 + apps/presentationeditor/main/app/view/ShapeSettings.js | 9 +-------- apps/spreadsheeteditor/main/app/view/ShapeSettings.js | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js index 0f1bc7b898..34de318d0e 100644 --- a/apps/documenteditor/main/app/view/ShapeSettings.js +++ b/apps/documenteditor/main/app/view/ShapeSettings.js @@ -2326,6 +2326,7 @@ define([ this.colorsFG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsBG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsGrad.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); + this.mnuShadowShapeColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); }, _pt2mm: function(value) { diff --git a/apps/presentationeditor/main/app/view/ShapeSettings.js b/apps/presentationeditor/main/app/view/ShapeSettings.js index 769e9ee537..238bdeaa7f 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettings.js +++ b/apps/presentationeditor/main/app/view/ShapeSettings.js @@ -157,7 +157,6 @@ define([ if (this.api) { this.api.asc_setInterfaceDrawImagePlaceShape('shape-texture-img'); this.api.asc_registerCallback('asc_onInitStandartTextures', _.bind(this.onInitStandartTextures, this)); - this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this)); } Common.NotificationCenter.on('storage:image-insert', _.bind(this.insertImageFromStorage, this)); return this; @@ -1939,13 +1938,6 @@ define([ } }, - onSendThemeColors: function() { - if (this.mnuShadowShapeColorPicker) { - var effectcolors = Common.Utils.ThemeColor.getEffectColors(); - this.mnuShadowShapeColorPicker.updateColors(effectcolors, Common.Utils.ThemeColor.getStandartColors()); - } - }, - onSelectTexture: function(picker, view, record){ this._fromTextureCmb = true; this.cmbFillType.setValue(this._arrFillType[1].value); @@ -2165,6 +2157,7 @@ define([ this.colorsFG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsBG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsGrad.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); + this.mnuShadowShapeColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); }, onBtnRotateClick: function(btn) { diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js index 180b57d732..88eee6f9a5 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js @@ -2206,6 +2206,7 @@ define([ this.colorsFG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsBG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsGrad.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); + this.mnuShadowShapeColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); }, _pt2mm: function(value) {