diff --git a/apps/spreadsheeteditor/main/app/view/CellEditor.js b/apps/spreadsheeteditor/main/app/view/CellEditor.js index ea621d074a..52b25be956 100644 --- a/apps/spreadsheeteditor/main/app/view/CellEditor.js +++ b/apps/spreadsheeteditor/main/app/view/CellEditor.js @@ -84,6 +84,11 @@ define([ title : this.tipFormula, placement : 'cursor' }); + this.$btnfunc.attr('ratio', 'ratio'); + this.applyScaling(Common.UI.Scaling.currentRatio()); + this.$btnfunc.on('app:scaling', function (e, info) { + me.applyScaling(info.ratio); + }); return this; }, @@ -99,6 +104,14 @@ define([ this.btnNamedRanges.setDisabled(disabled); }, + applyScaling: function (ratio) { + if (ratio > 2 && !this.$btnfunc.find('svg.icon').length) { + var icon_name = 'btn-function', + svg_icon = ''.replace('%iconname', icon_name); + this.$btnfunc.find('i.icon').after(svg_icon); + } + }, + tipFormula: 'Insert Function', textManager: 'Manager' }, SSE.Views.CellEditor || {}));