[DE] for bug 54348, 53936
This commit is contained in:
parent
1d2a85f662
commit
7680c381b0
|
@ -325,8 +325,7 @@ define([
|
|||
})).on('click', _on_btn_zoom.bind(me, 'up'));
|
||||
|
||||
me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
|
||||
var document = DE.getController('Main').document;
|
||||
if ( !Common.UI.Themes.isDarkTheme() || /^pdf|djvu|xps|oxps$/.test(document.fileType) ) {
|
||||
if ( !Common.UI.Themes.isDarkTheme() ) {
|
||||
me.header.menuItemsDarkMode.hide();
|
||||
me.header.menuItemsDarkMode.$el.prev('.divider').hide();
|
||||
}
|
||||
|
@ -371,16 +370,13 @@ define([
|
|||
},
|
||||
|
||||
onThemeChanged: function (id) {
|
||||
var document = DE.getController('Main').document;
|
||||
if ( !/^pdf|djvu|xps|oxps$/.test(document.fileType) ) {
|
||||
if ( this.header.menuItemsDarkMode ) {
|
||||
var current_dark = Common.UI.Themes.isDarkTheme();
|
||||
var menuItem = this.header.menuItemsDarkMode;
|
||||
menuItem.setVisible(current_dark);
|
||||
menuItem.$el.prev('.divider')[current_dark ? 'show' : 'hide']();
|
||||
if ( this.header.menuItemsDarkMode ) {
|
||||
var current_dark = Common.UI.Themes.isDarkTheme();
|
||||
var menuItem = this.header.menuItemsDarkMode;
|
||||
menuItem.setVisible(current_dark);
|
||||
menuItem.$el.prev('.divider')[current_dark ? 'show' : 'hide']();
|
||||
|
||||
menuItem.setChecked(Common.UI.Themes.isContentThemeDark());
|
||||
}
|
||||
menuItem.setChecked(Common.UI.Themes.isContentThemeDark());
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -648,7 +648,6 @@ define([
|
|||
if ( !Common.UI.Themes.available() ) {
|
||||
$('tr.themes, tr.themes + tr.divider', this.el).hide();
|
||||
}
|
||||
this.chDarkMode.setVisible(!/^pdf|djvu|xps|oxps$/.test(DE.getController('Main').document.fileType));
|
||||
},
|
||||
|
||||
setApi: function(o) {
|
||||
|
|
Loading…
Reference in a new issue