diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js index 0621b6d427..6831ba4e36 100644 --- a/apps/common/main/lib/controller/Themes.js +++ b/apps/common/main/lib/controller/Themes.js @@ -62,6 +62,7 @@ define([ --sk-shadow-toolbar: inset 0 -1px #cbcbcb; --sk-border-radius-toolbar: 0; --sk-background-toolbar: #f7f7f7; --sk-background-toolbar-controls: #f7f7f7; --sk-background-toolbar-header-word: #446995; --sk-background-toolbar-header-pdf: #aa5252; + --sk-background-toolbar-header-slide: #BE664F; --sk-background-toolbar-header-cell: #40865c; --sk-background-toolbar-tab: rgba(0,0,0,.15); --sk-background-toolbar-button: #d8dadc; --sk-layout-padding-toolbar-controls: 0 7px; --sk-layout-padding-header: 0 8px; --sk-canvas-background: #eee; --sk-canvas-content-background: #fff; @@ -77,6 +78,7 @@ define([ css: `.loadmask {--sk-height-toolbar-controls: 66px; --sk-layout-padding-toolbar: 0; --sk-shadow-toolbar: inset 0 -1px #cbcbcb; --sk-border-radius-toolbar: 0; --sk-background-toolbar-header-word: #446995; --sk-background-toolbar-header-pdf: #aa5252; + --sk-background-toolbar-header-slide: #BE664F;; --sk-background-toolbar-header-cell: #40865c; --sk-background-toolbar: #f7f7f7; --sk-background-toolbar-controls: #f1f1f1; --sk-background-toolbar-tab: rgba(255,255,255,.15); --sk-background-toolbar-button: #555; --sk-layout-padding-toolbar-controls: 0 7px; --sk-layout-padding-header: 0 8px; @@ -94,6 +96,7 @@ define([ --sk-height-toolbar-controls: 66px; --sk-layout-padding-toolbar: 0; --sk-shadow-toolbar: inset 0 -1px #616161; --sk-border-radius-toolbar: 0; --sk-background-toolbar-header-word: #2a2a2a; --sk-background-toolbar-header-pdf: #2a2a2a; + --sk-background-toolbar-header-slide: #2a2a2a;--sk-background-toolbar-header-cell: #2a2a2a; --sk-background-toolbar: #404040; --sk-background-toolbar-controls: #404040; --sk-background-toolbar-tab: rgba(255,255,255,.15); --sk-background-toolbar-button: #555; --sk-layout-padding-toolbar-controls: 0 7px; --sk-layout-padding-header: 0 8px; @@ -115,6 +118,7 @@ define([ --sk-height-toolbar-controls: 66px; --sk-layout-padding-toolbar: 0; --sk-shadow-toolbar: inset 0 -1px #616161; --sk-border-radius-toolbar: 0; --sk-background-toolbar-header-word: #2a2a2a; --sk-background-toolbar-header-pdf: #2a2a2a; + --sk-background-toolbar-header-slide: #2a2a2a;--sk-background-toolbar-header-cell: #2a2a2a; --sk-background-toolbar: #404040; --sk-background-toolbar-controls: #404040; --sk-background-toolbar-tab: rgba(255,255,255,.15); --sk-background-toolbar-button: #555; --sk-layout-padding-toolbar-controls: 0 7px; --sk-layout-padding-header: 0 8px; @@ -135,6 +139,7 @@ define([ css: `.loadmask {--sk-height-toolbar-controls: 66px;--sk-layout-padding-toolbar: 0; --sk-shadow-toolbar: inset 0 -1px #cbcbcb; --sk-border-radius-toolbar: 0; --sk-background-toolbar-header-word: #f7f7f7; --sk-background-toolbar-header-pdf: #f7f7f7; + --sk-background-toolbar-header-slide: #f7f7f7;--sk-background-toolbar-header-cell: #f7f7f7; --sk-background-toolbar: #f7f7f7; --sk-background-toolbar-controls: #f1f1f1; --sk-background-toolbar-tab: #e0e0e0; --sk-background-toolbar-button: #e0e0e0; --sk-layout-padding-toolbar-controls: 0 7px; --sk-layout-padding-header: 0 8px; diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index 349b5f4b50..0a23b4f7f9 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -99,7 +99,7 @@ .pdf-form .loadmask > .brendpanel { background: #AA5252; - background: var(--sk-background-toolbar-header-pdf, #AA5252); + background: var(--sk-background-toolbar-header-pdf); } .loadmask > .brendpanel .underline { diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy index f661ec9b8e..92f7a65dfb 100644 --- a/apps/documenteditor/main/index.html.deploy +++ b/apps/documenteditor/main/index.html.deploy @@ -52,7 +52,7 @@ .pdf-form .loadmask > .brendpanel { background: #AA5252; - background: var(--sk-background-toolbar-header-pdf, #AA5252); + background: var(--sk-background-toolbar-header-pdf); } .loadmask > .brendpanel .underline { diff --git a/apps/pdfeditor/main/app/controller/Viewport.js b/apps/pdfeditor/main/app/controller/Viewport.js index 4767134fbb..a764796ea0 100644 --- a/apps/pdfeditor/main/app/controller/Viewport.js +++ b/apps/pdfeditor/main/app/controller/Viewport.js @@ -85,7 +85,7 @@ define([ me.header.btnPrintQuick[value ? 'show' : 'hide']();*/ }, 'view:compact' : function (toolbar, state) { - me.viewport.vlayout.getItem('toolbar').height = state ? + me.viewport.vlayout.getItem('toolbar').height = state ? Common.Utils.InternalSettings.get('toolbar-height-compact') : Common.Utils.InternalSettings.get('toolbar-height-normal'); }, 'undo:disabled' : function (state) { @@ -111,6 +111,7 @@ define([ }); Common.NotificationCenter.on('tabstyle:changed', this.onTabStyleChange.bind(this)); Common.NotificationCenter.on('tabbackground:changed', this.onTabBackgroundChange.bind(this)); + Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this)); this._initEditing = true; }, @@ -362,6 +363,25 @@ define([ this.viewport.vlayout.getItem('toolbar').el.toggleClass('style-off-tabs', background==='toolbar'); }, + onThemeChanged: function () { + if (Common.UI.Themes.available()) { + var _intvars = Common.Utils.InternalSettings; + var $filemenu = $('.toolbar-fullview-panel'); + + const computed_style = window.getComputedStyle(document.body); + _intvars.set('toolbar-height-controls', parseInt(computed_style.getPropertyValue("--toolbar-height-controls") || 84)); + _intvars.set('toolbar-height-normal', _intvars.get('toolbar-height-tabs') + _intvars.get('toolbar-height-controls')); + $filemenu.css('top', (Common.UI.LayoutManager.isElementVisible('toolbar') ? _intvars.get('toolbar-height-tabs-top-title') : 0) + _intvars.get('document-title-height')); + + this.viewport.vlayout.getItem('toolbar').height = this.toolbar && this.toolbar.isCompact() ? + _intvars.get('toolbar-height-compact') : _intvars.get('toolbar-height-normal'); + + this.viewport.vlayout.getItem('statusbar').height = parseInt(computed_style.getPropertyValue('--statusbar-height') || 25); + + Common.NotificationCenter.trigger('layout:changed', 'toolbar'); + } + }, + textFitPage: 'Fit to Page', textFitWidth: 'Fit to Width', txtDarkMode: 'Dark mode' diff --git a/apps/pdfeditor/main/app/template/StatusBar.template b/apps/pdfeditor/main/app/template/StatusBar.template index 9462a31f47..be267e3a33 100644 --- a/apps/pdfeditor/main/app/template/StatusBar.template +++ b/apps/pdfeditor/main/app/template/StatusBar.template @@ -1,7 +1,7 @@ -