Skip to content

Commit b05a122

Browse files
author
Justin Chen
committed
code action widget styling to match context menu
1 parent 4ee7220 commit b05a122

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/vs/editor/contrib/codeAction/browser/codeActionMenu.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export interface ICodeActionMenuTemplateData {
9090
}
9191

9292
const TEMPLATE_ID = 'codeActionWidget';
93-
const codeActionLineHeight = 27;
93+
const codeActionLineHeight = 26;
9494

9595
class CodeMenuRenderer implements IListRenderer<ICodeActionMenuItem, ICodeActionMenuTemplateData> {
9696
get templateId(): string { return TEMPLATE_ID; }
@@ -256,8 +256,8 @@ export class CodeActionMenu extends Disposable implements IEditorContribution {
256256
// resize observer - can be used in the future since list widget supports dynamic height but not width
257257
const maxWidth = Math.max(...arr);
258258

259-
// 40 is the additional padding for the list widget (20 left, 20 right)
260-
renderMenu.style.width = maxWidth + 40 + 'px';
259+
// 40 is the additional padding for the list widget (26px left, 26px right)
260+
renderMenu.style.width = maxWidth + 52 + 'px';
261261
this.codeActionList.value?.layout(height, maxWidth);
262262

263263
// List selection

src/vs/editor/contrib/codeAction/browser/media/action.css

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
.codeActionMenuWidget {
7-
padding: 10px 0px 10px 0px;
7+
padding: 8px 0px 8px 0px;
88
overflow: auto;
99
font-size: 13px;
1010
border-radius: 5px;
@@ -14,9 +14,8 @@
1414
/* flex-direction: column;
1515
flex: 0 1 auto; */
1616
width: 100%;
17-
border-style: solid;
18-
border-width: 1px;
19-
border-color: var(--vscode-editorSuggestWidget-border);
17+
border-width: 0px;
18+
border-color: none;
2019
background-color: var(--vscode-menu-background);
2120
color: var(--vscode-menu-foreground);
2221
}
@@ -62,7 +61,7 @@
6261
display: flex;
6362
-mox-box-sizing: border-box;
6463
box-sizing: border-box;
65-
padding: 0px 20px 0px 20px;
64+
padding: 0px 26px 0px 26px;
6665
background-repeat: no-repeat;
6766
background-position: 2px 2px;
6867
white-space: nowrap;

0 commit comments

Comments
 (0)