Skip to content

Commit 80275ae

Browse files
committed
chore: add edit button to color swatch
1 parent b601829 commit 80275ae

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/extensions/default/QuickView/colorGradientProvider.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,13 @@ define(function (require, exports, module) {
288288
// (used by unit tests) to match so normalize the css for both
289289
let tooltip = gradientMatch.match ? "" : Strings.TOOLTIP_CLICK_TO_EDIT_COLOR;
290290
previewCSS = normalizeGradientExpressionForQuickview(ensureHexFormat(previewCSS));
291-
let preview = $(`<div id='quick-view-color-swatch' data-for-test='${previewCSS}' class='color-swatch'
292-
style='background: ${previewCSS}' title="${tooltip}">
293-
</div>`);
291+
let preview = $(`<div title="${tooltip}">
292+
<div id='quick-view-color-swatch' data-for-test='${previewCSS}' class='color-swatch'
293+
style='background: ${previewCSS}'>
294+
</div>
295+
<i class="fa fa-edit" style="color: ${previewCSS}; margin-top:5px;"></i>
296+
<span style="color: ${previewCSS}; margin-top:5px;">${Strings.EDIT}</span>
297+
</div>`);
294298
preview.click(function () {
295299
if(gradientMatch.match) {
296300
return;

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ define({
853853
"COLOR_EDITOR_0X_BUTTON_TIP": "Hex (0x) Format",
854854
"COLOR_EDITOR_USED_COLOR_TIP_SINGULAR": "{0} (Used {1} time)",
855855
"COLOR_EDITOR_USED_COLOR_TIP_PLURAL": "{0} (Used {1} times)",
856+
"EDIT": "Edit",
856857

857858
// extensions/default/JavaScriptCodeHints
858859
"CMD_JUMPTO_DEFINITION": "Jump to Definition",

0 commit comments

Comments
 (0)