mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode fb5dc0083bfa9a0e3da7ed1f86e1ecb9836fcc8b
This commit is contained in:
@@ -46,7 +46,8 @@
|
||||
}
|
||||
|
||||
.monaco-action-bar .action-item .codicon {
|
||||
vertical-align: middle;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.monaco-action-bar .action-label {
|
||||
|
||||
@@ -510,7 +510,7 @@ export class ActionBar extends Disposable implements IActionRunner {
|
||||
} else if (event.equals(nextKey)) {
|
||||
this.focusNext();
|
||||
} else if (event.equals(KeyCode.Escape)) {
|
||||
this.cancel();
|
||||
this._onDidCancel.fire();
|
||||
} else if (this.isTriggerKeyEvent(event)) {
|
||||
// Staying out of the else branch even if not triggered
|
||||
if (this.options.triggerKeys && this.options.triggerKeys.keyDown) {
|
||||
@@ -813,14 +813,6 @@ export class ActionBar extends Disposable implements IActionRunner {
|
||||
}
|
||||
}
|
||||
|
||||
private cancel(): void {
|
||||
if (document.activeElement instanceof HTMLElement) {
|
||||
document.activeElement.blur(); // remove focus from focused action
|
||||
}
|
||||
|
||||
this._onDidCancel.fire();
|
||||
}
|
||||
|
||||
run(action: IAction, context?: unknown): Promise<void> {
|
||||
return this._actionRunner.run(action, context);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@font-face {
|
||||
font-family: "codicon";
|
||||
src: url("./codicon.ttf?df9e07bbeddc0cf98f4d7a7c92bef3d8") format("truetype");
|
||||
src: url("./codicon.ttf?5490083fcec741c6a0a08a366d2f9c98") format("truetype");
|
||||
}
|
||||
|
||||
.codicon[class*='codicon-'] {
|
||||
@@ -419,3 +419,4 @@
|
||||
.codicon-bell-dot:before { content: "\f101" }
|
||||
.codicon-debug-alt-2:before { content: "\f102" }
|
||||
.codicon-debug-alt:before { content: "\f103" }
|
||||
.codicon-run-all:before { content: "\f104" }
|
||||
|
||||
Binary file not shown.
@@ -397,18 +397,6 @@ export class InputBox extends Widget {
|
||||
const styles = this.stylesForType(this.message.type);
|
||||
this.element.style.border = styles.border ? `1px solid ${styles.border}` : '';
|
||||
|
||||
// ARIA Support
|
||||
let alertText: string;
|
||||
if (message.type === MessageType.ERROR) {
|
||||
alertText = nls.localize('alertErrorMessage', "Error: {0}", message.content);
|
||||
} else if (message.type === MessageType.WARNING) {
|
||||
alertText = nls.localize('alertWarningMessage', "Warning: {0}", message.content);
|
||||
} else {
|
||||
alertText = nls.localize('alertInfoMessage', "Info: {0}", message.content);
|
||||
}
|
||||
|
||||
aria.alert(alertText);
|
||||
|
||||
if (this.hasFocus() || force) {
|
||||
this._showMessage();
|
||||
}
|
||||
@@ -519,6 +507,18 @@ export class InputBox extends Widget {
|
||||
layout: layout
|
||||
});
|
||||
|
||||
// ARIA Support
|
||||
let alertText: string;
|
||||
if (this.message.type === MessageType.ERROR) {
|
||||
alertText = nls.localize('alertErrorMessage', "Error: {0}", this.message.content);
|
||||
} else if (this.message.type === MessageType.WARNING) {
|
||||
alertText = nls.localize('alertWarningMessage', "Warning: {0}", this.message.content);
|
||||
} else {
|
||||
alertText = nls.localize('alertInfoMessage', "Info: {0}", this.message.content);
|
||||
}
|
||||
|
||||
aria.alert(alertText);
|
||||
|
||||
this.state = 'open';
|
||||
}
|
||||
|
||||
|
||||
@@ -186,6 +186,11 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,
|
||||
.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {
|
||||
flex: 1; /* make sure the icon label grows within the row */
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon {
|
||||
vertical-align: sub;
|
||||
}
|
||||
@@ -194,6 +199,10 @@
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {
|
||||
margin-right: 8px; /* separate from the separator label or scrollbar if any */
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-label-meta {
|
||||
opacity: 0.7;
|
||||
line-height: normal;
|
||||
@@ -205,17 +214,13 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-separator {
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry.has-actions:hover .quick-input-list-separator,
|
||||
.quick-input-list .monaco-list-row.focused .quick-input-list-entry.has-actions .quick-input-list-separator {
|
||||
margin-right: 0;
|
||||
.quick-input-list .quick-input-list-entry .quick-input-list-separator {
|
||||
margin-right: 8px; /* separate from keybindings or actions */
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry-action-bar {
|
||||
display: none;
|
||||
display: flex;
|
||||
visibility: hidden; /* not using display: none here to not flicker too much */
|
||||
flex: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
@@ -231,16 +236,16 @@
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry-action-bar ul:first-child .action-label.codicon {
|
||||
margin-left: 2px;
|
||||
.quick-input-list .quick-input-list-entry-action-bar {
|
||||
margin-right: 4px; /* separate from scrollbar */
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry-action-bar ul:last-child .action-label.codicon {
|
||||
margin-right: 8px;
|
||||
.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {
|
||||
margin-right: 4px; /* separate actions */
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry.always-visible-actions .quick-input-list-entry-action-bar,
|
||||
.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar,
|
||||
.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar {
|
||||
display: flex;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import { getIconClass } from 'vs/base/parts/quickinput/browser/quickInputUtils';
|
||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
import { IQuickInputOptions } from 'vs/base/parts/quickinput/browser/quickInput';
|
||||
import { IListOptions, List, IListStyles, IAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
@@ -79,6 +80,7 @@ interface IListElementTemplateData {
|
||||
entry: HTMLDivElement;
|
||||
checkbox: HTMLInputElement;
|
||||
label: IconLabel;
|
||||
keybinding: KeybindingLabel;
|
||||
detail: HighlightedLabel;
|
||||
separator: HTMLDivElement;
|
||||
actionBar: ActionBar;
|
||||
@@ -118,6 +120,10 @@ class ListElementRenderer implements IListRenderer<ListElement, IListElementTemp
|
||||
// Label
|
||||
data.label = new IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true, supportCodicons: true });
|
||||
|
||||
// Keybinding
|
||||
const keybindingContainer = dom.append(row1, $('.quick-input-list-entry-keybinding'));
|
||||
data.keybinding = new KeybindingLabel(keybindingContainer, platform.OS);
|
||||
|
||||
// Detail
|
||||
const detailContainer = dom.append(row2, $('.quick-input-list-label-meta'));
|
||||
data.detail = new HighlightedLabel(detailContainer, true);
|
||||
@@ -150,6 +156,9 @@ class ListElementRenderer implements IListRenderer<ListElement, IListElementTemp
|
||||
options.italic = element.item.italic;
|
||||
data.label.setLabel(element.saneLabel, element.saneDescription, options);
|
||||
|
||||
// Keybinding
|
||||
data.keybinding.set(element.item.keybinding);
|
||||
|
||||
// Meta
|
||||
data.detail.set(element.saneDetail, detailHighlights);
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ export interface IQuickPickItem {
|
||||
ariaLabel?: string;
|
||||
description?: string;
|
||||
detail?: string;
|
||||
keybinding?: ResolvedKeybinding;
|
||||
iconClasses?: string[];
|
||||
italic?: boolean;
|
||||
highlights?: IQuickPickItemHighlights;
|
||||
|
||||
Reference in New Issue
Block a user