Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f (#7282)

* Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f

* fix various icon issues

* fix preview features
This commit is contained in:
Anthony Dresser
2019-09-19 21:50:52 -07:00
committed by GitHub
parent 9d3d64eef3
commit db498db0a8
459 changed files with 10195 additions and 7528 deletions

View File

@@ -453,8 +453,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);
dom.toggleClass(this._domNode, 'replaceToggled', this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('collapse', !this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('expand', this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('codicon-chevron-right', !this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('codicon-chevron-down', this._isReplaceVisible);
this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
let canReplace = !this._codeEditor.getOption(EditorOption.readOnly);
@@ -642,6 +642,10 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
if (!this._isVisible) {
return;
}
if (!dom.isInDOM(this._domNode)) {
// the widget is not in the DOM
return;
}
const layoutInfo = this._codeEditor.getLayoutInfo();
const editorContentWidth = layoutInfo.contentWidth;
@@ -951,7 +955,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Previous button
this._prevBtn = this._register(new SimpleButton({
label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.PreviousMatchFindAction),
className: 'previous',
className: 'codicon codicon-arrow-up',
onTrigger: () => {
this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction).run().then(undefined, onUnexpectedError);
}
@@ -960,7 +964,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Next button
this._nextBtn = this._register(new SimpleButton({
label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.NextMatchFindAction),
className: 'next',
className: 'codicon codicon-arrow-down',
onTrigger: () => {
this._codeEditor.getAction(FIND_IDS.NextMatchFindAction).run().then(undefined, onUnexpectedError);
}
@@ -1000,7 +1004,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Close button
this._closeBtn = this._register(new SimpleButton({
label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.CloseFindWidgetCommand),
className: 'close-fw',
className: 'codicon codicon-close',
onTrigger: () => {
this._state.change({ isRevealed: false, searchScope: null }, false);
},
@@ -1063,7 +1067,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Replace one button
this._replaceBtn = this._register(new SimpleButton({
label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceOneAction),
className: 'replace',
className: 'codicon codicon-replace',
onTrigger: () => {
this._controller.replace();
},
@@ -1078,7 +1082,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Replace all button
this._replaceAllBtn = this._register(new SimpleButton({
label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceAllAction),
className: 'replace-all',
className: 'codicon codicon-replace-all',
onTrigger: () => {
this._controller.replaceAll();
}
@@ -1098,7 +1102,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// Toggle replace button
this._toggleReplaceBtn = this._register(new SimpleButton({
label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL,
className: 'toggle left',
className: 'codicon toggle left',
onTrigger: () => {
this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false);
if (this._isReplaceVisible) {
@@ -1108,8 +1112,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
this._showViewZone();
}
}));
this._toggleReplaceBtn.toggleClass('expand', this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('collapse', !this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('codicon-chevron-down', this._isReplaceVisible);
this._toggleReplaceBtn.toggleClass('codicon-chevron-right', !this._isReplaceVisible);
this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
// Widget
@@ -1227,7 +1231,7 @@ class SimpleCheckbox extends Widget {
this._checkbox.tabIndex = -1;
this._label = document.createElement('label');
this._label.className = 'label';
this._label.className = 'codicon codicon-selection';
// Connect the label and the checkbox. Checkbox will get checked when the label receives a click.
this._label.htmlFor = this._checkbox.id;
this._label.tabIndex = -1;