Skip to content

Commit d6474a0

Browse files
Couple of styling updates to quick pick (microsoft#208242)
1. Separator descriptions no longer include opacity so that contrast ratio is satisfied 2. The separators are now a little taller so that they stand out compared to regular items
1 parent fb14b69 commit d6474a0

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

src/vs/platform/quickinput/browser/media/quickInput.css

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
.quick-input-header {
6161
display: flex;
62-
padding: 8px 6px 6px 6px;
62+
padding: 8px 6px 2px 6px;
6363
}
6464

6565
.quick-input-widget.hidden-input .quick-input-header {
@@ -323,12 +323,21 @@
323323
background: none;
324324
}
325325

326-
/* Quick input separators as full-row item */
327326
.quick-input-list .quick-input-list-separator-as-item {
328-
font-weight: 600;
327+
padding: 4px 6px;
329328
font-size: 12px;
330329
}
331330

331+
/* Quick input separators as full-row item */
332+
.quick-input-list .quick-input-list-separator-as-item .label-name {
333+
font-weight: 600;
334+
}
335+
336+
.quick-input-list .quick-input-list-separator-as-item .label-description {
337+
/* Override default description opacity so we don't have a contrast ratio issue. */
338+
opacity: 1 !important;
339+
}
340+
332341
/* Hide border when the item becomes the sticky one */
333342
.quick-input-list .monaco-tree-sticky-row .quick-input-list-entry.quick-input-list-separator-as-item.quick-input-list-separator-border {
334343
border-top-style: none;

src/vs/platform/quickinput/browser/quickInputTree.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,8 @@ class QuickPickSeparatorElement extends BaseQuickPickItemElement {
277277
class QuickInputItemDelegate implements IListVirtualDelegate<IQuickPickElement> {
278278
getHeight(element: IQuickPickElement): number {
279279

280-
if (!element.item) {
281-
// must be a separator
282-
return 24;
280+
if (element instanceof QuickPickSeparatorElement) {
281+
return 30;
283282
}
284283
return element.saneDetail ? 44 : 22;
285284
}

0 commit comments

Comments
 (0)