From 96b55db11bad512e14159e6d075ed9235cc20a62 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sat, 21 Dec 2024 00:25:24 +0300 Subject: [PATCH] Fix palette style --- apps/common/main/lib/component/ColorButton.js | 5 ++--- apps/pdfeditor/main/app/view/DocumentHolderExt.js | 10 ++++++++++ apps/pdfeditor/main/app/view/Toolbar.js | 6 ++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/component/ColorButton.js b/apps/common/main/lib/component/ColorButton.js index f15ca52efa..5a0d435611 100644 --- a/apps/common/main/lib/component/ColorButton.js +++ b/apps/common/main/lib/component/ColorButton.js @@ -125,9 +125,8 @@ define([ cls: 'color-menu ' + (options.eyeDropper ? 'shifted-right' : 'shifted-left'), additionalAlign: options.additionalAlign, items: (options.additionalItemsBefore ? options.additionalItemsBefore : []).concat(auto).concat([ - { template: _.template('
') }, - {caption: '--'} - ]).concat(eyedropper).concat([ + { template: _.template('
') } + ]).concat(options.hideColorsSeparator ? [] : {caption: '--'}).concat(eyedropper).concat([ { id: id + '-color-new', template: _.template('' + this.textNewColor + '') diff --git a/apps/pdfeditor/main/app/view/DocumentHolderExt.js b/apps/pdfeditor/main/app/view/DocumentHolderExt.js index a0d69e5e53..d9b6f3d59f 100644 --- a/apps/pdfeditor/main/app/view/DocumentHolderExt.js +++ b/apps/pdfeditor/main/app/view/DocumentHolderExt.js @@ -1492,6 +1492,7 @@ define([], function () { colors: config.colors, color: '3D8A44', additionalItemsAfter: [ + {caption: '--'}, new Common.UI.MenuItem({ template: _.template('
'), stopPropagation: true @@ -1504,6 +1505,7 @@ define([], function () { paletteCls: config.cls, paletteWidth: config.paletteWidth, storageSuffix: '-draw', + hideColorsSeparator: true, hint: toolbar.textUnderline, type: AscPDF.ANNOTATIONS_TYPES.Underline }); @@ -1521,6 +1523,7 @@ define([], function () { colors: config.colors, color: 'D43230', additionalItemsAfter: [ + {caption: '--'}, new Common.UI.MenuItem({ template: _.template('
'), stopPropagation: true @@ -1533,6 +1536,7 @@ define([], function () { paletteCls: config.cls, paletteWidth: config.paletteWidth, storageSuffix: '-draw', + hideColorsSeparator: true, hint: toolbar.textStrikeout, type: AscPDF.ANNOTATIONS_TYPES.Strikeout }); @@ -1547,6 +1551,7 @@ define([], function () { split: true, menu: true, additionalItemsAfter: [ + {caption: '--'}, new Common.UI.MenuItem({ template: _.template('
'), stopPropagation: true @@ -1564,6 +1569,7 @@ define([], function () { paletteCls: config.cls, paletteWidth: config.paletteWidth, storageSuffix: '-draw', + hideColorsSeparator: true, hint: toolbar.textHighlight, type: AscPDF.ANNOTATIONS_TYPES.Highlight }); @@ -1622,6 +1628,7 @@ define([], function () { ], color: 'FFFC54', additionalItemsAfter: [ + {caption: '--'}, new Common.UI.MenuItem({ template: _.template('
'), stopPropagation: true @@ -1634,6 +1641,7 @@ define([], function () { paletteCls: config.cls, paletteWidth: config.paletteWidth, storageSuffix: '-draw', + hideColorsSeparator: true, hint: this.textColor }); annotSelectBarBtns.push(this.btnStrokeHighlightColor); @@ -1650,6 +1658,7 @@ define([], function () { colors: config.colors, color: '3D8A44', additionalItemsAfter: [ + {caption: '--'}, new Common.UI.MenuItem({ template: _.template('
'), stopPropagation: true @@ -1662,6 +1671,7 @@ define([], function () { paletteCls: config.cls, paletteWidth: config.paletteWidth, storageSuffix: '-draw', + hideColorsSeparator: true, hint: this.textColor }); annotSelectBarBtns.push(this.btnStrokeColor); diff --git a/apps/pdfeditor/main/app/view/Toolbar.js b/apps/pdfeditor/main/app/view/Toolbar.js index 9cf505866f..4b6a752076 100644 --- a/apps/pdfeditor/main/app/view/Toolbar.js +++ b/apps/pdfeditor/main/app/view/Toolbar.js @@ -901,6 +901,7 @@ define([ menu: true, colorLine: false, additionalItemsAfter: [ + {caption: '--'}, new Common.UI.MenuItem({ template: _.template('
'), stopPropagation: true @@ -915,6 +916,7 @@ define([ paletteCls: colorsconfig.cls, paletteWidth: colorsconfig.paletteWidth, storageSuffix: '-draw', + hideColorsSeparator: true, dataHint: '1', dataHintDirection: 'top', dataHintOffset: '0, -16', @@ -933,6 +935,7 @@ define([ menu: true, colorLine: false, additionalItemsAfter: [ + {caption: '--'}, new Common.UI.MenuItem({ template: _.template('
'), stopPropagation: true @@ -947,6 +950,7 @@ define([ paletteCls: colorsconfig.cls, paletteWidth: colorsconfig.paletteWidth, storageSuffix: '-draw', + hideColorsSeparator: true, dataHint: '1', dataHintDirection: 'bottom', dataHintOffset: '0, -16', @@ -964,6 +968,7 @@ define([ split: true, menu: true, additionalItemsAfter: [ + {caption: '--'}, new Common.UI.MenuItem({ template: _.template('
'), stopPropagation: true @@ -981,6 +986,7 @@ define([ paletteCls: colorsconfig.cls, paletteWidth: colorsconfig.paletteWidth, storageSuffix: '-draw', + hideColorsSeparator: true, type: AscPDF.ANNOTATIONS_TYPES.Highlight, dataHint: '1', dataHintDirection: 'top',