From 079cbe0a603647370d07d5a8faf4114cbd59669e Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 21 Jul 2017 13:48:02 +0300 Subject: [PATCH] updated toolbar styles according to drafts --- .../common/main/resources/less/asc-mixins.less | 1 + apps/common/main/resources/less/buttons.less | 18 ++++++++++++++++-- apps/common/main/resources/less/header.less | 2 +- apps/common/main/resources/less/toolbar.less | 11 ++++------- .../main/app/template/Toolbar.template | 16 ++++++---------- apps/documenteditor/main/app/view/Toolbar.js | 2 +- .../main/resources/less/toolbar.less | 2 +- 7 files changed, 30 insertions(+), 22 deletions(-) diff --git a/apps/common/main/resources/less/asc-mixins.less b/apps/common/main/resources/less/asc-mixins.less index e18de81c4..0140f96af 100644 --- a/apps/common/main/resources/less/asc-mixins.less +++ b/apps/common/main/resources/less/asc-mixins.less @@ -132,6 +132,7 @@ .background-ximage(@image, @image2x, @w: auto, @h: auto) { background-image: data-uri(%("%s",@image)); + background-repeat: no-repeat; @media only screen and (-webkit-min-device-pixel-ratio: 2), diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less index 0a2535678..6ac4fc876 100644 --- a/apps/common/main/resources/less/buttons.less +++ b/apps/common/main/resources/less/buttons.less @@ -113,6 +113,14 @@ .inner-box-caption { line-height: 18px; padding: 0 4px; + display: flex; + align-items: center; + + .caption { + max-width: 107px; + text-overflow: ellipsis; + overflow: hidden; + } } .icon { @@ -120,6 +128,12 @@ height: @icon-size; min-width: 0; } + + &.dropdown-toggle { + .caption { + max-width: 100px; + } + } } .inner-box-icon { @@ -202,7 +216,7 @@ &.x-huge, .btn-group.x-huge > & { :not(svg).icon { - .background-ximage('@{common-image-path}/controls/toolbarbig.png', '@{common-image-path}/controls/toolbarbig@2x.png', 96px); + .background-ximage('@{common-image-path}/controls/toolbarbig.png', '@{common-image-path}/controls/toolbarbig@2x.png', 78px); } } @@ -327,7 +341,7 @@ &:not(.split) { .btn-toolbar { - &.dropdown-toggle { + &.dropdown-toggle:not(.x-huge) { width: 100%; min-width: 28px; } diff --git a/apps/common/main/resources/less/header.less b/apps/common/main/resources/less/header.less index c9637523e..37c6e2949 100644 --- a/apps/common/main/resources/less/header.less +++ b/apps/common/main/resources/less/header.less @@ -119,7 +119,7 @@ width: 86px; height: 20px; display: block; - .background-ximage('@{common-image-path}/header/header-logo.png', '@{common-image-path}/header/header-logo@2x.png', 100px); + .background-ximage('@{common-image-path}/header/header-logo.png', '@{common-image-path}/header/header-logo@2x.png', 86px); } } } diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index d82fd4504..1037db203 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -127,16 +127,17 @@ text-align: center; z-index: 1; cursor: pointer; + color: #fff; &:hover { text-decoration: none; } &.left{ - box-shadow: 5px 0 20px 5px rgba(255, 255, 255, .8) + box-shadow: 5px 0 20px 5px @tabs-bg-color } &.right{ - box-shadow: -5px 0 20px 5px rgba(255, 255, 255, .8) + box-shadow: -5px 0 20px 5px @tabs-bg-color } } } @@ -222,10 +223,6 @@ width: 22px; height: 22px; } - - &.adding { - margin-right: 5px; - } } } @@ -282,7 +279,7 @@ .button-normal-icon(review-prev, 17, @toolbar-big-icon-size); .button-normal-icon(btn-dropcap, 18, @toolbar-big-icon-size); .button-normal-icon(~'x-huge .btn-pagebreak', 19, @toolbar-big-icon-size); - +.button-normal-icon(btn-editheader, 20, @toolbar-big-icon-size); .button-normal-icon(btn-pageorient, 21, @toolbar-big-icon-size); .button-normal-icon(btn-pagemargins, 22, @toolbar-big-icon-size); .button-normal-icon(btn-pagesize, 23, @toolbar-big-icon-size); diff --git a/apps/documenteditor/main/app/template/Toolbar.template b/apps/documenteditor/main/app/template/Toolbar.template index ded87a9b2..dc62ea73b 100644 --- a/apps/documenteditor/main/app/template/Toolbar.template +++ b/apps/documenteditor/main/app/template/Toolbar.template @@ -33,11 +33,11 @@
- +
- +
@@ -85,11 +85,11 @@
- +
- +
@@ -106,12 +106,8 @@
-
- -
-
- -
+ +
diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 26e56cdaa..9b98bb68a 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -528,7 +528,7 @@ define([ this.btnEditHeader = new Common.UI.Button({ id: 'id-toolbar-btn-editheader', - cls: 'btn-toolbar', + cls: 'btn-toolbar x-huge icon-top', iconCls: 'btn-editheader', caption: me.capBtnInsHeader, menu: true diff --git a/apps/documenteditor/main/resources/less/toolbar.less b/apps/documenteditor/main/resources/less/toolbar.less index f3dcb481e..99b7f48d4 100644 --- a/apps/documenteditor/main/resources/less/toolbar.less +++ b/apps/documenteditor/main/resources/less/toolbar.less @@ -279,7 +279,7 @@ .button-normal-icon(btn-underline, 35, @toolbar-icon-size); .button-normal-icon(btn-undo, 36, @toolbar-icon-size); .button-normal-icon(btn-hidenchars, 37, @toolbar-icon-size); -.button-normal-icon(btn-editheader, 39, @toolbar-icon-size); +//.button-normal-icon(btn-editheader, 39, @toolbar-icon-size); .button-normal-icon(btn-mailrecepients, 40, @toolbar-icon-size); .button-normal-icon(btn-synch, 42, @toolbar-icon-size); .button-normal-icon(btn-save-coauth, 41, @toolbar-icon-size);