Show tooltips with dark theme description

This commit is contained in:
Julia Radzhabova 2021-02-17 21:11:04 +03:00
parent 17a1ec78e4
commit 1dff1aaae3
7 changed files with 74 additions and 5 deletions

View file

@ -96,6 +96,7 @@ define([
hide: function() { hide: function() {
if (this.cmpEl) this.cmpEl.hide(); if (this.cmpEl) this.cmpEl.hide();
this.trigger('hide');
}, },
close: function() { close: function() {
@ -108,7 +109,7 @@ define([
this.cmpEl.css({top : showxy.top + 5 + 'px', left: showxy.left + 5 + 'px'}); this.cmpEl.css({top : showxy.top + 5 + 'px', left: showxy.left + 5 + 'px'});
return; return;
} }
var placement = this.placement.split('-'); var placement = this.placement.split('-');
if (placement.length>0) { if (placement.length>0) {
var top, left, bottom, right; var top, left, bottom, right;

View file

@ -327,8 +327,28 @@ define([
Common.NotificationCenter.on('uitheme:change', function (name) { Common.NotificationCenter.on('uitheme:change', function (name) {
mnuitemDarkTheme.setChecked(Common.UI.Themes.isDarkTheme()); mnuitemDarkTheme.setChecked(Common.UI.Themes.isDarkTheme());
}); });
}
if (!Common.localStorage.getBool("hide-dark-theme-tip")) {
me.themeTip = new Common.UI.SynchronizeTip({
target: me.header.btnOptions.$el,
placement : 'bottom-left',
showLink: false,
extCls: (config.customization && config.customization.toolbarNoTabs) ? 'toolbar-color' : 'theme-color',
text: me.textTipTheme
});
me.themeTip.on({
'closeclick': function() {
me.themeTip.hide();
},
'hide': function() {
me.themeTip = undefined;
Common.localStorage.setBool("hide-dark-theme-tip", true);
}
});
me.themeTip.show();
me.header.btnOptions.on('click', function() { me.themeTip && me.themeTip.hide(); });
}
}
me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this)); me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
} }
}, },
@ -435,6 +455,7 @@ define([
}, },
textFitPage: 'Fit to Page', textFitPage: 'Fit to Page',
textFitWidth: 'Fit to Width' textFitWidth: 'Fit to Width',
textTipTheme: 'You can switch to Dark Theme in the View Settings'
}, DE.Controllers.Viewport)); }, DE.Controllers.Viewport));
}); });

View file

@ -1172,6 +1172,7 @@
"DE.Controllers.Toolbar.txtSymbol_zeta": "Zeta", "DE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
"DE.Controllers.Viewport.textFitPage": "Fit to Page", "DE.Controllers.Viewport.textFitPage": "Fit to Page",
"DE.Controllers.Viewport.textFitWidth": "Fit to Width", "DE.Controllers.Viewport.textFitWidth": "Fit to Width",
"DE.Controllers.Viewport.textTipTheme": "You can switch to Dark Theme in the View Settings",
"DE.Views.AddNewCaptionLabelDialog.textLabel": "Label:", "DE.Views.AddNewCaptionLabelDialog.textLabel": "Label:",
"DE.Views.AddNewCaptionLabelDialog.textLabelError": "Label must not be empty.", "DE.Views.AddNewCaptionLabelDialog.textLabelError": "Label must not be empty.",
"DE.Views.BookmarksDialog.textAdd": "Add", "DE.Views.BookmarksDialog.textAdd": "Add",

View file

@ -330,6 +330,27 @@ define([
Common.NotificationCenter.on('uitheme:change', function (name) { Common.NotificationCenter.on('uitheme:change', function (name) {
mnuitemDarkTheme.setChecked(Common.UI.Themes.isDarkTheme()); mnuitemDarkTheme.setChecked(Common.UI.Themes.isDarkTheme());
}); });
if (!Common.localStorage.getBool("hide-dark-theme-tip")) {
me.themeTip = new Common.UI.SynchronizeTip({
target: me.header.btnOptions.$el,
placement : 'bottom-left',
showLink: false,
extCls: (config.customization && config.customization.toolbarNoTabs) ? 'toolbar-color' : 'theme-color',
text: me.textTipTheme
});
me.themeTip.on({
'closeclick': function() {
me.themeTip.hide();
},
'hide': function() {
me.themeTip = undefined;
Common.localStorage.setBool("hide-dark-theme-tip", true);
}
});
me.themeTip.show();
me.header.btnOptions.on('click', function() { me.themeTip && me.themeTip.hide(); });
}
} }
me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this)); me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
@ -478,6 +499,7 @@ define([
}, },
textFitPage: 'Fit to Page', textFitPage: 'Fit to Page',
textFitWidth: 'Fit to Width' textFitWidth: 'Fit to Width',
textTipTheme: 'You can switch to Dark Theme in the View Settings'
}, PE.Controllers.Viewport)); }, PE.Controllers.Viewport));
}); });

