Skip to content

Commit d3ae324

Browse files
committed
Use 'paste' icon for pasting from Clipboard
Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
1 parent 091e20a commit d3ae324

File tree

3 files changed

+82
-3
lines changed

3 files changed

+82
-3
lines changed

images/paste-dark.svg

Lines changed: 37 additions & 0 deletions
Loading

images/paste-light.svg

Lines changed: 37 additions & 0 deletions
Loading

src/util/inputValue.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
* Copyright (c) Red Hat, Inc. All rights reserved.
33
* Licensed under the MIT License. See LICENSE file in the project root for license information.
44
*-----------------------------------------------------------------------------------------------*/
5-
import { env, InputBox, QuickInputButton, QuickInputButtons, ThemeIcon, window } from 'vscode';
5+
import { env, InputBox, QuickInputButton, QuickInputButtons, ThemeIcon, Uri, window } from 'vscode';
6+
import * as path from 'path';
67

78
export class quickBtn implements QuickInputButton {
8-
constructor(public iconPath: ThemeIcon, public tooltip: string) { }
9+
constructor(public iconPath: Uri | { light: Uri; dark: Uri } | ThemeIcon, public tooltip: string) { }
910
}
1011

1112
/*
@@ -31,7 +32,11 @@ export function inputValue(prompt: string, initialValue: string, password: boole
3132
if (placeHolder) input.placeholder = placeHolder;
3233
const enterBtn = new quickBtn(new ThemeIcon('check'), 'Enter');
3334
const cancelBtn = new quickBtn(new ThemeIcon('close'), 'Cancel');
34-
const pasteBtn = new quickBtn(new ThemeIcon('output'), 'Paste from Clipboard');
35+
const pasteBtn = new quickBtn({
36+
light: Uri.file(path.resolve(__dirname, '../../../images/paste-light.svg')),
37+
dark: Uri.file(path.resolve(__dirname, '../../../images/paste-dark.svg'))
38+
},
39+
'Paste from Clipboard');
3540
const hideBtn = new quickBtn(new ThemeIcon('eye'), 'Hide value');
3641
const showBtn = new quickBtn(new ThemeIcon('eye-closed'), 'Show value');
3742
let isHidden = password;

0 commit comments

Comments
 (0)