From 7ab6a9c994eae35afd862fc8247820cf4c6b70fd Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 11 Nov 2021 11:38:34 +0300 Subject: [PATCH] [DE forms] Add icons. Bug 53476 --- .../forms/resources/img/icon-menu-sprite.svg | 26 ++++++++++++++++++- apps/common/forms/resources/less/common.less | 14 +++++++++- .../forms/app/view/ApplicationView.js | 9 ++++--- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/apps/common/forms/resources/img/icon-menu-sprite.svg b/apps/common/forms/resources/img/icon-menu-sprite.svg index 97b51fd3e..bcb884c10 100644 --- a/apps/common/forms/resources/img/icon-menu-sprite.svg +++ b/apps/common/forms/resources/img/icon-menu-sprite.svg @@ -1,4 +1,4 @@ - + @@ -148,5 +148,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/common/forms/resources/less/common.less b/apps/common/forms/resources/less/common.less index 7ebf0d2c8..b0e148fe1 100644 --- a/apps/common/forms/resources/less/common.less +++ b/apps/common/forms/resources/less/common.less @@ -432,7 +432,7 @@ .svg-icon { background: data-uri('../../../../common/forms/resources/img/icon-menu-sprite.svg') no-repeat; - background-size: @icon-width*19 @icon-height*2; + background-size: @icon-width*22 @icon-height*2; &.download { background-position: -@icon-width 0; @@ -496,6 +496,18 @@ background-position: -@icon-width*14 0; background-position: -@icon-width*14 @icon-normal-top; } + &.cut { + background-position: -@icon-width*19 0; + background-position: -@icon-width*19 @icon-normal-top; + } + &.copy { + background-position: -@icon-width*20 0; + background-position: -@icon-width*20 @icon-normal-top; + } + &.paste { + background-position: -@icon-width*21 0; + background-position: -@icon-width*21 @icon-normal-top; + } } .btn { diff --git a/apps/documenteditor/forms/app/view/ApplicationView.js b/apps/documenteditor/forms/app/view/ApplicationView.js index b9cbc27af..3f3aa3714 100644 --- a/apps/documenteditor/forms/app/view/ApplicationView.js +++ b/apps/documenteditor/forms/app/view/ApplicationView.js @@ -89,11 +89,12 @@ define([ getContextMenu: function() { return new Common.UI.Menu({ + cls: 'shifted-right', items: [ - { caption: this.textCut, value: 'cut' }, - { caption: this.textCopy, value: 'copy' }, - { caption: this.textPaste, value: 'paste' }, - { caption: this.textPrintSel, value: 'print' } + { caption: this.textCut, value: 'cut', iconCls: 'mi-icon svg-icon cut' }, + { caption: this.textCopy, value: 'copy', iconCls: 'mi-icon svg-icon copy' }, + { caption: this.textPaste, value: 'paste', iconCls: 'mi-icon svg-icon paste' }, + { caption: this.textPrintSel, value: 'print', iconCls: 'mi-icon svg-icon print' } ] }); },