[SSE] Fix bug 53737

This commit is contained in:
JuliaSvinareva 2021-11-19 21:17:33 +03:00
parent 9dd64b7adf
commit 84acd68821

View file

@ -831,12 +831,13 @@ define([
if (this.isCompact) { if (this.isCompact) {
if (this.boxAction.is(':visible')) { if (this.boxAction.is(':visible')) {
var tabsWidth = this.tabbar.getWidth(); var tabsWidth = this.tabbar.getWidth();
if (Common.Utils.innerWidth() - right - 175 - 140 - tabsWidth > 0) { // docWidth - right - left - this.boxAction.width var actionWidth = this.actionWidth || 140;
if (Common.Utils.innerWidth() - right - 175 - actionWidth - tabsWidth > 0) { // docWidth - right - left - this.boxAction.width
var left = tabsWidth + 175; var left = tabsWidth + 175;
this.boxAction.css({'right': right + 'px', 'left': left + 'px', 'width': 'auto'}); this.boxAction.css({'right': right + 'px', 'left': left + 'px', 'width': 'auto'});
this.boxAction.find('.separator').css('border-left-color', 'transparent'); this.boxAction.find('.separator').css('border-left-color', 'transparent');
} else { } else {
this.boxAction.css({'right': right + 'px', 'left': 'auto', 'width': '140px'}); this.boxAction.css({'right': right + 'px', 'left': 'auto', 'width': actionWidth + 'px'});
this.boxAction.find('.separator').css('border-left-color', ''); this.boxAction.find('.separator').css('border-left-color', '');
visible = true; visible = true;
} }
@ -971,8 +972,8 @@ define([
getStatusMessage: function (message) { getStatusMessage: function (message) {
var _message; var _message;
if (this.isCompact && message.length > 17 && this.boxAction.width() < 180) { if (this.isCompact && message.length > 23 && this.boxAction.width() < 180) {
_message = message.substr(0, 17) + '...' _message = message.substr(0, 23).trim() + '...'
} else { } else {
_message = message; _message = message;
} }
@ -981,6 +982,9 @@ define([
showStatusMessage: function(message) { showStatusMessage: function(message) {
this.statusMessage = message; this.statusMessage = message;
if (!this.actionWidth) {
this.actionWidth = message.length > 22 ? 166 : 140;
}
this.labelAction.text(this.getStatusMessage(message)); this.labelAction.text(this.getStatusMessage(message));
this.customizeStatusBarMenu.items.forEach(function (item) { this.customizeStatusBarMenu.items.forEach(function (item) {
if (item.options.id === 'saved-status') { if (item.options.id === 'saved-status') {