diff --git a/apps/common/main/resources/img/toolbar/equationicons.svg b/apps/common/main/resources/img/toolbar/equationicons.svg new file mode 100644 index 000000000..f5d383f5f --- /dev/null +++ b/apps/common/main/resources/img/toolbar/equationicons.svg @@ -0,0 +1,46 @@ + \ No newline at end of file diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index c78364c45..da410e369 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -586,7 +586,8 @@ } .btn-toolbar { - &:active { + &:active, + &.active { svg.icon { fill: @icon-toolbar-header-ie; fill: @icon-toolbar-header; diff --git a/apps/documenteditor/main/app/controller/DocumentHolder.js b/apps/documenteditor/main/app/controller/DocumentHolder.js index 6ddc673fd..ac3ac8454 100644 --- a/apps/documenteditor/main/app/controller/DocumentHolder.js +++ b/apps/documenteditor/main/app/controller/DocumentHolder.js @@ -2319,7 +2319,7 @@ define([ me.equationBtns = []; for (var i = 0; i < equationsStore.length; ++i) { - var style = 'margin-right: 5px;' + (i==0 ? 'margin-left: 5px;' : ''); + var style = 'margin-right: 8px;' + (i==0 ? 'margin-left: 5px;' : ''); eqStr += ''; } eqStr += ''; @@ -2353,7 +2353,7 @@ define([ var btn = new Common.UI.Button({ parentEl: $('#id-document-holder-btn-equation-' + i, documentHolder.cmpEl), cls : 'btn-toolbar no-caret', - iconCls : 'toolbar__icon btn-paste', + iconCls : 'svgicon ' + equationGroup.get('groupIcon'), hint : equationGroup.get('groupName'), menu : new Common.UI.Menu({ cls: 'menu-shapes', diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index d5dece492..9c7607b80 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -2793,18 +2793,18 @@ define([ // [translate, count cells, scroll] - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4]; - c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true]; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11, false, 'svg-icon-symbols']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4, false, 'svg-icon-fraction']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4, false, 'svg-icon-script']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4, false, 'svg-icon-radical']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true, 'svg-icon-integral']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true, 'svg-icon-largeOperator']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true, 'svg-icon-bracket']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true, 'svg-icon-function']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4, false, 'svg-icon-accent']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3, false, 'svg-icon-limAndLog']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4, false, 'svg-icon-operator']; + c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true, 'svg-icon-matrix']; // equations sub groups @@ -2875,7 +2875,8 @@ define([ groupStore : store, groupWidth : width, groupHeight : normHeight, - groupHeightStr : c_oAscMathMainTypeStrings[id][2] ? ' height:'+ normHeight +'px!important; ' : '' + groupHeightStr : c_oAscMathMainTypeStrings[id][2] ? ' height:'+ normHeight +'px!important; ' : '', + groupIcon: c_oAscMathMainTypeStrings[id][3] }); } } diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index d5d34d2b4..65a5c222c 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -321,6 +321,7 @@ + diff --git a/apps/documenteditor/main/index_loader.html b/apps/documenteditor/main/index_loader.html index 72095a3aa..80c10c94a 100644 --- a/apps/documenteditor/main/index_loader.html +++ b/apps/documenteditor/main/index_loader.html @@ -271,6 +271,7 @@ +