Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
4bade4d583
|
@ -60,6 +60,7 @@ define([
|
||||||
this._state = {};
|
this._state = {};
|
||||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||||
Common.NotificationCenter.on('contenttheme:dark', this.onContentThemeChangedToDark.bind(this));
|
Common.NotificationCenter.on('contenttheme:dark', this.onContentThemeChangedToDark.bind(this));
|
||||||
|
Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
setApi: function (api) {
|
setApi: function (api) {
|
||||||
|
@ -203,5 +204,15 @@ define([
|
||||||
this.view && this.view.btnDarkDocument.toggle(isdark, true);
|
this.view && this.view.btnDarkDocument.toggle(isdark, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onThemeChanged: function () {
|
||||||
|
if (this.view) {
|
||||||
|
var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(),
|
||||||
|
menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme});
|
||||||
|
this.view.btnInterfaceTheme.menu.clearAll();
|
||||||
|
menu_item.setChecked(true, true);
|
||||||
|
this.view.btnDarkDocument.setDisabled(!Common.UI.Themes.isDarkTheme());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
}, DE.Controllers.ViewTab || {}));
|
}, DE.Controllers.ViewTab || {}));
|
||||||
});
|
});
|
|
@ -49,7 +49,7 @@ define([
|
||||||
return {
|
return {
|
||||||
options: {},
|
options: {},
|
||||||
|
|
||||||
setEvents() {
|
setEvents: function () {
|
||||||
var me = this;
|
var me = this;
|
||||||
me.btnNavigation.on('click', function (btn, e) {
|
me.btnNavigation.on('click', function (btn, e) {
|
||||||
me.fireEvent('viewtab:navigation', [btn.pressed]);
|
me.fireEvent('viewtab:navigation', [btn.pressed]);
|
||||||
|
|
|
@ -62,6 +62,7 @@ define([
|
||||||
zoom_percent: undefined
|
zoom_percent: undefined
|
||||||
};
|
};
|
||||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||||
|
Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
setApi: function (api) {
|
setApi: function (api) {
|
||||||
|
@ -195,7 +196,16 @@ define([
|
||||||
Common.localStorage.setBool('pe-hidden-notes', !checked);
|
Common.localStorage.setBool('pe-hidden-notes', !checked);
|
||||||
this.view.fireEvent('notes:hide', [!checked]);
|
this.view.fireEvent('notes:hide', [!checked]);
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.view);
|
Common.NotificationCenter.trigger('edit:complete', this.view);
|
||||||
}
|
},
|
||||||
|
|
||||||
|
onThemeChanged: function () {
|
||||||
|
if (this.view) {
|
||||||
|
var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(),
|
||||||
|
menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme});
|
||||||
|
this.view.btnInterfaceTheme.menu.clearAll();
|
||||||
|
menu_item.setChecked(true, true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
}, PE.Controllers.ViewTab || {}));
|
}, PE.Controllers.ViewTab || {}));
|
||||||
});
|
});
|
|
@ -59,6 +59,7 @@ define([
|
||||||
},
|
},
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
this._state = {};
|
this._state = {};
|
||||||
|
Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
setApi: function (api) {
|
setApi: function (api) {
|
||||||
|
@ -246,6 +247,16 @@ define([
|
||||||
onApiZoomChange: function(zf, type){
|
onApiZoomChange: function(zf, type){
|
||||||
var value = Math.floor((zf + .005) * 100);
|
var value = Math.floor((zf + .005) * 100);
|
||||||
this.view.cmbZoom.setValue(value, value + '%');
|
this.view.cmbZoom.setValue(value, value + '%');
|
||||||
|
},
|
||||||
|
|
||||||
|
onThemeChanged: function () {
|
||||||
|
if (this.view) {
|
||||||
|
var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(),
|
||||||
|
menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme});
|
||||||
|
this.view.btnInterfaceTheme.menu.clearAll();
|
||||||
|
menu_item.setChecked(true, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}, SSE.Controllers.ViewTab || {}));
|
}, SSE.Controllers.ViewTab || {}));
|
||||||
});
|
});
|
Loading…
Reference in a new issue