View file

@ -1042,6 +1042,7 @@
"PE.Controllers.Toolbar.txtSymbol_zeta": "Zeta", "PE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
"PE.Controllers.Viewport.textFitPage": "Fit to Slide", "PE.Controllers.Viewport.textFitPage": "Fit to Slide",
"PE.Controllers.Viewport.textFitWidth": "Fit to Width", "PE.Controllers.Viewport.textFitWidth": "Fit to Width",
"PE.Controllers.Viewport.textTipTheme": "You can switch to Dark Theme in the View Settings",
"PE.Views.ChartSettings.textAdvanced": "Show advanced settings", "PE.Views.ChartSettings.textAdvanced": "Show advanced settings",
"PE.Views.ChartSettings.textChartType": "Change Chart Type", "PE.Views.ChartSettings.textChartType": "Change Chart Type",
"PE.Views.ChartSettings.textEditData": "Edit Data", "PE.Views.ChartSettings.textEditData": "Edit Data",

View file

@ -341,6 +341,27 @@ define([
Common.NotificationCenter.on('uitheme:change', function (name) { Common.NotificationCenter.on('uitheme:change', function (name) {
mnuitemDarkTheme.setChecked(Common.UI.Themes.isDarkTheme()); mnuitemDarkTheme.setChecked(Common.UI.Themes.isDarkTheme());
}); });
if (!Common.localStorage.getBool("hide-dark-theme-tip")) {
me.themeTip = new Common.UI.SynchronizeTip({
target: me.header.btnOptions.$el,
placement : 'bottom-left',
showLink: false,
extCls: (config.customization && config.customization.toolbarNoTabs) ? 'toolbar-color' : 'theme-color',
text: me.textTipTheme
});
me.themeTip.on({
'closeclick': function() {
me.themeTip.hide();
},
'hide': function() {
me.themeTip = undefined;
Common.localStorage.setBool("hide-dark-theme-tip", true);
}
});
me.themeTip.show();
me.header.btnOptions.on('click', function() { me.themeTip && me.themeTip.hide(); });
}
} }
me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this)); me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
@ -532,6 +553,7 @@ define([
textHideHeadings: 'Hide Headings', textHideHeadings: 'Hide Headings',
textHideGridlines: 'Hide Gridlines', textHideGridlines: 'Hide Gridlines',
textFreezePanes: 'Freeze Panes', textFreezePanes: 'Freeze Panes',
textFreezePanesShadow: 'Show Freezed Panes Shadow' textFreezePanesShadow: 'Show Freezed Panes Shadow',
textTipTheme: 'You can switch to Dark Theme in the View Settings'
}, SSE.Controllers.Viewport)); }, SSE.Controllers.Viewport));
}); });

View file

@ -1282,6 +1282,7 @@
"SSE.Controllers.Viewport.textHideFBar": "Hide Formula Bar", "SSE.Controllers.Viewport.textHideFBar": "Hide Formula Bar",
"SSE.Controllers.Viewport.textHideGridlines": "Hide Gridlines", "SSE.Controllers.Viewport.textHideGridlines": "Hide Gridlines",
"SSE.Controllers.Viewport.textHideHeadings": "Hide Headings", "SSE.Controllers.Viewport.textHideHeadings": "Hide Headings",
"SSE.Controllers.Viewport.textTipTheme": "You can switch to Dark Theme in the View Settings",
"SSE.Views.AdvancedSeparatorDialog.strDecimalSeparator": "Decimal separator", "SSE.Views.AdvancedSeparatorDialog.strDecimalSeparator": "Decimal separator",
"SSE.Views.AdvancedSeparatorDialog.strThousandsSeparator": "Thousands separator", "SSE.Views.AdvancedSeparatorDialog.strThousandsSeparator": "Thousands separator",
"SSE.Views.AdvancedSeparatorDialog.textLabel": "Settings used to recognize numeric data", "SSE.Views.AdvancedSeparatorDialog.textLabel": "Settings used to recognize numeric data",