diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index f153840fe..38ae5144b 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -565,7 +565,9 @@ define([ if ( !!window.DE ) { var mode_cls = Common.UI.Themes.isContentThemeDark() ? 'btn-mode-light' : 'btn-mode-dark'; me.btnContentMode = createTitleButton('toolbar__icon icon--inverse ' + mode_cls, $html.findById('#slot-btn-mode'), undefined, 'bottom', 'big'); - me.btnContentMode.setVisible(Common.UI.Themes.isDarkTheme()); + + var document = this.getApplication().getController('Main').document; + me.btnContentMode.setVisible(Common.UI.Themes.isDarkTheme() && !/^pdf|djvu|xps|oxps$/.test(document.fileType)); } return $html; diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js index 39f0d058d..809f1075d 100644 --- a/apps/documenteditor/main/app/controller/Viewport.js +++ b/apps/documenteditor/main/app/controller/Viewport.js @@ -325,7 +325,8 @@ define([ })).on('click', _on_btn_zoom.bind(me, 'up')); me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this)); - if ( !Common.UI.Themes.isDarkTheme() ) { + var document = DE.getController('Main').document; + if ( !Common.UI.Themes.isDarkTheme() || /^pdf|djvu|xps|oxps$/.test(document.fileType) ) { me.header.menuItemsDarkMode.hide(); me.header.menuItemsDarkMode.$el.prev('.divider').hide(); }